-
Notifications
You must be signed in to change notification settings - Fork 33
Check If Refinement Predicates Are Boolean Expressions #85
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
Conversation
| public boolean isBooleanExpression() { | ||
| if (this instanceof LiteralBoolean || this instanceof Ite || this instanceof AliasInvocation | ||
| || this instanceof FunctionInvocation) { | ||
| return true; |
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.
We assume ghost and alias invocations always return boolean expressions.
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.
but ghosts can be ints right? like size is that an issue?
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.
Yeah in that case we can't catch it there since would need the context to check if it actually returns a boolean.
CatarinaGamboa
left a comment
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.
LGTM. We should also have tests that check if the right error message is sent and not just if the verifier fails or not, I'll add a issue with that and we can discuss it later
Previously, we weren't checking if refinement predicates were actually boolean expressions, and this was only caught by the SMT solver.
Examples
Refinements
Before
After
Refinement Aliases
Before
After
State Refinements
Before:
After
The same happens with state refinements in constructors and with
totransitions.