Skip to content

Conversation

tautschnig
Copy link
Collaborator

When we do not have any entry in the value set we shouldn't rely on it
being a trustworthy source of information.

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

if(value_set_elements.empty())
{
return {};
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The fact that the function is not correct when the value set is empty is suspicious.
Maybe we should check that the value set has size at least one just after the call to get_value_set, and can you say in which case it can be empty?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is a very good point. It seems value sets are missing an ID_nondet_symbol case. I'll fix this. Marking do-not-merge in the meantime.

@tautschnig tautschnig self-assigned this May 22, 2019
@smowton smowton changed the title Fix null-pointer filtering for non-deterministic pointer values Fix value-set-based pointer test resolution for non-deterministic pointer values May 22, 2019
Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

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

Adjusted title to more-accurately reflect what's being fixed

@tautschnig tautschnig force-pushed the fix-null-filtering branch from 02e6ebe to af2afc7 Compare May 22, 2019 11:40
The value-set based filtering (rightfully) expects a value-set to be
non-empty. As we previously ignored some right-hand sides, notably
non-det symbols, this wasn't guaranteed.

This entails changes to the tests of let-expression use in dereferencing
as some of those tests have non-deterministically initialised arrays.
Changes as discussed with @smowton.
@tautschnig tautschnig force-pushed the fix-null-filtering branch from af2afc7 to 86858a6 Compare May 22, 2019 19:31
@tautschnig tautschnig merged commit f061938 into diffblue:develop May 23, 2019
@tautschnig tautschnig deleted the fix-null-filtering branch May 23, 2019 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants