Struct z3::Goal

source ·
pub struct Goal<'ctx> { /* private fields */ }
Expand description

Set of formulas that can be solved and/or transformed using tactics and solvers.

Implementations§

source§

impl<'ctx> Goal<'ctx>

source

pub fn new( ctx: &'ctx Context, models: bool, unsat_cores: bool, proofs: bool ) -> Goal<'ctx>

source

pub fn assert(&self, ast: &impl Ast<'ctx>)

Add a new formula a to the given goal.

source

pub fn is_inconsistent(&self) -> bool

Return true if the given goal contains the formula false.

source

pub fn get_depth(&self) -> u32

Return the depth of the given goal. It tracks how many transformations were applied to it.

source

pub fn get_size(&self) -> u32

Return the number of formulas in the given goal.

source

pub fn get_num_expr(&self) -> u32

Return the number of formulas, subformulas and terms in the given goal.

source

pub fn is_decided_sat(&self) -> bool

Return true if the goal is empty, and it is precise or the product of a under approximation.

source

pub fn is_decided_unsat(&self) -> bool

Return true if the goal contains false, and it is precise or the product of an over approximation.

source

pub fn reset(&self)

Erase all formulas from the given goal.

source

pub fn translate<'dest_ctx>(self, ctx: &'dest_ctx Context) -> Goal<'dest_ctx>

Copy a goal g from the context source to the context target.

source

pub fn get_precision(&self) -> GoalPrec

Return the “precision” of the given goal. Goals can be transformed using over and under approximations.

source

pub fn iter_formulas<'a, T>(&'a self) -> impl Iterator<Item = T> + 'awhere T: Ast<'a>,

source

pub fn get_formulas<T>(&self) -> Vec<T>where T: Ast<'ctx>,

Return a vector of the formulas from the given goal.

Trait Implementations§

source§

impl<'ctx> Clone for Goal<'ctx>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'ctx> Debug for Goal<'ctx>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'ctx> Display for Goal<'ctx>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'ctx> Drop for Goal<'ctx>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'ctx> RefUnwindSafe for Goal<'ctx>

§

impl<'ctx> !Send for Goal<'ctx>

§

impl<'ctx> !Sync for Goal<'ctx>

§

impl<'ctx> Unpin for Goal<'ctx>

§

impl<'ctx> UnwindSafe for Goal<'ctx>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.