Bool

Struct Bool 

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

Ast node representing a boolean value.

Implementations§

Source§

impl Bool

Source

pub fn new_const<S: Into<Symbol>>(name: S) -> Bool

Source

pub fn fresh_const(prefix: &str) -> Bool

Source

pub fn from_bool(b: bool) -> Bool

Source

pub fn as_bool(&self) -> Option<bool>

Source

pub fn ite<T>(&self, a: &T, b: &T) -> T
where T: Ast,

Source

pub fn and<T: Into<Self> + Clone>(values: &[T]) -> Self

Source

pub fn or<T: Into<Self> + Clone>(values: &[T]) -> Self

Source

pub fn xor<T: IntoAst<Self>>(&self, other: T) -> Self

Source

pub fn iff<T: IntoAst<Self>>(&self, other: T) -> Self

Source

pub fn implies<T: IntoAst<Self>>(&self, other: T) -> Self

Source

pub fn not(&self) -> Self

Source

pub fn pb_le(values: &[(&Bool, i32)], k: i32) -> Bool

Source

pub fn pb_ge(values: &[(&Bool, i32)], k: i32) -> Bool

Source

pub fn pb_eq(values: &[(&Bool, i32)], k: i32) -> Bool

Source§

impl Bool

Source

pub fn ast_eq<T: IntoAst<Self>>(&self, other: T) -> bool
where Self: Sized,

Source

pub fn _eq<T: IntoAst<Self>>(&self, other: T) -> Bool
where Self: Sized,

👎Deprecated: Please use eq instead
Source

pub fn ne<T: IntoAst<Self>>(&self, other: T) -> Bool
where Self: Sized,

Source

pub fn eq<T: IntoAst<Self>>(&self, other: T) -> Bool
where Self: Sized,

Compare this Ast with another Ast, and get a Bool representing the result.

This operation works with all possible Asts (int, real, BV, etc), but the two Asts being compared must be the same type.

Source

pub fn _safe_eq<T: IntoAst<Self>>(&self, other: T) -> Result<Bool, SortDiffers>
where Self: Sized,

👎Deprecated: Please use safe_eq instead
Source

pub fn safe_eq<T: IntoAst<Self>>(&self, other: T) -> Result<Bool, SortDiffers>
where Self: Sized,

Compare this Ast with another Ast, and get a Result. Errors if the sort does not match for the two values.

Trait Implementations§

Source§

impl AddAssign<&Bool> for Solver

Source§

fn add_assign(&mut self, rhs: &Bool)

Performs the += operation. Read more
Source§

impl AddAssign<Bool> for Solver

Source§

fn add_assign(&mut self, rhs: Bool)

Performs the += operation. Read more
Source§

impl Ast for Bool

Source§

unsafe fn wrap(ctx: &Context, ast: Z3_ast) -> Self

Wrap a raw Z3_ast. Read more
Source§

fn eq<T: IntoAst<Self>>(&self, other: T) -> Bool
where Self: Sized,

Source§

fn ne<T: IntoAst<Self>>(&self, other: T) -> Bool
where Self: Sized,

Source§

fn get_ctx(&self) -> &Context

Source§

fn get_z3_ast(&self) -> Z3_ast

Source§

fn distinct(values: &[impl Borrow<Self>]) -> Bool
where Self: Sized,

Compare this Ast with a list of other Asts, and get a Bool which is true only if all arguments (including Self) are pairwise distinct. Read more
Source§

fn get_sort(&self) -> Sort

Get the Sort of the Ast.
Source§

fn simplify(&self) -> Self
where Self: Sized,

Simplify the Ast. Returns a new Ast which is equivalent, but simplified using algebraic simplification rules, such as constant propagation.
Source§

fn substitute<T: Ast>(&self, substitutions: &[(&T, &T)]) -> Self
where Self: Sized,

Performs substitution on the Ast. The slice substitutions contains a list of pairs with a “from” Ast that will be substituted by a “to” Ast.
Source§

fn num_children(&self) -> usize

Return the number of children of this Ast. Read more
Source§

fn nth_child(&self, idx: usize) -> Option<Dynamic>

Return the nth child of this Ast. Read more
Source§

fn children(&self) -> Vec<Dynamic>

Return the children of this node as a Vec<Dynamic>.
Source§

fn kind(&self) -> AstKind

Return the AstKind for this Ast.
Source§

fn is_app(&self) -> bool

Return true if this is a Z3 function application. Read more
Source§

fn is_const(&self) -> bool

Return true if this is a Z3 constant. Read more
Source§

fn decl(&self) -> FuncDecl

Return the FuncDecl of the Ast. Read more
Source§

fn safe_decl(&self) -> Result<FuncDecl, IsNotApp>

Source§

fn check_ctx(&self, ctx: &Context)

Source§

impl<T: IntoAst<Bool>> BitAnd<T> for &Bool

Source§

type Output = Bool

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: IntoAst<Bool>> BitAnd<T> for Bool

Source§

type Output = Bool

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
Source§

impl<T: IntoAst<Bool>> BitAndAssign<T> for Bool

Source§

fn bitand_assign(&mut self, rhs: T)

Performs the &= operation. Read more
Source§

impl<T: IntoAst<Bool>> BitOr<T> for &Bool

Source§

type Output = Bool

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: IntoAst<Bool>> BitOr<T> for Bool

Source§

type Output = Bool

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
Source§

impl<T: IntoAst<Bool>> BitOrAssign<T> for Bool

Source§

fn bitor_assign(&mut self, rhs: T)

Performs the |= operation. Read more
Source§

impl<T: IntoAst<Bool>> BitXor<T> for &Bool

Source§

type Output = Bool

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: T) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T: IntoAst<Bool>> BitXor<T> for Bool

Source§

type Output = Bool

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: T) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T: IntoAst<Bool>> BitXorAssign<T> for Bool

Source§

fn bitxor_assign(&mut self, rhs: T)

Performs the ^= operation. Read more
Source§

impl Clone for Bool

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 Bool

Source§

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

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

impl Display for Bool

Source§

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

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

impl Drop for Bool

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<&Bool> for Bool

Source§

fn from(value: &Self) -> Self

Converts to this type from the input type.
Source§

impl From<&Bool> for Dynamic

Source§

fn from(ast: &Bool) -> Self

Converts to this type from the input type.
Source§

impl From<Bool> for Dynamic

Source§

fn from(ast: Bool) -> Self

Converts to this type from the input type.
Source§

impl From<Bool> for Z3_ast

Source§

fn from(ast: Bool) -> Self

Converts to this type from the input type.
Source§

impl Hash for Bool

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Not for &Bool

Source§

type Output = Bool

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Not for Bool

Source§

type Output = Bool

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<T: IntoAst<Bool> + Clone> PartialEq<T> for Bool

Source§

fn eq(&self, other: &T) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Solvable for Bool

Source§

type ModelInstance = Bool

The type to be extracted from the Solver’s Model. Read more
Source§

fn read_from_model( &self, model: &Model, model_completion: bool, ) -> Option<Self::ModelInstance>

Defines how to derive data derived from the implementing type (usually just a Self) and a given Model. Read more
Source§

fn generate_constraint(&self, model: &Self::ModelInstance) -> Bool

Produce a Bool assertion ruling out the given model from the valuation of self. Read more
Source§

impl TryFrom<Dynamic> for Bool

Source§

type Error = String

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

fn try_from(ast: Dynamic) -> Result<Self, String>

Performs the conversion.
Source§

impl Eq for Bool

Auto Trait Implementations§

§

impl Freeze for Bool

§

impl RefUnwindSafe for Bool

§

impl !Send for Bool

§

impl !Sync for Bool

§

impl Unpin for Bool

§

impl UnwindSafe for Bool

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> Translate for T
where T: Ast,

Source§

fn translate(&self, dest: &Context) -> T

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.