Skip to content

SMT2 floating point encoding fix #4395

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 3 commits into from
Mar 25, 2019
Merged

SMT2 floating point encoding fix #4395

merged 3 commits into from
Mar 25, 2019

Conversation

kroening
Copy link
Member

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a 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).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@kroening
Copy link
Member Author

This will need a non-recursive variant of letification, which is a few steps away from #4396.

kroening pushed a commit that referenced this pull request Mar 19, 2019
This avoids stack overflow in the case of expressions with many unique
subexpressions.  PR #4395 is an exemplar.
@kroening kroening removed their assignment Mar 19, 2019
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: 80e33fb).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/104919955

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

throw error("unexpected end of file");
if(stack.empty())
{
result = irept(irep_idt());
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really necessary with the result.clear() above?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, not strictly; this is primarily meant to make it clear what is returned.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess to really make it clear the best way would be to make parse return an optionalt<irept> instead of a bool.

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 for using optionalt<irept>

Copy link
Collaborator

Choose a reason for hiding this comment

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

But then also this commit should just be in a PR of its own where those kinds of changes could be made. It really doesn't relate to floating-point encoding fixes in any obvious way.

@tautschnig tautschnig changed the title SMT2 floating point encoding fix SMT2 floating point encoding fix [depends-on: #4396] Mar 21, 2019
@tautschnig tautschnig changed the title SMT2 floating point encoding fix [depends-on: #4396] SMT2 floating point encoding fix [depends-on: #4406] Mar 21, 2019
tautschnig added a commit that referenced this pull request Mar 24, 2019
replace recursion in letify_rec by loop [blocks: #4395]
@tautschnig tautschnig changed the title SMT2 floating point encoding fix [depends-on: #4406] SMT2 floating point encoding fix Mar 24, 2019
Z3, for instance, produces newlines at the end of the response; this should
be tolerated by the parser.
@kroening kroening force-pushed the smt2float branch 2 times, most recently from efebade to 9d2a61e Compare March 24, 2019 22:44
kroening pushed a commit that referenced this pull request Mar 24, 2019
This is follow-up from a discussion in #4395 and clarifies the contract of
this function.
@kroening kroening assigned tautschnig and martin-cs and unassigned kroening Mar 24, 2019
@kroening
Copy link
Member Author

There is now a separate commit with the optional return value of smt2irep.

Daniel Kroening added 2 commits March 24, 2019 22:54
This is follow-up from a discussion in #4395 and clarifies the contract of
this function.
This case was missing but is used in our lowering of floating-point
operations.
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: efebade).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105603393
Status will be re-evaluated on next push.
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 compatibility was already broken by an earlier merge.

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: 9d2a61e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105604164
Status will be re-evaluated on next push.
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 compatibility was already broken by an earlier merge.

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: 8c4c5e5).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105604746
Status will be re-evaluated on next push.
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 compatibility was already broken by an earlier merge.

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

@kroening kroening merged commit 84cd7fd into develop Mar 25, 2019
@kroening kroening deleted the smt2float branch March 25, 2019 21:17
kroening pushed a commit that referenced this pull request Mar 25, 2019
This is follow-up from a discussion in #4395 and clarifies the contract of
this function.
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