Skip to main content

Goal

Struct Goal 

Source
pub struct Goal { /* private fields */ }
Expand description

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

Implementations§

Source§

impl Goal

Source

pub fn new(models: bool, unsat_cores: bool, proofs: bool) -> Goal

Source

pub fn assert(&self, ast: &impl Ast)

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 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> + 'a
where T: Ast,

Source

pub fn get_formulas(&self) -> Vec<Bool>

Return a vector of the formulas from the given goal.

Though not guaranteed by Z3’s type system, goals and subgoals are conceptually always going to be expressions of the Bool Sort.

Trait Implementations§

Source§

impl Clone for Goal

Source§

fn clone(&self) -> Self

Returns a duplicate 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 Debug for Goal

Source§

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

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

impl Display for Goal

Source§

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

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

impl Drop for Goal

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Translate for Goal

Source§

fn translate(&self, ctx: &Context) -> Goal

Auto Trait Implementations§

§

impl Freeze for Goal

§

impl RefUnwindSafe for Goal

§

impl !Send for Goal

§

impl !Sync for Goal

§

impl Unpin for Goal

§

impl UnsafeUnpin for Goal

§

impl UnwindSafe for Goal

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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, A> IntoAst<A> for T
where T: Into<A>, A: Ast,

Source§

fn into_ast(self, _a: &A) -> A

Source§

impl<T> PrepareSynchronized for T
where T: Translate,

Source§

type Inner = T

Source§

fn synchronized(&self) -> Synchronized<<T as PrepareSynchronized>::Inner>

Creates a thread-safe wrapper that is both Send and Sync. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

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

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.