pub enum IrForm {
Show 14 variants
Predicate {
relation: Spur,
args: Vec<IrTerm>,
},
ForAll(Spur, Box<IrForm>),
Exists(Spur, Box<IrForm>),
And(Box<IrForm>, Box<IrForm>),
Or(Box<IrForm>, Box<IrForm>),
Not(Box<IrForm>),
Past(Box<IrForm>),
Present(Box<IrForm>),
Future(Box<IrForm>),
Obligatory(Box<IrForm>),
Permitted(Box<IrForm>),
Count {
var: Spur,
count: u32,
body: Box<IrForm>,
},
Biconditional(Box<IrForm>, Box<IrForm>),
Xor(Box<IrForm>, Box<IrForm>),
}Expand description
The Well-Formed Formulas (WFFs) of our First-Order Logic engine.
Variants§
Predicate
An n-ary predicate: P(t1, t2, …, tn)
ForAll(Spur, Box<IrForm>)
Universal quantification: ∀x. P(x)
Exists(Spur, Box<IrForm>)
Existential quantification: ∃x. P(x)
And(Box<IrForm>, Box<IrForm>)
Logical Conjunction: A ∧ B
Or(Box<IrForm>, Box<IrForm>)
Logical Disjunction: A ∨ B
Not(Box<IrForm>)
Logical Negation: ¬A
Past(Box<IrForm>)
Past tense wrapper (past P): P was true.
Present(Box<IrForm>)
Present tense wrapper (now P): P is true now.
Future(Box<IrForm>)
Future tense wrapper (future P): P will be true.
Obligatory(Box<IrForm>)
Deontic obligation (must P): P ought to be true.
Permitted(Box<IrForm>)
Deontic permission (may P): P is permitted.
Count
Exactly count distinct x satisfy body.
Count(var, count, body)
Biconditional(Box<IrForm>, Box<IrForm>)
Biconditional: A ↔ B (expanded at flattening to And(Or(Not(A), B), Or(Not(B), A)))
Xor(Box<IrForm>, Box<IrForm>)
Exclusive or: A ⊕ B (expanded at flattening to And(Or(A, B), Not(And(A, B))))
Trait Implementations§
impl StructuralPartialEq for IrForm
Auto Trait Implementations§
impl Freeze for IrForm
impl RefUnwindSafe for IrForm
impl Send for IrForm
impl Sync for IrForm
impl Unpin for IrForm
impl UnsafeUnpin for IrForm
impl UnwindSafe for IrForm
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