A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://z3prover.github.io/api/html/class_microsoft_1_1_z3_1_1_goal.html below:

Z3: Goal Class Reference

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 ) inline

Alias for Assert.

Definition at line 96 of file Goal.cs.

void Assert(params BoolExpr[] constraints)

Adds the constraints to the given goal.

◆ AsBoolExpr()

Goal to BoolExpr conversion.

Returns
A string representation of the Goal.

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 ) inline

Adds the constraints to the given goal.

Definition at line 80 of file Goal.cs.

82

Debug.Assert(constraints !=

null

);

83

Debug.Assert(constraints.All(c => c !=

null

));

85  Context

.CheckContextMatch<BoolExpr>(constraints);

86  foreach

(BoolExpr c

in

constraints)

88

Debug.Assert(c !=

null

);

89

Native.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.

Returns
A model for 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.

125

Native.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  using

ApplyResult res = t.

Apply

(

this

, p);

209  if

(res.NumSubgoals == 0)

210  throw new

Z3Exception(

"No subgoals"

);

212  return

res.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.

Returns
A string representation of the Goal.

Definition at line 228 of file Goal.cs.

230  return

Native.Z3_goal_to_dimacs_string(

Context

.nCtx, NativeObject, (

byte

)(include_names ? 1 : 0));

◆ ToString() override string ToString ( ) inline

Goal to string conversion.

Returns
A string representation of the Goal.

Definition at line 219 of file Goal.cs.

221  return

Native.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.

195

Debug.Assert(ctx !=

null

);

197  return new

Goal(ctx, Native.Z3_goal_translate(

Context

.nCtx, NativeObject, ctx.nCtx));

◆ Depth

The depth of the goal.

This tracks how many transformations were applied to it.

Definition at line 115 of file Goal.cs.

117  get

{

return

Native.Z3_goal_depth(

Context

.nCtx, NativeObject); }

◆ Formulas

The formulas in the goal.

Definition at line 139 of file Goal.cs.

145

BoolExpr[] res =

new

BoolExpr[n];

146  for

(uint i = 0; i < n; i++)

147

res[i] = (BoolExpr)Expr.Create(

Context

, Native.Z3_goal_formula(

Context

.nCtx, NativeObject, i));

Referenced by Goal.AsBoolExpr().

◆ Inconsistent

Indicates whether the goal contains ‘false’.

Definition at line 104 of file Goal.cs.

106  get

{

return

Native.Z3_goal_inconsistent(

Context

.nCtx, NativeObject) != 0; }

◆ IsDecidedSat

Indicates 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

{

return

Native.Z3_goal_is_decided_sat(

Context

.nCtx, NativeObject) != 0; }

◆ IsDecidedUnsat

Indicates 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

{

return

Native.Z3_goal_is_decided_unsat(

Context

.nCtx, NativeObject) != 0; }

◆ IsGarbage

Indicates 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).

◆ IsOverApproximation

Indicates whether the goal is an over-approximation.

Definition at line 64 of file Goal.cs.

◆ IsPrecise

Indicates whether the goal is precise.

Definition at line 49 of file Goal.cs.

◆ IsUnderApproximation bool IsUnderApproximation get

Indicates whether the goal is an under-approximation.

Definition at line 56 of file Goal.cs.

◆ NumExprs

The number of formulas, subformulas and terms in the goal.

Definition at line 155 of file Goal.cs.

157  get

{

return

Native.Z3_goal_num_exprs(

Context

.nCtx, NativeObject); }

◆ Precision

The 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.

◆ Size

The number of formulas in the goal.

Definition at line 131 of file Goal.cs.

133  get

{

return

Native.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