pub struct Bool { /* private fields */ }Expand description
Ast node representing a boolean value.
Implementations§
Source§impl Bool
impl Bool
pub fn new_const<S: Into<Symbol>>(name: S) -> Bool
pub fn fresh_const(prefix: &str) -> Bool
pub fn from_bool(b: bool) -> Bool
pub fn as_bool(&self) -> Option<bool>
pub fn ite<T>(&self, a: &T, b: &T) -> Twhere
T: Ast,
pub fn and<T: Into<Self> + Clone>(values: &[T]) -> Self
pub fn or<T: Into<Self> + Clone>(values: &[T]) -> Self
pub fn xor<T: IntoAst<Self>>(&self, other: T) -> Self
pub fn iff<T: IntoAst<Self>>(&self, other: T) -> Self
pub fn implies<T: IntoAst<Self>>(&self, other: T) -> Self
pub fn not(&self) -> Self
pub fn pb_le(values: &[(&Bool, i32)], k: i32) -> Bool
pub fn pb_ge(values: &[(&Bool, i32)], k: i32) -> Bool
pub fn pb_eq(values: &[(&Bool, i32)], k: i32) -> Bool
Source§impl Bool
impl Bool
pub fn ast_eq<T: IntoAst<Self>>(&self, other: T) -> boolwhere
Self: Sized,
pub fn _eq<T: IntoAst<Self>>(&self, other: T) -> Boolwhere
Self: Sized,
👎Deprecated: Please use eq instead
pub fn ne<T: IntoAst<Self>>(&self, other: T) -> Boolwhere
Self: Sized,
Sourcepub fn eq<T: IntoAst<Self>>(&self, other: T) -> Boolwhere
Self: Sized,
pub fn eq<T: IntoAst<Self>>(&self, other: T) -> Boolwhere
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.
pub fn _safe_eq<T: IntoAst<Self>>(&self, other: T) -> Result<Bool, SortDiffers>where
Self: Sized,
👎Deprecated: Please use safe_eq instead
Trait Implementations§
Source§impl AddAssign<&Bool> for Solver
impl AddAssign<&Bool> for Solver
Source§fn add_assign(&mut self, rhs: &Bool)
fn add_assign(&mut self, rhs: &Bool)
Performs the
+= operation. Read moreSource§impl AddAssign<Bool> for Solver
impl AddAssign<Bool> for Solver
Source§fn add_assign(&mut self, rhs: Bool)
fn add_assign(&mut self, rhs: Bool)
Performs the
+= operation. Read moreSource§impl Ast for Bool
impl Ast for Bool
fn eq<T: IntoAst<Self>>(&self, other: T) -> Boolwhere
Self: Sized,
fn ne<T: IntoAst<Self>>(&self, other: T) -> Boolwhere
Self: Sized,
fn get_ctx(&self) -> &Context
fn get_z3_ast(&self) -> Z3_ast
Source§fn simplify(&self) -> Selfwhere
Self: Sized,
fn simplify(&self) -> Selfwhere
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)]) -> Selfwhere
Self: Sized,
fn substitute<T: Ast>(&self, substitutions: &[(&T, &T)]) -> Selfwhere
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
fn num_children(&self) -> usize
Return the number of children of this
Ast. Read morefn safe_decl(&self) -> Result<FuncDecl, IsNotApp>
fn check_ctx(&self, ctx: &Context)
Source§impl<T: IntoAst<Bool>> BitAndAssign<T> for Bool
impl<T: IntoAst<Bool>> BitAndAssign<T> for Bool
Source§fn bitand_assign(&mut self, rhs: T)
fn bitand_assign(&mut self, rhs: T)
Performs the
&= operation. Read moreSource§impl<T: IntoAst<Bool>> BitOrAssign<T> for Bool
impl<T: IntoAst<Bool>> BitOrAssign<T> for Bool
Source§fn bitor_assign(&mut self, rhs: T)
fn bitor_assign(&mut self, rhs: T)
Performs the
|= operation. Read moreSource§impl<T: IntoAst<Bool>> BitXorAssign<T> for Bool
impl<T: IntoAst<Bool>> BitXorAssign<T> for Bool
Source§fn bitxor_assign(&mut self, rhs: T)
fn bitxor_assign(&mut self, rhs: T)
Performs the
^= operation. Read moreSource§impl Solvable for Bool
impl Solvable for Bool
Source§fn read_from_model(
&self,
model: &Model,
model_completion: bool,
) -> Option<Self::ModelInstance>
fn read_from_model( &self, model: &Model, model_completion: bool, ) -> Option<Self::ModelInstance>
Source§fn generate_constraint(&self, model: &Self::ModelInstance) -> Bool
fn generate_constraint(&self, model: &Self::ModelInstance) -> Bool
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more