Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
13 changes: 13 additions & 0 deletions src/org/sosy_lab/java_smt/SolverContextFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.sosy_lab.java_smt.solvers.smtinterpol.SmtInterpolSolverContext;
import org.sosy_lab.java_smt.solvers.yices2.Yices2SolverContext;
import org.sosy_lab.java_smt.solvers.z3.Z3SolverContext;
import org.sosy_lab.java_smt.solvers.z3legacy.Z3LegacySolverContext;

/**
* Factory class for loading and generating solver contexts. Generates a {@link SolverContext}
Expand All @@ -55,6 +56,7 @@ public enum Solvers {
MATHSAT5,
SMTINTERPOL,
Z3,
Z3LEGACY,
Copy link
Contributor

Choose a reason for hiding this comment

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

@kfriedberger @PhilippWendler @leventeBajczi i kinda feel like Z3 legacy is a little unspecific. Since the version is fixed, should we use the actual version? I.e. Z3-3.5?

Copy link
Member

Choose a reason for hiding this comment

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

The solver is able to provide its version string anyway. As it is a version of Z3 with interpolation support, we might name it Z3_INTERPOLATION or simply Z3_3_5 . Special chars like dots or hyphens are not allowed in Java enums.

The JavaSMT enum it independent of the native library, so the library can be called z3Legacy or similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like encoding the version (Z3_INTERPOLATION could I think be confused with iZ3), so I changed it to Z3_4_5_0.

PRINCESS,
BOOLECTOR,
CVC4,
Expand Down Expand Up @@ -290,6 +292,17 @@ private SolverContext generateContext0(Solvers solverToCreate)
nonLinearArithmetic,
loader);

case Z3LEGACY:
return Z3LegacySolverContext.create(
logger,
config,
shutdownNotifier,
logfile,
randomSeed,
floatingPointRoundingMode,
nonLinearArithmetic,
loader);

case PRINCESS:
return PrincessSolverContext.create(
config, shutdownNotifier, logfile, (int) randomSeed, nonLinearArithmetic);
Expand Down
Loading