Skip to content

Commit 7599622

Browse files
Confused !
1 parent 6be724b commit 7599622

File tree

2 files changed

+20
-81
lines changed

2 files changed

+20
-81
lines changed

src/org/sosy_lab/java_smt/solvers/stp/StpAbstractProver.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,18 @@ public void pop() {
5959
StpJavaApi.vc_pop(currVC);
6060
}
6161

62-
/*
63-
* @Override public @Nullable T addConstraint(BooleanFormula pConstraint) throws
64-
* InterruptedException { // TODO Auto-generated method stub return null; }
65-
*
66-
* @Override public void push() { // TODO Auto-generated method stub
67-
*
68-
* }
69-
*/
62+
@Override
63+
public void push() {
64+
Preconditions.checkState(!closed);
65+
StpJavaApi.vc_push(currVC);
66+
}
7067

7168
@Override
7269
public boolean isUnsat() throws SolverException, InterruptedException {
7370
// TODO update to use vc_query_with_timeout
7471

72+
// To go this route I will have to implement the Stack for the "Constraints" ?!
73+
7574
// Preconditions.checkState(!closed);
7675
// int result = StpJavaApi.vc_query(curVC, queryExpr)
7776
// if (result == 0) {
@@ -94,7 +93,8 @@ public boolean isUnsatWithAssumptions(Collection<BooleanFormula> pAssumptions)
9493
}
9594

9695
@Override
97-
public Model getModel() throws SolverException {
96+
public <R> R allSat(AllSatCallback<R> pCallback, List<BooleanFormula> pImportant)
97+
throws InterruptedException, SolverException {
9898
// TODO Auto-generated method stub
9999
return null;
100100
}
@@ -113,6 +113,14 @@ public List<BooleanFormula> getUnsatCore() {
113113
return null;
114114
}
115115

116+
@Override
117+
public Model getModel() throws SolverException {
118+
// TODO Auto-generated method stub
119+
120+
// I don't understand this model stuff.
121+
return null;
122+
}
123+
116124
@Override
117125
public void close() {
118126
if (!closed) {
@@ -124,11 +132,4 @@ public void close() {
124132
}
125133
}
126134

127-
@Override
128-
public <R> R allSat(AllSatCallback<R> pCallback, List<BooleanFormula> pImportant)
129-
throws InterruptedException, SolverException {
130-
// TODO Auto-generated method stub
131-
return null;
132-
}
133-
134-
}
135+
}

src/org/sosy_lab/java_smt/solvers/stp/StpTheoremProver.java

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,12 @@
1919
*/
2020
package org.sosy_lab.java_smt.solvers.stp;
2121

22-
import com.google.common.base.Preconditions;
23-
import java.util.Collection;
24-
import java.util.List;
25-
import java.util.Optional;
2622
import java.util.Set;
2723
import org.checkerframework.checker.nullness.qual.Nullable;
2824
import org.sosy_lab.common.ShutdownNotifier;
2925
import org.sosy_lab.java_smt.api.BooleanFormula;
30-
import org.sosy_lab.java_smt.api.Model;
3126
import org.sosy_lab.java_smt.api.ProverEnvironment;
3227
import org.sosy_lab.java_smt.api.SolverContext.ProverOptions;
33-
import org.sosy_lab.java_smt.api.SolverException;
3428

3529
class StpTheoremProver extends StpAbstractProver<Void> implements ProverEnvironment {
3630

@@ -42,67 +36,11 @@ protected StpTheoremProver(
4236
super(pContext, pOptions, pFrmcreator, pShutdownNotifier);
4337
}
4438

45-
@Override
46-
public void pop() {
47-
// TODO Auto-generated method stub
48-
49-
}
50-
5139
@Override
5240
public @Nullable Void addConstraint(BooleanFormula pConstraint) throws InterruptedException {
5341
// TODO Auto-generated method stub
54-
return null;
55-
}
56-
57-
@Override
58-
public void push() {
59-
Preconditions.checkState(!closed);
60-
StpJavaApi.vc_push(currVC);
61-
}
62-
//
63-
// @Override
64-
// public boolean isUnsat() throws SolverException, InterruptedException {
65-
// // TODO Auto-generated method stub
66-
// return false;
67-
// }
68-
69-
// @Override
70-
// public boolean isUnsatWithAssumptions(Collection<BooleanFormula> pAssumptions)
71-
// throws SolverException, InterruptedException {
72-
// // TODO Auto-generated method stub
73-
// return false;
74-
// }
75-
76-
@Override
77-
public Model getModel() throws SolverException {
78-
// TODO Auto-generated method stub
79-
return null;
80-
}
81-
82-
@Override
83-
public List<BooleanFormula> getUnsatCore() {
84-
// TODO Auto-generated method stub
85-
return null;
86-
}
87-
88-
@Override
89-
public Optional<List<BooleanFormula>>
90-
unsatCoreOverAssumptions(Collection<BooleanFormula> pAssumptions)
91-
throws SolverException, InterruptedException {
92-
// TODO Auto-generated method stub
93-
return null;
94-
}
95-
96-
@Override
97-
public void close() {
98-
// TODO Auto-generated method stub
99-
100-
}
101-
102-
@Override
103-
public <R> R allSat(AllSatCallback<R> pCallback, List<BooleanFormula> pImportant)
104-
throws InterruptedException, SolverException {
105-
// TODO Auto-generated method stub
42+
// It seems the only option is to implement the stack
43+
// and hence make pop and push work with it
10644
return null;
10745
}
10846

0 commit comments

Comments
 (0)