Skip to content

String refinement must not rely on input equations to be simplified #4069

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 4, 2019

Conversation

tautschnig
Copy link
Collaborator

JBMC would produce wrong results when running the newly added test.

  • 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.

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

Copy link
Contributor

@romainbrenguier romainbrenguier left a comment

Choose a reason for hiding this comment

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

Looks correct. Ideally I'd like to understand what condition we ensure when calling simplify, which is needed here.

@@ -645,7 +645,10 @@ decision_proceduret::resultt string_refinementt::dec_solve()
for(equal_exprt &eq : equations)
{
if(can_cast_expr<function_application_exprt>(eq.rhs()))
{
simplify(eq.rhs(), ns);
Copy link
Contributor

Choose a reason for hiding this comment

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

I was a bit confused by the distinction between simplify and simplify_expr; the second one should probably be called simplify_copy, but that's outside the scope of this PR, and they probably need some rework.

^\[.*assertion.1\].* line 8.* SUCCESS$
^\[.*assertion.2\].* line 9.* FAILURE$
--
non equal types
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a comment on what this test is checking

@tautschnig tautschnig force-pushed the string-solver-simplify branch from e47155b to b737ba2 Compare February 4, 2019 16:01
@tautschnig
Copy link
Collaborator Author

I have expanded the commit message and added a comment to the newly added test.

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: e47155b).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99661188
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: b737ba2).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99664907
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.

JBMC would produce wrong results when running the newly added test. Various
methods in string solver either assume a canonical representation of objects in
table lookups or only deal with a limited set of expressions, which is
reasonable so as not to duplicate abilities that the simplifier already has.
@tautschnig tautschnig force-pushed the string-solver-simplify branch from b737ba2 to 03025a1 Compare February 4, 2019 20:06
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: 03025a1).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99691293

@tautschnig tautschnig merged commit db747d3 into diffblue:develop Feb 4, 2019
@tautschnig tautschnig deleted the string-solver-simplify branch February 4, 2019 21:32
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.

4 participants