Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature exception handling #56

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

rarworld
Copy link

I implemented with this commits the exception handling Feature.

How we did it.
First we create for each occurrence of the throw-command a PPT, in the same way daikon does it for returns.
The PPTs are from ppt-type subexit and the suffix is :::THROWNN.

With the parameter --exception-handling we can enable the delegated Exceptions support, the throw-command is always active.
We catch the delegated exceptions by encapsulate the whole method-body with an try- block with one
handle-block at the end of the method. For every throw-command in the method, we interrupt the try-block by creating multiple try-blocks all with the same handle-block. In the handle-block we create a PPT with the suffix :::THROWS also from ppt-type subexit, which collect all uncaught ecxceptions of this method.

Daikon then combines all :::THROW*-PPTs to a new :::THROWSCOMBINED-PPT from ppt-type exit.
The Annotater then prints the :::THROWSCOMBINED-PPT as the exceptional_bahavior-block.
It turned out, it works pretty good.
Also the AnnotateNullable-tool works with exception handling.

This approach has one failure.
is an exception thrown in an try-catch block, the method logs two 3 PPTs. Enter-PPT, THROW-PPT and EXIT-PPT.

I changed the Instrument-class, added testcases in chicory-tests and daikon-test/ExceptionHandling and the Annotate-tool.

Philipp Hirch and others added 14 commits May 24, 2016 05:49
The First Version of the EH is running.
A Throw-Statement is now seen as an subexit.
The PPT will be written. and the Dtrace will be Written.

[Chicory] Exception Handling version 2

If the exceptionHandling-Parameter is set,
every Method is encapsulated by an TryCatch-Instruction.
Is the exceptionHandling-Parameter not set, only a Throw-Statement
writes an Throw in the DTrace.
Is the exceptionHandling-Parameter set, every Throw-Statement is only
recognized as an Throws in DTrace

[Chicory] Exception Handling version 3

If the exceptionHandling-Parameter is set,
every Method is encapsulated by an TryCatch-Instruction.

Chicory now differentiate between thrown and forwarded Exceptions.
Every throw-command results in a distinct PPT.

[Chicory] Exception Handling version 4

Chicory calculates now a new Stackmap table entry for the EH-TryCatch
jump instead adding a predefined Entry

+ Changed the Version Number of Daikon

[xceptonHandle] make some cleaning and Forking

[Chicory] Update to BCEL6

Update Exception-Handling-support to use BCEL After Rebase to newer
Version

removed wrong comment

[Chicory] Exception Handling version 5

changed the type of the internal variable of the exception from
java/lang/Exception to java/lang/Throwable.
After failing the DataStructures.CursorList-Test.

The synchronized-support is now compiling again.
working with Exception-Handling???
synchronized is throwing an Exception in bytecode but ??

[Chicory] Exception Handling version 6

Added filter functionality to throw(.*)-PPTs

rebase to master chicory

Fix some merging bugs
New PPT-Suffix added (THROW,THROWS, THROWCOMBINED)

Daikon know works with THROW/THROWS and combinedThrow PPTs.

rebase to master daikon

Fix some merging bugs
like formatting
The Annotater know print the combined throw-PPT as
exceptional_behaviour-block in JML

the params of a method a now be printed out in JML

rebase to master annotate

Fix some merging bugs
like formatting
Modified the goals of the chicory-tests to include Throw*-PPTs
+
Modified the jml-goals of the Daikon purity-test to contain
parameters in method-calls
suppress the exception handle output in the tests
Added support for catching delegated Exceptions in constructors
Updated daikon.AnnotateNullable to identify Throw-PPTs
Update existing Tests to include THROW-PPTs
README Outdated
@@ -1,14 +0,0 @@
This is the distribution of the Daikon invariant detector,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has the README file been removed?

If you propose to do so, then I would prefer such changes to appear in a separate pull request, not mixed in with the exception-handling feature.

@mernst
Copy link
Member

mernst commented May 30, 2016

According to Github, "This branch has conflicts that must be resolved". Can you please merge master into your branch and resolve the conflicts?

@@ -87,8 +87,8 @@ private Daikon() {

// Don't change the order of the modifiers on these strings as they
// are automatically updated as part of the release process
public final static String release_version = "5.3.3";
public final static String release_date = "May 2, 2016";
public final static String release_version = "5.3.3.2_rar";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should not be merged into master.

@mernst
Copy link
Member

mernst commented May 31, 2016

This important new feature needs to be documented in the user manual. There might also be some updates to be made to the developer manual. That documentation will indicate what the code is intended to do and will make the review of the code much easier than if the reviewers have to guess the intention.

When you update the user manual, please don't forget to add your name to section 10.4, to give you credit for your work. Thanks!

@rarworld
Copy link
Author

rarworld commented Jun 1, 2016

I merged the branches and fixed your comments.
Should I edit the manual??
If yes, i will do it next weekend

@mernst
Copy link
Member

mernst commented Jun 1, 2016

Thank you!
Yes, please edit the manual. I'm happy to iterate with you on that as well (via the pull request or separately).

@mernst
Copy link
Member

mernst commented Jul 7, 2016

This pull request is against a very old version of Daikon. Can you please merge upstream into the pull request?

@@ -9185,7 +9196,7 @@ Matthew Tschantz,
Iuliu Vasilescu,
Chen Xiao,
Tao Xie,
Jeff Yuan.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the punctuation removed from the end of the last sentence?

@mernst
Copy link
Member

mernst commented Jul 30, 2018

Superseded by #91

@mernst mernst mentioned this pull request Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants