Skip to content
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

Add solver independent quantifier elimination with ultimate eliminator #462

Draft
wants to merge 79 commits into
base: master
Choose a base branch
from

Conversation

Anastasia-Gu
Copy link
Collaborator

  1. added dependencies for UltimateEliminator in ivy.xml
  2. Integrated classes needed for UltimateEliminator in JavaSMT
  3. Created UltimateEliminatorWrapper class and equipped with a utility class UltimateEliminatorParser
  4. Created options in ProverOptions(SolverContext)
  5. Implemented the method EliminateQuantifiersUltimateEliminator in AbtractQuantifiedFormulaManager
  6. Implemented MkWithoutQuantifier in AbtractQuantifiedFormulaManager for when quantifier elimination is done before the native solver gets the formula.
    (To get the right formula information: with visitor get the name and type of bound variables)
  7. Tests

BaierD and others added 30 commits November 13, 2024 16:57
format code
add missing UltimateEliminator dependencies
…k most solvers (now 152 tests run over all solvers compared to 89 before)
…ion_with_ultimate_eliminator

# Conflicts:
#	.idea/JavaSMT.iml
#	lib/ivy.xml
#	src/org/sosy_lab/java_smt/solvers/princess/PrincessSolverContext.java
#	src/org/sosy_lab/java_smt/test/RationalFormulaManagerTest.java
…er_elimination_with_ultimate_eliminator

# Conflicts:
#	src/org/sosy_lab/java_smt/solvers/boolector/BoolectorQuantifiedFormulaManager.java
#	src/org/sosy_lab/java_smt/solvers/mathsat5/Mathsat5NativeApi.java
#	src/org/sosy_lab/java_smt/test/QuantifierManagerTest.java
…to EXTERNAL_QUANTIFIER_CREATION for more clarity
@Anastasia-Gu Anastasia-Gu requested a review from baierd March 20, 2025 22:22
@Anastasia-Gu Anastasia-Gu self-assigned this Mar 20, 2025
@@ -32,7 +54,78 @@ private BooleanFormula wrap(TFormulaInfo formulaInfo) {
@Override
public BooleanFormula eliminateQuantifiers(BooleanFormula pF)
throws InterruptedException, SolverException {
return wrap(eliminateQuantifiers(extractInfo(pF)));
if (options != null
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like a switch-case expression.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How should I approach this? My options array is not compatible for switch-case.

return fmgr.orElseThrow();
}

public void setFmgr(AbstractFormulaManager<TFormulaInfo, TType, TEnv, TFuncDecl> pFmgr) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be public. You can simply add this method to the AbstractSolverContexts constructor, so that it is always used if there is a QuantifiedFormulaManager present. This makes it possible to handle it fully automatically and reduce the visibility to protected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To use it in the AbstractSolverContexts constructor, I would have to add it to the QuantifiedFormulaManager Interface, which would implicitly make it public again.

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.

2 participants