Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e38d99d
Add SimplifiedExpression
rcosta358 Jun 8, 2026
208249f
Change SimplifiedExpression to SimplifiedPredicate
rcosta358 Jun 8, 2026
92359f3
Requested Changes
rcosta358 Jun 9, 2026
de68c47
Formatting
rcosta358 Jun 9, 2026
8bb6fb4
Minor Changes
rcosta358 Jun 9, 2026
ba977dc
Add VC Substitution
rcosta358 Jun 8, 2026
82eb3be
Add Comments
rcosta358 Jun 8, 2026
63a1c21
SimplifiedPredicate Follow-Up
rcosta358 Jun 8, 2026
36fd1fd
Add `simplifyOnce`
rcosta358 Jun 8, 2026
e8e07d5
Code Refactoring
rcosta358 Jun 9, 2026
27061e9
Add Comment
rcosta358 Jun 9, 2026
47c1844
Code Refactoring
rcosta358 Jun 9, 2026
a3b4f29
Add Fixed Point Iteration
rcosta358 Jun 9, 2026
659a139
Requested Changes
rcosta358 Jun 9, 2026
7f6f9d2
Rename
rcosta358 Jun 9, 2026
2e145d3
Replace `SimplifiedPredicate` with `SimplifiedVCImplication`
rcosta358 Jun 9, 2026
ba81c3a
Refactoring
rcosta358 Jun 9, 2026
43a0bef
Minor Change
rcosta358 Jun 9, 2026
fa7eff5
Add Tests
rcosta358 Jun 11, 2026
607e1b5
Change SimplifiedExpression to SimplifiedPredicate
rcosta358 Jun 8, 2026
0b060bb
Add VC Folding
rcosta358 Jun 9, 2026
7bb0632
Add Fixed Point Iteration
rcosta358 Jun 9, 2026
4c39689
Use SimplifiedVCImplication
rcosta358 Jun 9, 2026
981c63f
Refactoring
rcosta358 Jun 9, 2026
b374c66
Fix
rcosta358 Jun 9, 2026
67b05ce
Refactoring
rcosta358 Jun 9, 2026
9ffbe14
Add Comments
rcosta358 Jun 10, 2026
68c3b42
Refactoring
rcosta358 Jun 10, 2026
eab59f7
Refactoring
rcosta358 Jun 10, 2026
11be88b
Simplify VCFolding
rcosta358 Jun 10, 2026
84f9727
Add Tests
rcosta358 Jun 11, 2026
99131d4
Fixes
rcosta358 Jun 11, 2026
8cde2d2
Update Tests
rcosta358 Jun 11, 2026
ee3919c
Refactor Tests
rcosta358 Jun 11, 2026
cb0cb2e
Update VCImplicationGenerator
rcosta358 Jun 11, 2026
35895a3
Minor Changes
rcosta358 Jun 11, 2026
e4258aa
Minor Changes
rcosta358 Jun 12, 2026
804c7a6
Update Tests
rcosta358 Jun 12, 2026
1043d1a
Refactor Tests
rcosta358 Jun 12, 2026
9fc831a
Add Comments
rcosta358 Jun 13, 2026
b813bb7
Add VC Arithmetic Simplification
rcosta358 Jun 13, 2026
0a04e5b
Add Comments
rcosta358 Jun 13, 2026
e5d9162
Renaming
rcosta358 Jun 13, 2026
f4250de
Update Comments
rcosta358 Jun 13, 2026
334ff7e
Refactor Simplification Passes
rcosta358 Jun 13, 2026
eb9ff24
Add VC Logical Simplification
rcosta358 Jun 13, 2026
d8f9aee
Fix Origins
rcosta358 Jun 13, 2026
f9e4624
Fix Origins
rcosta358 Jun 13, 2026
63aeaf9
Fix Origins
rcosta358 Jun 13, 2026
28c5a0f
Refactor VC Simplification
rcosta358 Jun 14, 2026
8b148b0
Minor Changes
rcosta358 Jun 14, 2026
9bc108f
Minor Changes
rcosta358 Jun 14, 2026
8588a9d
Add VC Binder Simplification
rcosta358 Jun 14, 2026
5fbcef7
Return Null Origin for Unsimplified VCs
rcosta358 Jun 15, 2026
d068108
Fix VC Substitution
rcosta358 Jun 17, 2026
ca1ea40
Merge branch 'main' into fix-vc-substitution
rcosta358 Jun 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ private Optional<Substitution> findSubstitution(VCImplication implication) {
if (implication == null)
return Optional.empty();

Optional<Substitution> current = getSubstitution(implication);
Optional<Substitution> current = containsVar(implication.getNext(), implication.getName())
? getSubstitution(implication) : Optional.empty();
if (current.isPresent())
return current;

Expand Down Expand Up @@ -120,4 +121,15 @@ private boolean containsVar(Expression expression, String name) {
expression.getVariableNames(names);
return names.contains(name);
}

/**
* Checks whether a VC suffix contains a variable name
*/
private boolean containsVar(VCImplication implication, String name) {
for (VCImplication current = implication; current != null; current = current.getNext()) {
if (containsVar(current.getRefinement().getExpression(), name))
return true;
}
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,17 @@ void preservesRemainingBinderAfterSubstitution() {
}

@Test
void removesSourceNodeWhenItIsLastInChain() {
void keepsSourceNodeWhenItIsLastInChain() {
VCImplication implication = vc("x > 0", "∀y:int. y == 1");

assertSimplificationSteps(substitution::apply, implication, chain(expect("x > 0")));
assertSimplificationSteps(substitution::apply, implication, chain(expect("x > 0"), expect("y == 1")));
}

@Test
void keepsReturnBinderWhenConclusionIsSeparate() {
VCImplication implication = vc("∀x:int. true", "∀#ret_8:int. #ret_8 == x + 1");

assertSimplificationSteps(substitution::apply, implication, chain(expect("true"), expect("#ret⁸ == x + 1")));
}

@Test
Expand Down
Loading