-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,19 +59,18 @@ public void pop() { | |
StpJavaApi.vc_pop(currVC); | ||
} | ||
|
||
/* | ||
* @Override public @Nullable T addConstraint(BooleanFormula pConstraint) throws | ||
* InterruptedException { // TODO Auto-generated method stub return null; } | ||
* | ||
* @Override public void push() { // TODO Auto-generated method stub | ||
* | ||
* } | ||
*/ | ||
@Override | ||
public void push() { | ||
Preconditions.checkState(!closed); | ||
StpJavaApi.vc_push(currVC); | ||
} | ||
|
||
@Override | ||
public boolean isUnsat() throws SolverException, InterruptedException { | ||
// TODO update to use vc_query_with_timeout | ||
|
||
// To go this route I will have to implement the Stack for the "Constraints" ?! | ||
|
||
This comment has been minimized.
Sorry, something went wrong. |
||
// Preconditions.checkState(!closed); | ||
This comment has been minimized.
Sorry, something went wrong.
refactormyself
Author
Contributor
|
||
// int result = StpJavaApi.vc_query(curVC, queryExpr) | ||
// if (result == 0) { | ||
|
@@ -94,7 +93,8 @@ public boolean isUnsatWithAssumptions(Collection<BooleanFormula> pAssumptions) | |
} | ||
|
||
@Override | ||
public Model getModel() throws SolverException { | ||
public <R> R allSat(AllSatCallback<R> pCallback, List<BooleanFormula> pImportant) | ||
throws InterruptedException, SolverException { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
@@ -113,6 +113,14 @@ public List<BooleanFormula> getUnsatCore() { | |
return null; | ||
} | ||
|
||
@Override | ||
public Model getModel() throws SolverException { | ||
// TODO Auto-generated method stub | ||
|
||
// I don't understand this model stuff. | ||
return null; | ||
This comment has been minimized.
Sorry, something went wrong.
kfriedberger
Member
|
||
} | ||
|
||
@Override | ||
public void close() { | ||
if (!closed) { | ||
|
@@ -124,11 +132,4 @@ public void close() { | |
} | ||
} | ||
|
||
@Override | ||
public <R> R allSat(AllSatCallback<R> pCallback, List<BooleanFormula> pImportant) | ||
throws InterruptedException, SolverException { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,18 +19,12 @@ | |
*/ | ||
package org.sosy_lab.java_smt.solvers.stp; | ||
|
||
import com.google.common.base.Preconditions; | ||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.Optional; | ||
import java.util.Set; | ||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
import org.sosy_lab.common.ShutdownNotifier; | ||
import org.sosy_lab.java_smt.api.BooleanFormula; | ||
import org.sosy_lab.java_smt.api.Model; | ||
import org.sosy_lab.java_smt.api.ProverEnvironment; | ||
import org.sosy_lab.java_smt.api.SolverContext.ProverOptions; | ||
import org.sosy_lab.java_smt.api.SolverException; | ||
|
||
class StpTheoremProver extends StpAbstractProver<Void> implements ProverEnvironment { | ||
|
||
|
@@ -42,67 +36,11 @@ protected StpTheoremProver( | |
super(pContext, pOptions, pFrmcreator, pShutdownNotifier); | ||
} | ||
|
||
@Override | ||
public void pop() { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public @Nullable Void addConstraint(BooleanFormula pConstraint) throws InterruptedException { | ||
This comment has been minimized.
Sorry, something went wrong.
refactormyself
Author
Contributor
|
||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public void push() { | ||
Preconditions.checkState(!closed); | ||
StpJavaApi.vc_push(currVC); | ||
} | ||
// | ||
// @Override | ||
// public boolean isUnsat() throws SolverException, InterruptedException { | ||
// // TODO Auto-generated method stub | ||
// return false; | ||
// } | ||
|
||
// @Override | ||
// public boolean isUnsatWithAssumptions(Collection<BooleanFormula> pAssumptions) | ||
// throws SolverException, InterruptedException { | ||
// // TODO Auto-generated method stub | ||
// return false; | ||
// } | ||
|
||
@Override | ||
public Model getModel() throws SolverException { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public List<BooleanFormula> getUnsatCore() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public Optional<List<BooleanFormula>> | ||
unsatCoreOverAssumptions(Collection<BooleanFormula> pAssumptions) | ||
throws SolverException, InterruptedException { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public void close() { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public <R> R allSat(AllSatCallback<R> pCallback, List<BooleanFormula> pImportant) | ||
throws InterruptedException, SolverException { | ||
// TODO Auto-generated method stub | ||
// It seems the only option is to implement the stack | ||
// and hence make pop and push work with it | ||
return null; | ||
} | ||
|
||
|
Why? All asserted formulae should be on the internal stack. Thus, a simple sat-check should already check their conjunction.