Skip to content

Conversation

@rcosta358
Copy link
Collaborator

Summary

Remove boolean literals from expressions like (true && x) and (false || x). This simplifies the error messages a bit.

Example

public class Test {
    public static void k(@Refinement("y < 0") int y) {}

    public static void f(@Refinement("x < 0") int x) {
        k(x + 1); // refinement error
    }
}

Before:

Failed to check refinement at: 
...
Type expected:(#y_1 < 0)
Refinement found:true && #y_1 == #x_0 + (1) && #x_0 == x && (x < 0)

After:

Failed to check refinement at:
...
Type expected: (#y_1 < 0)
Refinement found: #y_1 == #x_0 + (1) && #x_0 == x && (x < 0)

Remove boolean literals from expressions like (true && x) and (false || x)
@rcosta358 rcosta358 self-assigned this Sep 26, 2025
@rcosta358 rcosta358 added the enhancement New feature or request label Sep 26, 2025
@rcosta358 rcosta358 closed this Sep 29, 2025
@rcosta358 rcosta358 deleted the simplify-predicates branch October 29, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant