SMTSolver.ReasonOfInterruption, SMTSolver.SolverState| Modifier and Type | Field and Description |
|---|---|
private Throwable |
exception
If there was an exception while executing the solver it is stored in
this attribute
|
private Collection<Throwable> |
exceptionsForTacletTranslation |
private int |
ID |
private static int |
IDCounter |
private SolverListener |
listener
It is possible that a solver has a listener.
|
private ReentrantLock |
lockInterruptionVariable
This lock variable is responsible for the attribute
reasonOfInterruption |
private ReentrantLock |
lockStateVariable
This lock variable is responsible for the state variable
sovlerState |
private SMTProblem |
problem
The SMT problem that is related to this solver
|
private String |
problemString
Stores the translation of the problem that is associated with this
solver
|
private ProblemTypeInformation |
problemTypeInformation
This holds information relevant for retrieving information on a model
from an SMT instance.
|
private ExternalProcessLauncher<SolverCommunication> |
processLauncher
starts a external process and returns the result
|
private ModelExtractor |
query |
private SMTSolver.ReasonOfInterruption |
reasonOfInterruption |
private Services |
services
The services object is stored in order to have the possibility to
access it in every method
|
private SMTSettings |
smtSettings
Strores the settings that are used for the execution.
|
private AbstractSolverSocket |
socket |
private SolverCommunication |
solverCommunication
The record of the communication between KeY and the given solver.
|
private SMTSolver.SolverState |
solverState |
private SolverTimeout |
solverTimeout
The timeout that is associated with this solver.
|
private TacletSetTranslation |
tacletTranslation
Stores the taclet translation that is associated with this solver.
|
private Thread |
thread
The thread that is associated with this solver.
|
private SolverType |
type |
| Constructor and Description |
|---|
SMTSolverImplementation(SMTProblem problem,
SolverListener listener,
Services services,
SolverType myType) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getException()
If there has occurred an exception while executing the solver process,
the method returns this exceptions, otherwise
null |
Collection<Throwable> |
getExceptionsOfTacletTranslation()
Returns the exceptions that has been thrown while translating taclets into assumptions.
|
SMTSolverResult |
getFinalResult()
Returns the result of the execution.
|
SMTProblem |
getProblem()
Returns the SMT Problem that is connected to this solver process.
|
ModelExtractor |
getQuery() |
SMTSolver.ReasonOfInterruption |
getReasonOfInterruption()
Returns the reason of the interruption: see
ReasonOfInterruption. |
AbstractSolverSocket |
getSocket() |
String |
getSolverOutput()
Returns the solver output without any change.
|
long |
getStartTime()
Returns the system time when the solver was started.
|
SMTSolver.SolverState |
getState()
Returns the current state of the solver.
|
TacletSetTranslation |
getTacletTranslation()
Returns the taclet translation that is used as assumptions.
|
long |
getTimeout()
Returns the amount of milliseconds after a timeout occurs.
|
String |
getTranslation()
Returns the translation of the SMTProblem that is handed over to the
solver process.
|
SolverType |
getType()
Returns the type of the solver process.
|
private static String |
indent(String string) |
void |
interrupt(SMTSolver.ReasonOfInterruption reason)
Use this method in order to interrupt a running solver process.
|
private void |
interruptionOccurred(Throwable e) |
boolean |
isRunning()
Returns
true if the solver process is running else
false. |
String |
name()
Returns the name of the solver.
|
void |
run() |
void |
setQuery(ModelExtractor query) |
void |
setReasonOfInterruption(SMTSolver.ReasonOfInterruption reasonOfInterruption) |
private void |
setReasonOfInterruption(SMTSolver.ReasonOfInterruption reasonOfInterruption,
Throwable exc) |
private void |
setSolverState(SMTSolver.SolverState value) |
void |
start(SolverTimeout timeout,
SMTSettings settings)
Starts a solver process.
|
String |
toString() |
private String[] |
translateToCommand(Term term) |
boolean |
wasInterrupted()
Returns
true if the solver process was interrupted by an
user, an exception or a timeout. |
private static int IDCounter
private final int ID
private AbstractSolverSocket socket
private ModelExtractor query
private SMTProblem problem
private SolverListener listener
private ExternalProcessLauncher<SolverCommunication> processLauncher
private Services services
private SolverCommunication solverCommunication
private ProblemTypeInformation problemTypeInformation
private ReentrantLock lockStateVariable
sovlerStateprivate ReentrantLock lockInterruptionVariable
reasonOfInterruptionprivate Thread thread
private SolverTimeout solverTimeout
private SMTSolver.ReasonOfInterruption reasonOfInterruption
private SMTSolver.SolverState solverState
private final SolverType type
private SMTSettings smtSettings
private String problemString
private TacletSetTranslation tacletTranslation
private Throwable exception
private Collection<Throwable> exceptionsForTacletTranslation
SMTSolverImplementation(SMTProblem problem, SolverListener listener, Services services, SolverType myType)
public ModelExtractor getQuery()
public void setQuery(ModelExtractor query)
public void start(SolverTimeout timeout, SMTSettings settings)
SolverLauncher. If you want to start a
solver please have a look at SolverLauncher.timeout - settings - public SMTSolver.ReasonOfInterruption getReasonOfInterruption()
SMTSolverReasonOfInterruption.getReasonOfInterruption in interface SMTSolverpublic Throwable getException()
SMTSolvernullgetException in interface SMTSolverpublic SMTProblem getProblem()
SMTSolvernull in
order to maintain thread safety.getProblem in interface SMTSolverpublic void setReasonOfInterruption(SMTSolver.ReasonOfInterruption reasonOfInterruption)
private void setReasonOfInterruption(SMTSolver.ReasonOfInterruption reasonOfInterruption, Throwable exc)
public SolverType getType()
SMTSolverpublic long getStartTime()
SMTSolvergetStartTime in interface SMTSolverpublic long getTimeout()
SMTSolvergetTimeout in interface SMTSolverpublic SMTSolver.SolverState getState()
SMTSolverWaiting<\code>: The solver process is waiting for the start signal
Running<\code>: The solver process is running
Stopped<\code>: The solver process was stopped. The reason can be a user interruption,
an exception, a timeout or a successfull run.private void setSolverState(SMTSolver.SolverState value)
public boolean wasInterrupted()
SMTSolvertrue if the solver process was interrupted by an
user, an exception or a timeout. In all other cases (including that the
solver is still running) the method returns true.wasInterrupted in interface SMTSolverpublic boolean isRunning()
SMTSolvertrue if the solver process is running else
false.private void interruptionOccurred(Throwable e)
public String name()
SMTSolverprivate String[] translateToCommand(Term term) throws IllegalFormulaException, IOException
IllegalFormulaExceptionIOExceptionpublic void interrupt(SMTSolver.ReasonOfInterruption reason)
SMTSolverpublic SMTSolverResult getFinalResult()
SMTSolvergetFinalResult in interface SMTSolverpublic TacletSetTranslation getTacletTranslation()
SMTSolvernull in order to
maintain thread safety.getTacletTranslation in interface SMTSolverpublic String getTranslation()
SMTSolvernull in order to maintain thread safety.getTranslation in interface SMTSolverpublic String getSolverOutput()
SMTSolvergetSolverOutput in interface SMTSolverpublic Collection<Throwable> getExceptionsOfTacletTranslation()
SMTSolvergetExceptionsOfTacletTranslation in interface SMTSolverpublic AbstractSolverSocket getSocket()