Skip to content

Track Simplification Origins by Full VC Implication#262

Merged
rcosta358 merged 66 commits into
mainfrom
new-origins-approach
Jun 21, 2026
Merged

Track Simplification Origins by Full VC Implication#262
rcosta358 merged 66 commits into
mainfrom
new-origins-approach

Conversation

@rcosta358

Copy link
Copy Markdown
Collaborator

Description

This PR refactors VC simplification origin tracking. Instead of storing origins on individual VCImplication nodes, each simplification step now records the complete VC implication chain through a new VCSimplificationResult.

Example

VCSimplificationResult result = VCSimplification.simplifyToFixedPoint(implication);

VCImplication simplified = result.getImplication();
VCSimplificationResult origin = result.getOrigin();

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 18, 2026
@rcosta358 rcosta358 added the simplification Related to the simplification of expressions label Jun 18, 2026

@CatarinaGamboa CatarinaGamboa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is easier to explain than the previous ideas

this.refinement = ref;
}

public VCImplication getOrigin() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

/**
* Result of simplifying VC implication chain
*/
public final class VCSimplificationResult {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldnt this extend VCSimplification but just with a new field for origin? Then we could use them interchangeably. This also works and maybe is less confusing but it would be nice to use the result without doing .getImplication

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's definitely less confusing this way, but I can explore that idea in the future.

@rcosta358 rcosta358 changed the base branch from simplification-migration to main June 21, 2026 21:44
@rcosta358 rcosta358 force-pushed the new-origins-approach branch from 6072503 to 6512612 Compare June 21, 2026 21:57
@rcosta358 rcosta358 merged commit bbdaaa5 into main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

simplification Related to the simplification of expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants