Skip to content

Adds summary for remove_exceptions [DOC-84] #2794

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

Conversation

jeannielynnmoulton
Copy link
Contributor

No description provided.


To be documented.
When `remove_exceptions` is called on the goto model, the goto model contains
Copy link
Member

Choose a reason for hiding this comment

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

There should be a link to the file/class.

Copy link
Member

Choose a reason for hiding this comment

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

Make goto model a link


To be documented.
When `remove_exceptions` is called on the goto model, the goto model contains
complex instructions such as `CATCH-POP`, `CATCH-PUSH` and `THROW`. In order to
Copy link
Member

Choose a reason for hiding this comment

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

Make instructions a link

and replacing irrelevant parts with `...`) is:

```
com.diffblue.regression.TestExceptions.testException(int) /* java::com.diffblue.regression.TestExceptions.testException:(I)V */
Copy link
Member

Choose a reason for hiding this comment

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

there is no package in the example above. I suggest to remove it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The package is used below, so I will leave it.

Copy link
Member

Choose a reason for hiding this comment

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

The maybe complete the example by wrapping it into a class TestExceptions and adding a package statement in the beginning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed the package and included a copy-pasteable test.


```
where now instead of the instruction `THROW`, the global variable
`@inflight_exception` holds the thrown exception in ia separate goto statement.
Copy link
Member

Choose a reason for hiding this comment

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

a separate

Copy link
Contributor

@thk123 thk123 left a comment

Choose a reason for hiding this comment

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

I think the words don't quite match up with the examples, you talk about removing a CATCH instruction, but it seems there are three different instructions CATCH-PUSH, CATCH-POP and LANDING-PAD? It'd be good to summarise what they get translated to at the top.

Otherwise LGTM

instructions - this is called "lowering". This class lowers the `CATCH` and
`THROW` instructions.

Exceptions that have been thrown, but not yet caught are stored the global
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps reword to be clearer

THROW instructions are replaced by assigning to @inflight_exception and a goto to end of the function.
CATCH instructions are replaced by a check of the @inflight_exception and setting it to null

Copy link
Contributor

Choose a reason for hiding this comment

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

If the bit about the goto statement is right? In your below example it doesn't seem to introduce a GOTO so perhaps that is already present.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it'd be good to split out CATCH into CATCH-PUSH CATCH-POP and EXCEPTION LANDING PAD into roughly what they get translated into

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It introduces THEN GOTO 4


...

CATCH-PUSH ->2
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs some context I think?

Copy link
Contributor Author

@jeannielynnmoulton jeannielynnmoulton Sep 10, 2018

Choose a reason for hiding this comment

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

There is not much context to give, I'm afraid, but I've added some description to what this signifies.

@thk123 thk123 changed the title Adds summary for remove_exceptions Adds summary for remove_exceptions [DOC-25] Sep 6, 2018
@thk123 thk123 changed the title Adds summary for remove_exceptions [DOC-25] Adds summary for remove_exceptions [DOC-84] Oct 4, 2018
@jeannielynnmoulton jeannielynnmoulton force-pushed the jeannie/DocumentRemoveExceptions branch from 1c83024 to 9d8422a Compare November 13, 2018 15:11
@jeannielynnmoulton jeannielynnmoulton force-pushed the jeannie/DocumentRemoveExceptions branch from 9d8422a to 5b5a77e Compare November 13, 2018 15:14
@jeannielynnmoulton jeannielynnmoulton force-pushed the jeannie/DocumentRemoveExceptions branch from 5b5a77e to 00ede79 Compare November 13, 2018 15:28
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

🚫
This PR failed Diffblue compatibility checks (cbmc commit: 9d8422a).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91230518
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

🚫
This PR failed Diffblue compatibility checks (cbmc commit: 5b5a77e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91230843
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: 00ede79).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91233551

@jeannielynnmoulton jeannielynnmoulton merged commit 3b8d756 into diffblue:develop Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants