-
Notifications
You must be signed in to change notification settings - Fork 274
Basic CHC Encoding #6807
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
Basic CHC Encoding #6807
Conversation
kroening
commented
Apr 14, 2022
- 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).
- 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.
902b07b
to
47fb3cc
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6807 +/- ##
=========================================
Coverage 77.01% 77.01%
=========================================
Files 1594 1594
Lines 184436 184954 +518
=========================================
+ Hits 142038 142438 +400
- Misses 42398 42516 +118
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I'm fine with the first two commits (those adding new constructors).
- I find "substitute_symbols" very confusing as we already have "replace_symbolt". Merriam-Webster says "replace" and "substitute" are synonyms.
- I don't have the necessary background to comment on the CHC encoder, but not having any tests does not seem appropriate.
|
47fb3cc
to
0791b0b
Compare
|
Thank you! |
It may well be that having two separate implementations is the right thing to have, but then their names need to be sufficiently clear to avoid any confusion. Also, I would expect the new code to handle all |
0791b0b
to
7798bef
Compare
'substitute' is the common term for replacing a variable by an expression; 'replace' is the unusual one. We will likely gradually replace (uh) 'replace_symbol' by 'substitute_symbol', since we need that awareness of bindings. https://en.wikipedia.org/wiki/Substitution_(logic) I've added the array_comprehension case. |
But then the current state of affairs is that we have
Thank you! |
Right, we'll need to manage the transition. |
This would help avoid confusion, and then we could still introduce a (thin) wrapper |
No, we want to get rid of |
@tautschnig -- shall we go for that? |
This adds a constructor for object_address_exprt that allows setting the type, e.g., to get the element type when construcing the address of an array.
This adds a constructor for tuple_exprt that allows setting the type.
7798bef
to
c36170a
Compare
Now without the offending commit. |
#include <ostream> | ||
#include <unordered_set> | ||
|
||
class state_typet : public typet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📖 A bit of documentation would be helpful for the next reader.
This adds a basic encoding from goto programs into constrained Horn clause systems. It relies on inlining function calls, and does not support pointers.
8a1533b
to
da2d84f
Compare