Skip to content

Commit e467796

Browse files
before rebuilding the API binding (for many reasons)
1 parent d343022 commit e467796

17 files changed

+1188
-1
lines changed

src/org/sosy_lab/java_smt/SolverContextFactory.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import org.sosy_lab.java_smt.solvers.mathsat5.Mathsat5SolverContext;
5555
import org.sosy_lab.java_smt.solvers.princess.PrincessSolverContext;
5656
import org.sosy_lab.java_smt.solvers.smtinterpol.SmtInterpolSolverContext;
57+
import org.sosy_lab.java_smt.solvers.stp.StpSolverContext;
5758

5859
/**
5960
* Factory class for loading and generating solver contexts. Generates a {@link SolverContext}
@@ -68,7 +69,8 @@ public enum Solvers {
6869
MATHSAT5,
6970
SMTINTERPOL,
7071
Z3,
71-
PRINCESS
72+
PRINCESS,
73+
STP
7274
}
7375

7476
@Option(secure = true, description = "Export solver queries in SmtLib format into a file.")
@@ -214,6 +216,8 @@ private SolverContext generateContext0(Solvers solverToCreate)
214216
case PRINCESS:
215217
return PrincessSolverContext.create(
216218
config, shutdownNotifier, logfile, (int) randomSeed, nonLinearArithmetic);
219+
case STP:
220+
return StpSolverContext.create(config, logger, shutdownNotifier, logfile, randomSeed);
217221

218222
default:
219223
throw new AssertionError("no solver selected");
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* JavaSMT is an API wrapper for a collection of SMT solvers.
3+
* This file is part of JavaSMT.
4+
*
5+
* Copyright (C) 2007-2019 Dirk Beyer
6+
* All rights reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
package org.sosy_lab.java_smt.native_api.stp;
21+
//TODO REBUILD STP API Binding change package name = ~.solver.stp and class name = StpJavaApi
22+
23+
public class Testing extends VC {
24+
25+
protected Testing(long pArg0, boolean pArg1) {
26+
super(pArg0, pArg1);
27+
28+
Type t = new Type(pArg0, pArg1);
29+
}
30+
31+
}
32+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
*
3+
*/
4+
package org.sosy_lab.java_smt.native_api.stp;
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*
2+
* JavaSMT is an API wrapper for a collection of SMT solvers.
3+
* This file is part of JavaSMT.
4+
*
5+
* Copyright (C) 2007-2019 Dirk Beyer
6+
* All rights reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
package org.sosy_lab.java_smt.solvers.stp;
21+
22+
import java.util.Collection;
23+
import java.util.List;
24+
import java.util.Optional;
25+
import java.util.Set;
26+
import org.checkerframework.checker.nullness.qual.Nullable;
27+
import org.sosy_lab.java_smt.api.BooleanFormula;
28+
import org.sosy_lab.java_smt.api.Model;
29+
import org.sosy_lab.java_smt.api.SolverContext.ProverOptions;
30+
import org.sosy_lab.java_smt.api.SolverException;
31+
import org.sosy_lab.java_smt.basicimpl.AbstractProver;
32+
33+
class StpAbstractProver<T> extends AbstractProver<T> {
34+
35+
protected StpAbstractProver(Set<ProverOptions> pOptions) {
36+
super(pOptions);
37+
// TODO Auto-generated constructor stub
38+
}
39+
40+
@Override
41+
public void pop() {
42+
// TODO Auto-generated method stub
43+
44+
}
45+
46+
@Override
47+
public @Nullable T addConstraint(BooleanFormula pConstraint) throws InterruptedException {
48+
// TODO Auto-generated method stub
49+
return null;
50+
}
51+
52+
@Override
53+
public void push() {
54+
// TODO Auto-generated method stub
55+
56+
}
57+
58+
@Override
59+
public boolean isUnsat() throws SolverException, InterruptedException {
60+
// TODO Auto-generated method stub
61+
return false;
62+
}
63+
64+
@Override
65+
public boolean isUnsatWithAssumptions(Collection<BooleanFormula> pAssumptions)
66+
throws SolverException, InterruptedException {
67+
// TODO Auto-generated method stub
68+
return false;
69+
}
70+
71+
@Override
72+
public Model getModel() throws SolverException {
73+
// TODO Auto-generated method stub
74+
return null;
75+
}
76+
77+
@Override
78+
public List<BooleanFormula> getUnsatCore() {
79+
// TODO Auto-generated method stub
80+
return null;
81+
}
82+
83+
@Override
84+
public Optional<List<BooleanFormula>>
85+
unsatCoreOverAssumptions(Collection<BooleanFormula> pAssumptions)
86+
throws SolverException, InterruptedException {
87+
// TODO Auto-generated method stub
88+
return null;
89+
}
90+
91+
@Override
92+
public void close() {
93+
// TODO Auto-generated method stub
94+
95+
}
96+
97+
@Override
98+
public <R> R allSat(AllSatCallback<R> pCallback, List<BooleanFormula> pImportant)
99+
throws InterruptedException, SolverException {
100+
// TODO Auto-generated method stub
101+
return null;
102+
}
103+
104+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* JavaSMT is an API wrapper for a collection of SMT solvers.
3+
* This file is part of JavaSMT.
4+
*
5+
* Copyright (C) 2007-2019 Dirk Beyer
6+
* All rights reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
package org.sosy_lab.java_smt.solvers.stp;
21+
22+
import org.sosy_lab.java_smt.api.Formula;
23+
import org.sosy_lab.java_smt.api.FormulaType;
24+
import org.sosy_lab.java_smt.basicimpl.AbstractArrayFormulaManager;
25+
import org.sosy_lab.java_smt.basicimpl.FormulaCreator;
26+
27+
class StpArrayFormulaManager
28+
extends AbstractArrayFormulaManager<Long, Long, Long, Long> {
29+
30+
public StpArrayFormulaManager(FormulaCreator<Long, Long, Long, Long> pFormulaCreator) {
31+
super(pFormulaCreator);
32+
// TODO Auto-generated constructor stub
33+
}
34+
35+
@Override
36+
protected Long select(Long pArray, Long pIndex) {
37+
// TODO Auto-generated method stub
38+
return null;
39+
}
40+
41+
@Override
42+
protected Long store(Long pArray, Long pIndex, Long pValue) {
43+
// TODO Auto-generated method stub
44+
return null;
45+
}
46+
47+
@Override
48+
protected <TI extends Formula, TE extends Formula> Long
49+
internalMakeArray(String pName, FormulaType<TI> pIndexType, FormulaType<TE> pElementType) {
50+
// TODO Auto-generated method stub
51+
return null;
52+
}
53+
54+
@Override
55+
protected Long equivalence(Long pArray1, Long pArray2) {
56+
// TODO Auto-generated method stub
57+
return null;
58+
}
59+
60+
}

0 commit comments

Comments
 (0)