A goal (aka problem). A goal is essentially a set of formulas, that can be solved and/or transformed using tactics and solvers. More...
A goal (aka problem). A goal is essentially a set of formulas, that can be solved and/or transformed using tactics and solvers.
Definition at line 31 of file Goal.cs.
◆ Add() void Add ( params BoolExpr[] constraints ) inlineAlias for Assert.
Definition at line 96 of file Goal.cs.
void Assert(params BoolExpr[] constraints)
Adds the constraints to the given goal.
◆ AsBoolExpr()Definition at line 237 of file Goal.cs.
BoolExpr MkTrue()
The true Term.
BoolExpr MkAnd(params BoolExpr[] t)
Create an expression representing t[0] and t[1] and ....
uint Size
The number of formulas in the goal.
BoolExpr[] Formulas
The formulas in the goal.
Context Context
Access Context object
◆ Assert() void Assert ( params BoolExpr[] constraints ) inlineAdds the constraints to the given goal.
Definition at line 80 of file Goal.cs.
82Debug.Assert(constraints !=
null);
83Debug.Assert(constraints.All(c => c !=
null));
85 Context.CheckContextMatch<BoolExpr>(constraints);
86 foreach(BoolExpr c
inconstraints)
88Debug.Assert(c !=
null);
89Native.Z3_goal_assert(
Context.nCtx, NativeObject, c.NativeObject);
Referenced by Goal.Add(), and Goal.Translate().
◆ ConvertModel()Convert a model for the goal into a model of the original goal from which this goal was derived.
g
Definition at line 181 of file Goal.cs.
184 return new Model(
Context, Native.Z3_goal_convert_model(
Context.nCtx, NativeObject, m.NativeObject));
186 return new Model(
Context, Native.Z3_goal_convert_model(
Context.nCtx, NativeObject, IntPtr.Zero));
◆ Reset()Erases all formulas from the given goal.
Definition at line 123 of file Goal.cs.
125Native.Z3_goal_reset(
Context.nCtx, NativeObject);
◆ Simplify()Simplifies the goal.
Essentially invokes the ‘simplify’ tactic on the goal.
Definition at line 204 of file Goal.cs.
207 usingApplyResult res = t.
Apply(
this, p);
209 if(res.NumSubgoals == 0)
210 throw newZ3Exception(
"No subgoals");
212 returnres.Subgoals[0];
Tactic MkTactic(string name)
Creates a new Tactic.
ApplyResult Apply(Goal g, Params p=null)
Execute the tactic over the goal.
◆ ToDimacs() string ToDimacs ( bool include_names =true
) inline
Goal to DIMACS formatted string conversion.
Definition at line 228 of file Goal.cs.
230 returnNative.Z3_goal_to_dimacs_string(
Context.nCtx, NativeObject, (
byte)(include_names ? 1 : 0));
◆ ToString() override string ToString ( ) inlineGoal to string conversion.
Definition at line 219 of file Goal.cs.
221 returnNative.Z3_goal_to_string(
Context.nCtx, NativeObject);
◆ Translate()Translates (copies) the Goal to the target Context ctx .
Definition at line 193 of file Goal.cs.
195Debug.Assert(ctx !=
null);
197 return newGoal(ctx, Native.Z3_goal_translate(
Context.nCtx, NativeObject, ctx.nCtx));
◆ DepthThe depth of the goal.
This tracks how many transformations were applied to it.
Definition at line 115 of file Goal.cs.
117 get{
returnNative.Z3_goal_depth(
Context.nCtx, NativeObject); }
◆ FormulasThe formulas in the goal.
Definition at line 139 of file Goal.cs.
145BoolExpr[] res =
newBoolExpr[n];
146 for(uint i = 0; i < n; i++)
147res[i] = (BoolExpr)Expr.Create(
Context, Native.Z3_goal_formula(
Context.nCtx, NativeObject, i));
Referenced by Goal.AsBoolExpr().
◆ InconsistentIndicates whether the goal contains ‘false’.
Definition at line 104 of file Goal.cs.
106 get{
returnNative.Z3_goal_inconsistent(
Context.nCtx, NativeObject) != 0; }
◆ IsDecidedSatIndicates whether the goal is empty, and it is precise or the product of an under approximation.
Definition at line 163 of file Goal.cs.
165 get{
returnNative.Z3_goal_is_decided_sat(
Context.nCtx, NativeObject) != 0; }
◆ IsDecidedUnsatIndicates whether the goal contains ‘false’, and it is precise or the product of an over approximation.
Definition at line 171 of file Goal.cs.
173 get{
returnNative.Z3_goal_is_decided_unsat(
Context.nCtx, NativeObject) != 0; }
◆ IsGarbageIndicates whether the goal is garbage (i.e., the product of over- and under-approximations).
Definition at line 72 of file Goal.cs.
Z3_goal_prec Precision
The precision of the goal.
Z3_goal_prec
Z3 custom error handler (See Z3_set_error_handler).
◆ IsOverApproximationIndicates whether the goal is an over-approximation.
Definition at line 64 of file Goal.cs.
◆ IsPreciseIndicates whether the goal is precise.
Definition at line 49 of file Goal.cs.
◆ IsUnderApproximation bool IsUnderApproximation getIndicates whether the goal is an under-approximation.
Definition at line 56 of file Goal.cs.
◆ NumExprsThe number of formulas, subformulas and terms in the goal.
Definition at line 155 of file Goal.cs.
157 get{
returnNative.Z3_goal_num_exprs(
Context.nCtx, NativeObject); }
◆ PrecisionThe precision of the goal.
Goals can be transformed using over and under approximations. An under approximation is applied when the objective is to find a model for a given goal. An over approximation is applied when the objective is to find a proof for a given goal.
Definition at line 41 of file Goal.cs.
◆ SizeThe number of formulas in the goal.
Definition at line 131 of file Goal.cs.
133 get{
returnNative.Z3_goal_size(
Context.nCtx, NativeObject); }
Referenced by Goal.AsBoolExpr().
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4