Check If Refinement Predicates Are Boolean Expressions#85
Merged
rcosta358 merged 5 commits intoliquid-java:mainfrom Nov 8, 2025
Merged
Check If Refinement Predicates Are Boolean Expressions#85rcosta358 merged 5 commits intoliquid-java:mainfrom
rcosta358 merged 5 commits intoliquid-java:mainfrom
Conversation
rcosta358
commented
Nov 6, 2025
| public boolean isBooleanExpression() { | ||
| if (this instanceof LiteralBoolean || this instanceof Ite || this instanceof AliasInvocation | ||
| || this instanceof FunctionInvocation) { | ||
| return true; |
Collaborator
Author
There was a problem hiding this comment.
We assume ghost and alias invocations always return boolean expressions.
Collaborator
There was a problem hiding this comment.
but ghosts can be ints right? like size is that an issue?
Collaborator
Author
There was a problem hiding this comment.
Yeah in that case we can't catch it there since would need the context to check if it actually returns a boolean.
CatarinaGamboa
approved these changes
Nov 8, 2025
Collaborator
CatarinaGamboa
left a comment
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back 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.