Object for managing fixedpoints
Definition at line 25 of file Fixedpoint.java.
void add |
( |
BoolExpr... |
constraints | ) |
|
|
inline |
Assert a constraint (or multiple) into the fixedpoint solver.
- Exceptions
-
Definition at line 65 of file Fixedpoint.java.
67 getContext().checkContextMatch(constraints);
68 for (BoolExpr a : constraints)
70 Native.fixedpointAssert(getContext().nCtx(), getNativeObject(),
void addCover |
( |
int |
level, |
|
|
FuncDecl |
predicate, |
|
|
Expr |
property |
|
) |
| |
|
inline |
Add property
about the predicate
. The property is added at level
.
Definition at line 245 of file Fixedpoint.java.
248 Native.fixedpointAddCover(getContext().nCtx(), getNativeObject(), level,
249 predicate.getNativeObject(),
property.getNativeObject());
void addFact |
( |
FuncDecl |
pred, |
|
|
int... |
args |
|
) |
| |
|
inline |
Add table fact to the fixedpoint solver.
- Exceptions
-
Definition at line 106 of file Fixedpoint.java.
108 getContext().checkContextMatch(pred);
109 Native.fixedpointAddFact(getContext().nCtx(), getNativeObject(),
110 pred.getNativeObject(), (int) args.length, args);
Add rule into the fixedpoint solver.
- Exceptions
-
Definition at line 93 of file Fixedpoint.java.
96 getContext().checkContextMatch(rule);
97 Native.fixedpointAddRule(getContext().nCtx(), getNativeObject(),
98 rule.getNativeObject(), AST.getNativeObject(name));
Retrieve satisfying instance or instances of solver, or definitions for the recursive predicates that show unsatisfiability.
- Exceptions
-
Definition at line 205 of file Fixedpoint.java.
207 long ans = Native.fixedpointGetAnswer(getContext().nCtx(), getNativeObject());
208 return (ans == 0) ? null : Expr.create(getContext(), ans);
Retrieve set of assertions added to fixedpoint context.
- Exceptions
-
Definition at line 306 of file Fixedpoint.java.
308 ASTVector v =
new ASTVector(getContext(), Native.fixedpointGetAssertions(getContext().nCtx(), getNativeObject()));
309 return v.ToBoolExprArray();
Retrieve the cover of a predicate.
- Exceptions
-
Definition at line 234 of file Fixedpoint.java.
236 long res = Native.fixedpointGetCoverDelta(getContext().nCtx(),
237 getNativeObject(), level, predicate.getNativeObject());
238 return (res == 0) ? null : Expr.create(getContext(), res);
A string that describes all available fixedpoint solver parameters.
Definition at line 31 of file Fixedpoint.java.
33 return Native.fixedpointGetHelp(getContext().nCtx(), getNativeObject());
Retrieve the number of levels explored for a given predicate.
Definition at line 223 of file Fixedpoint.java.
225 return Native.fixedpointGetNumLevels(getContext().nCtx(), getNativeObject(),
226 predicate.getNativeObject());
Retrieves parameter descriptions for Fixedpoint solver.
- Exceptions
-
Definition at line 54 of file Fixedpoint.java.
56 return new ParamDescrs(getContext(), Native.fixedpointGetParamDescrs(
57 getContext().nCtx(), getNativeObject()));
String getReasonUnknown |
( |
| ) |
|
|
inline |
Retrieve explanation why fixedpoint engine returned status Unknown.
Definition at line 214 of file Fixedpoint.java.
216 return Native.fixedpointGetReasonUnknown(getContext().nCtx(),
Retrieve set of rules added to fixedpoint context.
- Exceptions
-
Definition at line 295 of file Fixedpoint.java.
297 ASTVector v =
new ASTVector(getContext(), Native.fixedpointGetRules(getContext().nCtx(), getNativeObject()));
298 return v.ToBoolExprArray();
Fixedpoint statistics.
- Exceptions
-
Definition at line 317 of file Fixedpoint.java.
319 return new Statistics(getContext(), Native.fixedpointGetStatistics(
320 getContext().nCtx(), getNativeObject()));
Parse an SMT-LIB2 file with fixedpoint rules. Add the rules to the current fixedpoint context. Return the set of queries in the file.
Definition at line 328 of file Fixedpoint.java.
330 ASTVector av =
new ASTVector(getContext(), Native.fixedpointFromFile(getContext().nCtx(), getNativeObject(), file));
331 return av.ToBoolExprArray();
Parse an SMT-LIB2 string with fixedpoint rules. Add the rules to the current fixedpoint context. Return the set of queries in the file.
Definition at line 339 of file Fixedpoint.java.
341 ASTVector av =
new ASTVector(getContext(), Native.fixedpointFromString(getContext().nCtx(), getNativeObject(), s));
342 return av.ToBoolExprArray();
Backtrack one backtracking point. Remarks: Note that an exception is thrown if
is called without a corresponding
- See also
- push
Definition at line 181 of file Fixedpoint.java.
183 Native.fixedpointPop(getContext().nCtx(), getNativeObject());
Creates a backtracking point.
- See also
- pop
Definition at line 169 of file Fixedpoint.java.
171 Native.fixedpointPush(getContext().nCtx(), getNativeObject());
Query the fixedpoint solver. A query is a conjunction of constraints. The constraints may include the recursively defined relations. The query is satisfiable if there is an instance of the query variables and a derivation for it. The query is unsatisfiable if there are no derivations satisfying the query variables.
- Exceptions
-
Definition at line 122 of file Fixedpoint.java.
125 getContext().checkContextMatch(
query);
127 getNativeObject(),
query.getNativeObject()));
131 return Status.SATISFIABLE;
133 return Status.UNSATISFIABLE;
Status query(BoolExpr query)
Z3_lbool
Lifted Boolean type: false, undefined, true.
Query the fixedpoint solver. A query is an array of relations. The query is satisfiable if there is an instance of some relation that is non-empty. The query is unsatisfiable if there are no derivations satisfying any of the relations.
- Exceptions
-
Definition at line 147 of file Fixedpoint.java.
150 getContext().checkContextMatch(relations);
152 .nCtx(), getNativeObject(), AST.arrayLength(relations), AST
153 .arrayToNative(relations)));
157 return Status.SATISFIABLE;
159 return Status.UNSATISFIABLE;
Z3_lbool
Lifted Boolean type: false, undefined, true.
Register predicate as recursive relation.
- Exceptions
-
Definition at line 80 of file Fixedpoint.java.
83 getContext().checkContextMatch(f);
84 Native.fixedpointRegisterRelation(getContext().nCtx(), getNativeObject(),
void setParameters |
( |
Params |
value | ) |
|
|
inline |
Sets the fixedpoint solver parameters.
- Exceptions
-
Definition at line 41 of file Fixedpoint.java.
44 getContext().checkContextMatch(value);
45 Native.fixedpointSetParams(getContext().nCtx(), getNativeObject(),
46 value.getNativeObject());
Instrument the Datalog engine on which table representation to use for recursive predicate.
Definition at line 271 of file Fixedpoint.java.
274 Native.fixedpointSetPredicateRepresentation(getContext().nCtx(),
275 getNativeObject(), f.getNativeObject(), AST.arrayLength(kinds),
276 Symbol.arrayToNative(kinds));
Retrieve internal string representation of fixedpoint object.
Definition at line 255 of file Fixedpoint.java.
259 return Native.fixedpointToString(getContext().nCtx(), getNativeObject(),
261 }
catch (Z3Exception e)
263 return "Z3Exception: " + e.getMessage();
Convert benchmark given as set of axioms, rules and queries to a string.
Definition at line 283 of file Fixedpoint.java.
286 return Native.fixedpointToString(getContext().nCtx(), getNativeObject(),
287 AST.arrayLength(queries), AST.arrayToNative(queries));
Update named rule into in the fixedpoint solver.
- Exceptions
-
Definition at line 191 of file Fixedpoint.java.
194 getContext().checkContextMatch(rule);
195 Native.fixedpointUpdateRule(getContext().nCtx(), getNativeObject(),
196 rule.getNativeObject(), AST.getNativeObject(name));