Inheritance diagram for Solver:Public Member Functions | |
| String | getHelp () |
| void | setParameters (Params value) |
| ParamDescrs | getParameterDescriptions () |
| int | getNumScopes () |
| void | push () |
| void | pop () |
| void | pop (int n) |
| void | reset () |
| void | interrupt () |
| void | add (Expr< BoolSort >... constraints) |
| void | assertAndTrack (Expr< BoolSort >[] constraints, Expr< BoolSort >[] ps) |
| void | assertAndTrack (Expr< BoolSort > constraint, Expr< BoolSort > p) |
| void | fromFile (String file) |
| Load solver assertions from a file. | |
| void | fromString (String str) |
| Load solver assertions from a string. | |
| int | getNumAssertions () |
| BoolExpr[] | getAssertions () |
| final Status | check (Expr< BoolSort >... assumptions) |
| Status | check () |
| Status | getConsequences (Expr< BoolSort >[] assumptions, Expr<?>[] variables, List< Expr< BoolSort > > consequences) |
| Model | getModel () |
| Expr<?> | getProof () |
| BoolExpr[] | getUnsatCore () |
| BoolExpr[] | getUnits () |
| BoolExpr[] | getNonUnits () |
| BoolExpr[] | getTrail () |
| String | getReasonUnknown () |
| int[] | getTrailLevels () |
| java.util.Iterator< BoolExpr[]> | cube (Expr<?>[] vars, int cutoff) |
| Expr<?> | congruenceRoot (Expr<?> t) |
| Expr<?> | congruenceNext (Expr<?> t) |
| Expr<?> | congruenceExplain (Expr<?> a, Expr<?> b) |
| void | solveFor (Expr<?>[] variables, Expr<?>[] terms, BoolExpr[] guards) |
| void | setInitialValue (Expr<?> var, Expr<?> value) |
| void | importModelConverter (Solver src) |
| Solver | translate (Context ctx) |
| Solver | addSimplifier (Simplifier simplifier) |
| String | toDimacs (boolean includeNames) |
| Statistics | getStatistics () |
| String | toString () |
Additional Inherited Members | |
Static Public Member Functions inherited from Z3Object | |
| static long[] | arrayToNative (Z3Object[] a) |
| static int | arrayLength (Z3Object[] a) |
Solvers.
Definition at line 30 of file Solver.java.
Assert a multiple constraints into the solver.
| Z3Exception |
Definition at line 128 of file Solver.java.
Referenced by Solver.__iadd__().
|
inline |
Create a new solver with pre-processing simplification attached.
| simplifier | The simplifier to attach for pre-processing |
Definition at line 578 of file Solver.java.
Assert a constraint into the solver, and track it (in the unsat) core using the Boolean constant p.
Remarks: This API is an alternative to check with assumptions for extracting unsat cores. Both APIs can be used in the same solver. The unsat core will contain a combination of the Boolean variables provided using assertAndTrack and the Boolean literals provided using check with assumptions.
Definition at line 184 of file Solver.java.
Assert multiple constraints into the solver, and track them (in the unsat) core using the Boolean constants in ps.
Remarks: This API is an alternative to check with assumptions for extracting unsat cores. Both APIs can be used in the same solver. The unsat core will contain a combination of the Boolean variables provided using assertAndTrack and the Boolean literals provided using check with assumptions.
Definition at line 155 of file Solver.java.
|
inline |
Checks whether the assertions in the solver are consistent or not. Remarks:
Definition at line 262 of file Solver.java.
Checks whether the assertions in the solver are consistent or not. Remarks:
Definition at line 240 of file Solver.java.
Return an explanation for why two expressions are congruent.
| a | First expression |
| b | Second expression |
| Z3Exception |
Definition at line 508 of file Solver.java.
Return the next element in the congruence class of the given expression. The congruence class forms a circular linked list.
| t | The expression to find the next congruent expression for |
| Z3Exception |
Definition at line 493 of file Solver.java.
Return the congruence class representative of the given expression. This is useful for querying the equality reasoning performed by the solver.
| t | The expression to find the congruence root for |
| Z3Exception |
Definition at line 478 of file Solver.java.
Return a sequence of cubes (conjunctions of literals) for partitioning the search space. Each cube represents a partial assignment that can be used as a starting point for parallel solving. This is primarily useful for cube-and-conquer parallel SAT solving strategies, where different cubes can be solved independently by different workers. The iterator yields cubes until the search space is exhausted.
| vars | Optional array of variables to use as initial cube variables. If null, solver decides. |
| cutoff | Backtrack level cutoff for cube generation |
| Z3Exception |
Definition at line 425 of file Solver.java.
|
inline |
Load solver assertions from a file.
Definition at line 196 of file Solver.java.
|
inline |
Load solver assertions from a string.
Definition at line 204 of file Solver.java.
|
inline |
The set of asserted formulas.
| Z3Exception |
Definition at line 226 of file Solver.java.
|
inline |
Retrieve fixed assignments to the set of variables in the form of consequences. Each consequence is an implication of the form
relevant-assumptions Implies variable = value
where the relevant assumptions is a subset of the assumptions that are passed in and the equality on the right side of the implication indicates how a variable is fixed.
Definition at line 278 of file Solver.java.
|
inline |
A string that describes all available solver parameters.
Definition at line 34 of file Solver.java.
|
inline |
The model of the last Check. Remarks: The result is null if Check was not invoked before, if its results was not SATISFIABLE, or if model production is not enabled.
| Z3Exception |
Definition at line 300 of file Solver.java.
|
inline |
Retrieve non-unit atomic formulas in the solver state. Remarks: This retrieves atomic formulas that are not units after a check call.
| Z3Exception |
Definition at line 366 of file Solver.java.
|
inline |
The number of assertions in the solver.
| Z3Exception |
Definition at line 215 of file Solver.java.
|
inline |
The current number of backtracking points (scopes).
Definition at line 67 of file Solver.java.
|
inline |
Retrieves parameter descriptions for solver.
| Z3Exception |
Definition at line 56 of file Solver.java.
|
inline |
The proof of the last Check. Remarks: The result is null if Check was not invoked before, if its results was not UNSATISFIABLE, or if proof production is disabled.
| Z3Exception |
Definition at line 319 of file Solver.java.
|
inline |
A brief justification of why the last call to Check returned UNKNOWN.
Definition at line 391 of file Solver.java.
|
inline |
Solver statistics.
| Z3Exception |
Definition at line 600 of file Solver.java.
|
inline |
Retrieve the solver decision trail. Remarks: This retrieves the trail of decisions made by the solver after a check call. The trail represents the sequence of Boolean literals (decisions and propagations) in the order they were assigned.
| Z3Exception |
Definition at line 381 of file Solver.java.
|
inline |
Retrieve the decision levels for each literal in the solver's trail after a check call. The trail contains Boolean literals (decisions and propagations) in the order they were assigned. The returned array has one entry per trail literal, indicating at which decision level it was assigned.
| Z3Exception |
Definition at line 405 of file Solver.java.
|
inline |
Retrieve currently inferred units. Remarks: This retrieves the set of literals that the solver has inferred at the current decision level after a check call.
| Z3Exception |
Definition at line 353 of file Solver.java.
|
inline |
The unsat core of the last Check. Remarks: The unsat core is a subset of Assertions The result is empty if Check was not invoked before, if its results was not UNSATISFIABLE, or if core production is disabled.
| Z3Exception |
Definition at line 338 of file Solver.java.
|
inline |
Import model converter from other solver.
| src | The solver to import the model converter from |
Definition at line 559 of file Solver.java.
|
inline |
Interrupt the execution of the solver object. Remarks: This ensures that the interrupt applies only to the given solver object and it applies only if it is running.
Definition at line 118 of file Solver.java.
|
inline |
Backtracks one backtracking point. Remarks: .
Definition at line 86 of file Solver.java.
Referenced by Solver.__exit__().
|
inline |
Backtracks n backtracking points. Remarks: Note that an exception is thrown if n is not smaller than NumScopes
Definition at line 98 of file Solver.java.
Referenced by Solver.__exit__().
|
inline |
Creates a backtracking point.
Definition at line 77 of file Solver.java.
Referenced by Solver.__enter__().
|
inline |
Resets the Solver. Remarks: This removes all assertions from the solver.
Definition at line 108 of file Solver.java.
Set an initial value for a variable to guide the solver's search heuristics. This can improve performance when good initial values are known for the problem domain.
| var | The variable to set an initial value for |
| value | The initial value for the variable |
| Z3Exception |
Definition at line 546 of file Solver.java.
|
inline |
Sets the solver parameters.
| Z3Exception |
Definition at line 44 of file Solver.java.
Solve constraints for given variables, replacing their occurrences by terms. Guards are used to guard substitutions.
| variables | Array of variables to solve for |
| terms | Array of terms to substitute for the variables |
| guards | Array of Boolean guards for the substitutions |
| Z3Exception |
Definition at line 526 of file Solver.java.
|
inline |
Convert the solver's Boolean formula to DIMACS CNF format.
| includeNames | If true, include variable names in the DIMACS output |
Definition at line 590 of file Solver.java.
|
inline |
A string representation of the solver.
Definition at line 610 of file Solver.java.
Create a clone of the current solver with respect toctx.
Definition at line 567 of file Solver.java.
Referenced by AstRef.__copy__(), Goal.__copy__(), AstVector.__copy__(), FuncInterp.__copy__(), ModelRef.__copy__(), Goal.__deepcopy__(), AstVector.__deepcopy__(), FuncInterp.__deepcopy__(), and ModelRef.__deepcopy__().