File tree Expand file tree Collapse file tree 5 files changed +98
-6
lines changed
src/org/sosy_lab/java_smt/solvers/opensmt Expand file tree Collapse file tree 5 files changed +98
-6
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,12 @@ static SMTConfig getConfigInstance(
7979 config .setOption (":print-cores-full" , optUnsatCore );
8080 config .setOption (":produce-interpolants" , new SMTOption (interpolation ));
8181 if (interpolation ) {
82- config .setOption (":interpolation-bool-algorithm" , new SMTOption (pSolverOptions .algBool ));
83- config .setOption (":interpolation-euf-algorithm" , new SMTOption (pSolverOptions .algUf ));
84- config .setOption (":interpolation-lra-algorithm" , new SMTOption (pSolverOptions .algLra ));
82+ config .setOption (
83+ ":interpolation-bool-algorithm" , new SMTOption (pSolverOptions .algBool .getValue ()));
84+ config .setOption (
85+ ":interpolation-euf-algorithm" , new SMTOption (pSolverOptions .algUf .getValue ()));
86+ config .setOption (
87+ ":interpolation-lra-algorithm" , new SMTOption (pSolverOptions .algLra .getValue ()));
8588 config .setOption (
8689 ":simplify-interpolants" , new SMTOption (pSolverOptions .simplifyInterpolants ));
8790 }
Original file line number Diff line number Diff line change 2626import org .sosy_lab .java_smt .basicimpl .AbstractNumeralFormulaManager .NonLinearArithmetic ;
2727import org .sosy_lab .java_smt .basicimpl .AbstractSolverContext ;
2828import org .sosy_lab .java_smt .solvers .opensmt .api .LogicFactory ;
29+ import org .sosy_lab .java_smt .solvers .opensmt .interpolationAlgorithms .Core ;
30+ import org .sosy_lab .java_smt .solvers .opensmt .interpolationAlgorithms .LA ;
31+ import org .sosy_lab .java_smt .solvers .opensmt .interpolationAlgorithms .UF ;
2932
3033public final class OpenSmtSolverContext extends AbstractSolverContext {
3134 private final OpenSmtFormulaCreator creator ;
@@ -46,13 +49,13 @@ static class OpenSMTOptions {
4649 Logics logic = Logics .QF_AUFLIRA ;
4750
4851 @ Option (secure = true , description = "Algorithm for boolean interpolation" )
49- int algBool = 0 ;
52+ Core algBool = Core . MCMILLAN ;
5053
5154 @ Option (secure = true , description = "Algorithm for UF interpolation" )
52- int algUf = 0 ;
55+ UF algUf = UF . STRONG ;
5356
5457 @ Option (secure = true , description = "Algorithm for LRA interpolation" )
55- int algLra = 0 ;
58+ LA algLra = LA . STRONG ;
5659
5760 @ IntegerOption (min = 0 , max = 4 )
5861 @ Option (
Original file line number Diff line number Diff line change 1+ /*
2+ * This file is part of JavaSMT,
3+ * an API wrapper for a collection of SMT solvers:
4+ * https://github.com/sosy-lab/java-smt
5+ *
6+ * SPDX-FileCopyrightText: 2024 Dirk Beyer <https://www.sosy-lab.org>
7+ *
8+ * SPDX-License-Identifier: Apache-2.0
9+ */
10+
11+ package org .sosy_lab .java_smt .solvers .opensmt .interpolationAlgorithms ;
12+
13+ public enum Core {
14+ MCMILLAN (0 ),
15+ PUDLAK (1 ),
16+ MCMILLAN_PRIME (2 ),
17+ PROOF_SENSITIVE (3 ),
18+ PROOF_SENSITIVE_WEAK (4 ),
19+ PROOF_SENSITIVE_STRONG (5 );
20+
21+ private final int value ;
22+
23+ Core (int i ) {
24+ value = i ;
25+ }
26+
27+ public int getValue () {
28+ return value ;
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * This file is part of JavaSMT,
3+ * an API wrapper for a collection of SMT solvers:
4+ * https://github.com/sosy-lab/java-smt
5+ *
6+ * SPDX-FileCopyrightText: 2024 Dirk Beyer <https://www.sosy-lab.org>
7+ *
8+ * SPDX-License-Identifier: Apache-2.0
9+ */
10+
11+ package org .sosy_lab .java_smt .solvers .opensmt .interpolationAlgorithms ;
12+
13+ public enum LA {
14+ STRONG (0 ),
15+ WEAK (2 ),
16+ FACTOR (3 ),
17+ DECOMPOSING_STRONG (4 ),
18+ DECOMPOSING_WEAK (5 );
19+
20+ private final int value ;
21+
22+ LA (int i ) {
23+ value = i ;
24+ }
25+
26+ public int getValue () {
27+ return value ;
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * This file is part of JavaSMT,
3+ * an API wrapper for a collection of SMT solvers:
4+ * https://github.com/sosy-lab/java-smt
5+ *
6+ * SPDX-FileCopyrightText: 2024 Dirk Beyer <https://www.sosy-lab.org>
7+ *
8+ * SPDX-License-Identifier: Apache-2.0
9+ */
10+
11+ package org .sosy_lab .java_smt .solvers .opensmt .interpolationAlgorithms ;
12+
13+ public enum UF {
14+ STRONG (0 ),
15+ WEAK (2 ),
16+ RANDOM (3 );
17+
18+ private final int value ;
19+
20+ UF (int i ) {
21+ value = i ;
22+ }
23+
24+ public int getValue () {
25+ return value ;
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments