pub struct Bool { /* private fields */ }Expand description
A boolean term (predicate).
Mirrors the z3::ast::Bool call surface used by the semantics encoders.
Implementations§
Source§impl Bool
impl Bool
Sourcepub fn new_const(name: impl Into<String>) -> Self
pub fn new_const(name: impl Into<String>) -> Self
A fresh free (symbolic) boolean variable.
ordeal’s fragment has no boolean variables, so this is encoded as
var != 0 over a fresh 1-bit bitvector variable — an exact bridge.
Sourcepub fn eq(&self, other: impl Borrow<Bool>) -> Bool
pub fn eq(&self, other: impl Borrow<Bool>) -> Bool
Boolean equality (iff), encoded as (a ∧ b) ∨ (¬a ∧ ¬b) — the
fragment has no native boolean =.
Sourcepub fn ite(&self, then_: impl Borrow<BV>, else_: impl Borrow<BV>) -> BV
pub fn ite(&self, then_: impl Borrow<BV>, else_: impl Borrow<BV>) -> BV
If-then-else over bitvector branches (the bool→BV bridge;
BvTerm::Ite is native in ordeal 0.4).
Sourcepub fn simplify(&self) -> Bool
pub fn simplify(&self) -> Bool
Return self unchanged; pair with Bool::as_bool, which concretely
evaluates closed predicates (the z3 simplify().as_bool() idiom).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bool
impl RefUnwindSafe for Bool
impl Send for Bool
impl Sync for Bool
impl Unpin for Bool
impl UnsafeUnpin 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