pub enum SymbolicRepresentation {
Atom(String),
And(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>),
Or(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>),
Not(Box<SymbolicRepresentation>),
Implies(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>),
Iff(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>),
Expr(String),
}Expand description
SymbolicRepr defines a general-purpose symbolic representation that supports identifiers, logical operations, expressions, and compound terms.
This type is used to reason over symbolic causality nodes (e.g., rules, logic graphs, theorem-like structures). Box is required for recursive enum definitions.
Variants§
Atom(String)
A single symbolic identifier (e.g., “A”, “TempHigh”).
And(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>)
A logical AND: A ∧ B
Or(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>)
A logical OR: A ∨ B
Not(Box<SymbolicRepresentation>)
A logical NOT operation: ¬A
Implies(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>)
A logical implication: A → B
Iff(Box<SymbolicRepresentation>, Box<SymbolicRepresentation>)
A logical biconditional: A ↔ B
Expr(String)
A custom expression: string-based fallback.
Implementations§
Source§impl SymbolicRepresentation
impl SymbolicRepresentation
pub fn new_atom(atom: String) -> Self
pub fn new_and( lhs: Box<SymbolicRepresentation>, rhs: Box<SymbolicRepresentation>, ) -> Self
pub fn new_or( lhs: Box<SymbolicRepresentation>, rhs: Box<SymbolicRepresentation>, ) -> Self
pub fn new_not(expr: Box<SymbolicRepresentation>) -> Self
pub fn new_implies( lhs: Box<SymbolicRepresentation>, rhs: Box<SymbolicRepresentation>, ) -> Self
pub fn new_iff( lhs: Box<SymbolicRepresentation>, rhs: Box<SymbolicRepresentation>, ) -> Self
pub fn new_expr(expr: String) -> Self
Trait Implementations§
Source§impl Clone for SymbolicRepresentation
impl Clone for SymbolicRepresentation
Source§fn clone(&self) -> SymbolicRepresentation
fn clone(&self) -> SymbolicRepresentation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SymbolicRepresentation
impl Debug for SymbolicRepresentation
Source§impl Display for SymbolicRepresentation
impl Display for SymbolicRepresentation
Source§impl Hash for SymbolicRepresentation
impl Hash for SymbolicRepresentation
Source§impl PartialEq for SymbolicRepresentation
impl PartialEq for SymbolicRepresentation
impl Eq for SymbolicRepresentation
impl StructuralPartialEq for SymbolicRepresentation
Auto Trait Implementations§
impl Freeze for SymbolicRepresentation
impl RefUnwindSafe for SymbolicRepresentation
impl Send for SymbolicRepresentation
impl Sync for SymbolicRepresentation
impl Unpin for SymbolicRepresentation
impl UnwindSafe for SymbolicRepresentation
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