Skip to content

Ensure result of to_predicates is deterministic #6296

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
Aug 13, 2021

Conversation

tautschnig
Copy link
Collaborator

The order of entries in an unordered map would previously yield varying
results. This caused spurious unit test failures as unit tests perform
exact string matching on the output.

See https://github.com/diffblue/cbmc/pull/5740/checks?check_run_id=3321470809 for an example of a spuriously failing run.

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

@tautschnig
Copy link
Collaborator Author

@jezhiggins You might care to take a look.

The order of entries in an unordered map would previously yield varying
results. This caused spurious unit test failures as unit tests perform
exact string matching on the output.
@tautschnig tautschnig force-pushed the canonical_predicate_string branch from fc274db to 8065a69 Compare August 13, 2021 13:44
@tautschnig tautschnig removed their assignment Aug 13, 2021
Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

Sorry I missed this and thanks for the fix.

Copy link
Contributor

@jezhiggins jezhiggins left a comment

Choose a reason for hiding this comment

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

Thanks!

@codecov
Copy link

codecov bot commented Aug 13, 2021

Codecov Report

Merging #6296 (8065a69) into develop (abced8c) will increase coverage by 0.00%.
The diff coverage is 83.33%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6296   +/-   ##
========================================
  Coverage    75.96%   75.97%           
========================================
  Files         1508     1508           
  Lines       163292   163380   +88     
========================================
+ Hits        124052   124131   +79     
- Misses       39240    39249    +9     
Impacted Files Coverage Δ
src/solvers/flattening/bv_pointers.cpp 82.56% <66.66%> (-0.11%) ⬇️
...yses/variable-sensitivity/abstract_environment.cpp 94.47% <100.00%> (+0.01%) ⬆️
...-sensitivity/abstract_environment/to_predicate.cpp 100.00% <100.00%> (ø)
...nsitivity/three_way_merge_abstract_interpreter.cpp 93.02% <0.00%> (-1.32%) ⬇️
src/analyses/ai.h 57.36% <0.00%> (-0.78%) ⬇️
src/goto-analyzer/build_analyzer.cpp 94.91% <0.00%> (ø)
...sensitivity/three_way_merge_abstract_interpreter.h 100.00% <0.00%> (ø)
...ensitivity/variable_sensitivity_dependence_graph.h 79.31% <0.00%> (ø)
...sitivity/variable_sensitivity_dependence_graph.cpp 84.58% <0.00%> (ø)
src/util/sharing_map.h 88.14% <0.00%> (+0.03%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0a4e75...8065a69. Read the comment docs.

@martin-cs martin-cs merged commit 91c18f6 into diffblue:develop Aug 13, 2021
@tautschnig tautschnig deleted the canonical_predicate_string branch August 13, 2021 15:59
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.

3 participants