pub enum STerm {
Lit(i64),
Var(i64),
Name(String),
App(Box<STerm>, Box<STerm>),
}Expand description
Simplified representation of Syntax terms for rewriting.
This is a flattened version of the kernel’s Term type, specialized
for the Syntax deep embedding. Unlike Term, STerm is designed
for efficient pattern matching and rewriting during simplification.
The correspondence is:
Term::App(Global("SLit"), Lit(n))->STerm::Lit(n)Term::App(Global("SVar"), Lit(i))->STerm::Var(i)Term::App(Global("SName"), Lit(s))->STerm::Name(s)Term::App(App(Global("SApp"), f), a)->STerm::App(f, a)
Variants§
Lit(i64)
Integer literal from SLit n.
Var(i64)
De Bruijn variable from SVar i.
Name(String)
Named constant or function symbol from SName s.
App(Box<STerm>, Box<STerm>)
Function application from SApp f a.
Trait Implementations§
impl Eq for STerm
impl StructuralPartialEq for STerm
Auto Trait Implementations§
impl Freeze for STerm
impl RefUnwindSafe for STerm
impl Send for STerm
impl Sync for STerm
impl Unpin for STerm
impl UnwindSafe for STerm
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