-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
293 cvc5 interpolation #320
Conversation
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
src/org/sosy_lab/java_smt/solvers/cvc5/CVC5InterpolatingProver.java
Outdated
Show resolved
Hide resolved
I needed to disable following Tests because CVC5s
|
So there is 1 test failing iff the internal assertions of getInterpolant() for CVC5 are active. To be concrete, its only this line |
… as it falsifies later SAT checks somehow
Do not directly implement special cases, if the default code already gives the same result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my side, the code looks valid, under the assumption that CVC5 provides valid interpolants.
PR approved!
Future work:
- Some unit tests should be analyzed in detail whether CVC5 can be improved.
- Testing of interpolation on larger SMT queries should be done, e.g., within CPAchecker with predicate analysis or impact algorithm.
I published a preliminary development-version of JavaSMT including PR (CVC5-interpolation) into Ivy. It is available with version A first look at benchmark results from SV-COMP shows some solved files with CVC5 and predicate analysis, but there is room for improvement. The JavaSMT-bindings from this PR seem to work well. |
I did a quick benchmark on predicate analysis with CPAchecker, with integer-based formula-encoding (no bitvectors!). Result are here:
The interesting thing might be the quantile plot: In short: There are several cases where the analysis reports a repeated counterexample path when using CVC5. This might be caused by invalid interpolants and needs to be checked in detail.
|
…ted individual interpolation. CVC5 is the first solver to fulfill a criteria, that was already documented as such a long time ago: A solver does not need to return sequential interpolants when queried for individual interpolants.
Analysis of a problematic task from last benchmark execution, including a comparison of MathSAT5 and CVC5I used the following example, because the input file is quite short and simple:
The A specific interpolation query was suspicious, coming from three input formulas. The query appears when unroling the loop in the program once. Shorted/simplified formulas given here (see unit test added in 7a1676e):
CPAchecker (especially predicate analysis) requires sequential interpolants for the refinement. For the given formulas, the interpolation query should be For those two queries, MathSAT5 produces In general, querying individual interpolants from a sequence of formulas is not the best way to go (nicely documented nearly 7 years ago), and CPAchecker has already an option, such that the problematic query is avoided: New benchmark resultsA new benchmark show better results and avoids this problem:
The latest data of CVC5 is "dark-blue". However CVC5 still has some other issues with interpolation:
Those problems might not be within the scope of this PR. |
… which are Iterables of nested Terms. Lets better use a Set-builder here.
This is an optimization and disables the previous direct validation.
Is there anything left to do before merging? I would like to merge this PR soon. |
Implements CVC5 Interpolation, following the Definition of Craig-Interpolation.