Package org.smtlib.solvers
Class Solver_yices2
java.lang.Object
org.smtlib.AbstractSolver
org.smtlib.solvers.Solver_smt
org.smtlib.solvers.Solver_yices2
- All Implemented Interfaces:
ISolver
- Direct Known Subclasses:
Solver_yices2_2_6
This class is an adapter that takes the SMT-LIB ASTs and translates them into yices2 commands
-
Nested Class Summary
Nested classes/interfaces inherited from class org.smtlib.AbstractSolver
AbstractSolver.Pending, AbstractSolver.Shape, AbstractSolver.StackChangeNested classes/interfaces inherited from interface org.smtlib.ISolver
ISolver.CreationException -
Field Summary
Fields inherited from class org.smtlib.AbstractSolver
checkSatStatus, END_WAIT_MILLIS, endedByTimeLimit, isMac, isWindows, linesOffset, options, printSuccess, printSuccessResponse, smtConfig, SOLVER_EXITED, solverProcess -
Constructor Summary
ConstructorsConstructorDescriptionSolver_yices2(SMT.Configuration smtConfig, String command) Creates an instance of the yices2 solverSolver_yices2(SMT.Configuration smtConfig, String[] command) Creates an instance of the yices2 solver -
Method Summary
Modifier and TypeMethodDescriptionString[]echo(IExpr.IStringLiteral arg) yices2 writes echo's text unquoted, so where it ends cannot be found (#136); the response to echo is its argumentyices2 answers get-assignment with :produce-assignments off, and in assert mode after a checkget_info(IExpr.IKeyword key) yices2 answers get-info :status with the last set-info :status value, but with (error "no info for :status") when none was set; SMT-LIB requires unsupported for a flag the solver does not support.yices2 answers get-model with :produce-models off, and in assert mode after a checkyices2 answers get-unsat-assumptions, wrongly, in assert mode after a checkyices2 answers get-unsat-core in assert mode after a checkyices2 answers get-value with :produce-models off, and in assert mode after a checkPatterns matching the line numbers in this solver's messages about the command answered: group 1 is the text before the number, group 2 the number, group 3 the text after itprotected booleanyices2 self-reports (get-info :error-behavior) as immediate-exit and its process does exit after some (not all) errors -- see AbstractSolver#sendCommand(ICommand, boolean), which uses this to pause briefly after any error response, giving a genuinely-exiting process time to finish dying before the next command's liveness check runs.start()Starts the solver; this is not an SMT-LIB command, but it is convenient in some implementations to separate the starting and initialization from the construction of the solver instance.Methods inherited from class org.smtlib.solvers.Solver_smt
prompt, translateMethods inherited from class org.smtlib.AbstractSolver
assertExpr, check_sat, check_sat_assuming, checkImmediateExit, checkPrintSuccess, checkSatStatus, checkShape, checkStatus, comment, correctResponse, declare_const, declare_datatype, declare_datatypes, declare_fun, declare_sort, declare_sort_parameter, define_const, define_fun, define_fun_rec, define_funs_rec, define_sort, earlierSourceLine, errorStopsSolver, execute, executePipelined, exit, exitedResponse, finishPipelined, forceExit, get_assertions, get_option, get_proof, hasPending, inSatMode, interrupt, inUnsatMode, isFlatResponse, isTimeLimitResponse, logSolverDiagnostics, modelResponse, nextSolverLine, normalizeForTesting, outOfStep, parseResponse, pipelines, pop, proofResponse, push, readPipelined, recordChange, reportsEarlierLines, reportSeedIgnored, requireNoChangeSinceCheck, requireOptionEnabled, requireSatOrUnknown, requireUnsat, reset, reset_assertions, responseEnd, sendChange, sendCommand, sendExitCommand, sendFailure, sendFailure, sendPipelined, sendScriptText, sendSeed, set_info, set_logic, set_option, set_option_impl, setSourceLine, shapeOf, smt, solverName, solverPrintsSuccess, successOrEmpty, timeLimitResponse, timeLimitResponseAfterExit, unsatAssumptionsElements, unsatCoreElements, withSourceLinesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.smtlib.ISolver
assertExpr, check_sat, check_sat_assuming, checkSatStatus, comment, declare_const, declare_datatype, declare_datatypes, declare_fun, declare_sort, declare_sort_parameter, define_const, define_fun, define_fun_rec, define_funs_rec, define_sort, execute, exit, forceExit, get_assertions, get_option, get_proof, pop, push, reset, reset_assertions, set_info, set_logic, set_option, setSourceLine, smt, solverName
-
Constructor Details
-
Solver_yices2
Creates an instance of the yices2 solver -
Solver_yices2
Creates an instance of the yices2 solver
-
-
Method Details
-
selfReportsImmediateExit
protected boolean selfReportsImmediateExit()yices2 self-reports (get-info :error-behavior) as immediate-exit and its process does exit after some (not all) errors -- see AbstractSolver#sendCommand(ICommand, boolean), which uses this to pause briefly after any error response, giving a genuinely-exiting process time to finish dying before the next command's liveness check runs.- Overrides:
selfReportsImmediateExitin classAbstractSolver
-
lineNumberPatterns
Description copied from class:AbstractSolverPatterns matching the line numbers in this solver's messages about the command answered: group 1 is the text before the number, group 2 the number, group 3 the text after it- Overrides:
lineNumberPatternsin classAbstractSolver
-
cmd
- Overrides:
cmdin classSolver_smt
-
echo
yices2 writes echo's text unquoted, so where it ends cannot be found (#136); the response to echo is its argument- Specified by:
echoin interfaceISolver- Overrides:
echoin classAbstractSolver- Returns:
- the argument as an IResponse
-
start
Description copied from interface:ISolverStarts the solver; this is not an SMT-LIB command, but it is convenient in some implementations to separate the starting and initialization from the construction of the solver instance.- Specified by:
startin interfaceISolver- Overrides:
startin classSolver_smt- Returns:
- success or an SMT error response
- See Also:
-
get_info
yices2 answers get-info :status with the last set-info :status value, but with (error "no info for :status") when none was set; SMT-LIB requires unsupported for a flag the solver does not support. Other flags are answered by yices2 itself.- Specified by:
get_infoin interfaceISolver- Overrides:
get_infoin classAbstractSolver- Parameters:
key- the info keyword- Returns:
- the info value, or unsupported, or an SMT error response
- See Also:
-
get_model
yices2 answers get-model with :produce-models off, and in assert mode after a check- Specified by:
get_modelin interfaceISolver- Overrides:
get_modelin classAbstractSolver- Returns:
- a model, unsupported, or an SMT error response
- See Also:
-
get_value
yices2 answers get-value with :produce-models off, and in assert mode after a check- Specified by:
get_valuein interfaceISolver- Overrides:
get_valuein classAbstractSolver- Parameters:
terms- expressions to evaluate- Returns:
- a list of term–value pairs, unsupported, or an SMT error response
- See Also:
-
get_assignment
yices2 answers get-assignment with :produce-assignments off, and in assert mode after a check- Specified by:
get_assignmentin interfaceISolver- Overrides:
get_assignmentin classAbstractSolver- Returns:
- a list of name–Boolean pairs, unsupported, or an SMT error response
- See Also:
-
get_unsat_core
yices2 answers get-unsat-core in assert mode after a check- Specified by:
get_unsat_corein interfaceISolver- Overrides:
get_unsat_corein classAbstractSolver- Returns:
- a list of formula names, unsupported, or an SMT error response
- See Also:
-
get_unsat_assumptions
yices2 answers get-unsat-assumptions, wrongly, in assert mode after a check- Specified by:
get_unsat_assumptionsin interfaceISolver- Overrides:
get_unsat_assumptionsin classAbstractSolver- Returns:
- a list of assumption literals, unsupported, or an SMT error response
- See Also:
-