Skip to content

#381 improve interpolation behaviour#382

Merged
kfriedberger merged 6 commits into
masterfrom
381-interpolation-api-improvements
Jul 4, 2024
Merged

#381 improve interpolation behaviour#382
kfriedberger merged 6 commits into
masterfrom
381-interpolation-api-improvements

Conversation

@kfriedberger

@kfriedberger kfriedberger commented Jun 29, 2024

Copy link
Copy Markdown
Member

see #381 for details

Returning the asserted term itself can cause problems
if the calling context assumes uniqueness.
Previously, we tracked a single ID per asserted constraint.
If we added the same constraint several times, the solver can return distinct IDs.
The solution is a switch from Map to Multimap, to track all IDs.

@baierd baierd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This fixes the issue nicely. And besides the 2 small change requests this can be merged with no issues.

Comment thread src/org/sosy_lab/java_smt/test/InterpolatingProverTest.java Outdated
solver.assertFormula(exp);
}
return null;
String id = "ID_" + ID_GENERATOR.getFreshId();

@baierd baierd Jul 2, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I totally get what you are doing here. But wouldn't it be better to create a new class (InterpolationPoint?) that wraps this ID to make the intention clear for user and future developers?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

InterpolationPoint is a quite special use-case. Some solvers also use those references for unsat-cores or model generation. We can think about it independently of this issue. Maybe name the reference to something like FormulaBacktrackPoint.

…ints and remove unneeded warning suppressions
@kfriedberger kfriedberger merged commit 86f4a11 into master Jul 4, 2024
@kfriedberger kfriedberger deleted the 381-interpolation-api-improvements branch July 4, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

interpolation can only be done over previously asserted formulas when re-adding constraints

2 participants