Skip to content

Add example of translated goto function #4079

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
Feb 5, 2019

Conversation

NlightNFotis
Copy link
Contributor

Add an example C program and its equivalent goto-functions as produced by cbmc in the
goto-programs folder documentation.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

```
unsigned mult(unsigned a, unsigned b)
{
int acc, i;
Copy link
Contributor

Choose a reason for hiding this comment

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

Surely you should initialise acc to 0, to make this program make more sense?

@johnnonweiler
Copy link
Contributor

I think this would fit in better together with the goto conversion section http://cprover.diffblue.com/group__goto-programs.html#goto-conversion .
@smowton deleted the placeholder for this example code, so he probably has opinions about this.

END_FUNCTION
```

(The above result was produced using `cbmc version 5.11`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Of course our documentation will always be up-to-date so that isn't needed :-)

@smowton
Copy link
Contributor

smowton commented Feb 5, 2019

@johnnonweiler @NlightNFotis I have no opinion on this

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: 15c6b55).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99762376

Add an example C program and its equivalent
goto-functions as produced by cbmc in the
goto-programs folder documentation.
@NlightNFotis NlightNFotis merged commit f179ca8 into diffblue:develop Feb 5, 2019
@NlightNFotis NlightNFotis deleted the goto-programs-doc branch February 5, 2019 14:38
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: 1ee9696).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99784681

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.

6 participants