Skip to content

Symex: resolve pointer comparisons using the value-set (second attempt)#4664

Merged
smowton merged 5 commits intodiffblue:developfrom
owen-mc-diffblue:fix-4444
May 17, 2019
Merged

Symex: resolve pointer comparisons using the value-set (second attempt)#4664
smowton merged 5 commits intodiffblue:developfrom
owen-mc-diffblue:fix-4444

Conversation

@owen-mc-diffblue
Copy link
Contributor

This is a fixed version of #4444, which was reverted in #4656 because a bug was found (which has since been added as a test). The last commit is the only change from the original PR.

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

Owen added 5 commits May 16, 2019 18:50
value_set_dereferencet::valuet is only used as the return value of
value_set_dereferencet::build_reference_to. valuet::value is an
expression for the object pointed to, which is what's needed for
dereferencing. In other contexts, e.g. filtering value-sets, what
is needed is an expression for the pointer. This logic already
existed in try_filter_value_set, but putting it directly in
build_reference_to makes it easier to use it in other places and
makes it clear that it didn't cope with typecasts properly.
Use the value-set to evaluate pointer comparisons as true or false
where possible
At time of writing, develop fails on the following lines of the test:
test::1::unconditionally_reachable_1[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_1[^\s]+\)$ [FAILED]
test::1::unconditionally_reachable_6[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_6[^\s]+\)$ [FAILED]
test::1::unconditionally_reachable_7[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_7[^\s]+\)$ [FAILED]
test::1::unconditionally_reachable_8[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_8[^\s]+\)$ [FAILED]
test::1::unconditionally_reachable_9[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_9[^\s]+\)$ [FAILED]
test::1::unconditionally_reachable_10[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_10[^\s]+\)$ [FAILED]
test::1::unconditionally_reachable_11[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_11[^\s]+\)$ [FAILED]
test::1::unconditionally_reachable_12[^\s]+ = \(goto_symex::\\guard[^\s]+ \? 7 : test::1::unconditionally_reachable_12[^\s]+\)$ [FAILED]
test::1::unreachable_1[^\s]+ = 7$ [FAILED]
test::1::unreachable_6[^\s]+ = 7$ [FAILED]
test::1::unreachable_7[^\s]+ = 7$ [FAILED]
test::1::unreachable_8[^\s]+ = 7$ [FAILED]
test::1::unreachable_9[^\s]+ = 7$ [FAILED]
test::1::unreachable_10[^\s]+ = 7$ [FAILED]
test::1::unreachable_11[^\s]+ = 7$ [FAILED]
test::1::unreachable_12[^\s]+ = 7$ [FAILED]
We cannot deduce anything about a pointer comparison when a failed object
is in the value-set for the pointer
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: b095ba1).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/112125273

@smowton smowton merged commit 1ff7f38 into diffblue:develop May 17, 2019
@owen-mc-diffblue owen-mc-diffblue deleted the fix-4444 branch May 17, 2019 15:38
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