Struct 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> + 'a
where 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 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<'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> Freeze for Goal<'ctx>

§

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