Skip to content

Add VC Constraint Simplification#264

Open
rcosta358 wants to merge 2 commits into
mainfrom
vc-constraint-elimination
Open

Add VC Constraint Simplification#264
rcosta358 wants to merge 2 commits into
mainfrom
vc-constraint-elimination

Conversation

@rcosta358

@rcosta358 rcosta358 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds VC simplification for antecedent constraints implied by stronger later antecedents in a VCImplication chain, replacing redundant binder constraints with true.

Example

x:int. x > 0 =>
∀#fresh:boolean. x > 1 =>
∀#ret:int. #ret == x

is simplified tox:int. true =>
∀#fresh:boolean. x > 1 =>
∀#ret:int. #ret == x

Related Issue

None.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • Added/updated tests
  • mvn test passes locally
  • Updated docs/README if behavior or API changed

@rcosta358 rcosta358 self-assigned this Jun 22, 2026
@rcosta358 rcosta358 added enhancement New feature or request simplification Related to the simplification of expressions labels Jun 22, 2026
@CatarinaGamboa

Copy link
Copy Markdown
Collaborator

Why substitute by "true"? I don't think this is a good idea cause true is usually "we don't know anything about this", so I would say either remove it completely or leave the "x > 0".
This might also bring a question of how we should present the path variables (freshed from ifs) cause this only makes sense because we know that that is true right? But how we write it seems it is just another variable

@rcosta358

Copy link
Copy Markdown
Collaborator Author

We substitute by true and then it is removed in the next pass by the binder simplification.
I see this as "this information is not needed" rather than "we don't know anything about this".

Removing it right away is possible, but it would basically repeat the same logic from the VCBinderSimplification. That's why I decided to leave that to that pass.

@rcosta358
rcosta358 force-pushed the vc-constraint-elimination branch from 0660019 to 3e93fee Compare July 20, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request simplification Related to the simplification of expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants