Skip to content

Improve GOTO programs high-level documentation #3383

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

Merged
merged 1 commit into from
Nov 13, 2018

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Nov 13, 2018

  • Clarify that some things described as 'instrumentation' previously were actually part
    of the normal goto-convert process
  • Remove duplicate exposition of the goto_functionst data structure
  • Describe the typical post-goto-convert transformations briefly
  • Describe lazy-goto-modelt

are littered with \ref code_skipt "skip" statements. The
instrumentation stage removes the majority of these.
The `codet` representation of method bodies that is stored in the symbol table
resembles C code quite strongly: it uses lexical variable scoping and has
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this some how refer to the parse tree, saying that codet is the type-checked version of the parse tree and thus uses lexical ...

Copy link
Contributor Author

@smowton smowton Nov 13, 2018

Choose a reason for hiding this comment

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

That's only true for C though -- Java and other code doesn't necessarily follow that pattern

conversion and driver-program transformation.

`goto_symext` is able to use such a lazy GOTO model in place of the usual
`goto_modelt`, enabling it to fault GOTO programs in on demand, and thus avoid
Copy link
Collaborator

Choose a reason for hiding this comment

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

With English not being my first language, the use of "fault GOTO programs in" required me to think more than I would expect at this point. Can we find a different way of expressing the on-demand conversion requests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed fault -> create

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: 0d71f9b).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91196923

structured: all source-file information is converted into a symbol table, then
each symbol-table method is converted into a GOTO program, then each transform
is run over the whole GOTO-model in turn. This is fine when the GOTO model
consumer will use most or all of the results of conversion, but it not then
Copy link
Member

Choose a reason for hiding this comment

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

if not

spending time and memory generating GOTO programs that symex determines cannot
in fact be reached. This is particularly useful when the source program contains
many indirect calls (virtual function calls, or calls via function pointer), as
the `remove_virtual_funtions` and `remove_function_pointers` passes treat these
Copy link
Member

Choose a reason for hiding this comment

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

remove_virtual_functions

@smowton smowton force-pushed the smowton/docs/goto-model-creation branch 2 times, most recently from f1f2da1 to 645c11c Compare November 13, 2018 12:22
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: f1f2da1).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91204347
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: 645c11c).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91204477
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.

* Clarify that some things described as 'instrumentation' previously were actually part
  of the normal goto-convert process
* Remove duplicate exposition of the `goto_functionst` data structure
* Describe the typical post-goto-convert transformations briefly
* Describe lazy-goto-modelt
@smowton smowton force-pushed the smowton/docs/goto-model-creation branch from 645c11c to 008c580 Compare November 13, 2018 14:25
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: 008c580).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91222793

@smowton smowton merged commit cebfe56 into diffblue:develop Nov 13, 2018
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.

4 participants