pub enum Expr<T: Types> {
Show 17 variants
Constant(Constant<T>),
Var(T::Var),
App(Box<Self>, Option<Vec<Sort<T>>>, Vec<Self>, Option<Sort<T>>),
Neg(Box<Self>),
BinaryOp(BinOp, Box<[Self; 2]>),
IfThenElse(Box<[Self; 3]>),
And(Vec<Self>),
Or(Vec<Self>),
Not(Box<Self>),
Imp(Box<[Self; 2]>),
Iff(Box<[Self; 2]>),
Atom(BinRel, Box<[Self; 2]>),
Let(T::Var, Box<[Self; 2]>),
ThyFunc(ThyFunc),
IsCtor(T::Var, Box<Self>),
Quantifier(Quantifier, Vec<(T::Var, Sort<T>)>, Box<Self>),
WKVar(WKVar<T>),
}Variants§
Constant(Constant<T>)
Var(T::Var)
App(Box<Self>, Option<Vec<Sort<T>>>, Vec<Self>, Option<Sort<T>>)
Neg(Box<Self>)
BinaryOp(BinOp, Box<[Self; 2]>)
IfThenElse(Box<[Self; 3]>)
And(Vec<Self>)
Or(Vec<Self>)
Not(Box<Self>)
Imp(Box<[Self; 2]>)
Iff(Box<[Self; 2]>)
Atom(BinRel, Box<[Self; 2]>)
Let(T::Var, Box<[Self; 2]>)
ThyFunc(ThyFunc)
IsCtor(T::Var, Box<Self>)
Quantifier(Quantifier, Vec<(T::Var, Sort<T>)>, Box<Self>)
WKVar(WKVar<T>)
NOTE: WKVars are for internal use and we serialize them as UIFs using the var argument. We also don’t emit WKVars that are in head position when translating to fixpoint.
In an ideal world fixpoint would deal with weak kvars itself.
Implementations§
Source§impl<T: Types> Expr<T>
impl<T: Types> Expr<T>
pub const FALSE: Self
pub const TRUE: Self
pub const fn int(val: u128) -> Expr<T>
pub fn eq(self, other: Self) -> Self
pub fn and(exprs: Vec<Self>) -> Self
pub fn var_sorts_to_int(&mut self)
pub fn free_vars(&self) -> FxIndexSet<T::Var>
pub fn is_trivially_true(&self) -> bool
pub fn substitute(&self, subst: &FxIndexMap<T::Var, Self>) -> Self
pub fn wkvars_in_conj(&self) -> Vec<WKVar<T>>
pub fn uncurry(&self) -> Self
pub fn has_wkvar_reachable_by_split(&self) -> bool
pub fn hoist_exists(&self) -> (Vec<(<T as Types>::Var, Sort<T>)>, Expr<T>)
pub fn as_conjunction(self) -> Vec<Self>
pub fn strip_wkvars(&self) -> Self
pub fn total_num_disjuncts(&self) -> usize
Trait Implementations§
impl<T: Types> Eq for Expr<T>
Auto Trait Implementations§
impl<T> Freeze for Expr<T>
impl<T> RefUnwindSafe for Expr<T>where
<T as Types>::Var: RefUnwindSafe,
<T as Types>::Real: RefUnwindSafe,
<T as Types>::String: RefUnwindSafe,
<T as Types>::Sort: RefUnwindSafe,
impl<T> Send for Expr<T>
impl<T> Sync for Expr<T>
impl<T> Unpin for Expr<T>
impl<T> UnwindSafe for Expr<T>where
<T as Types>::Var: UnwindSafe,
<T as Types>::Real: UnwindSafe,
<T as Types>::String: UnwindSafe,
<T as Types>::Sort: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more