pub enum Statement<'a> {
Import(Located<'a, &'a str>),
Fact(Located<'a, Atom<'a>>),
Negation(Located<'a, Atom<'a>>),
Assume(Located<'a, Literal<'a>>),
Premise {
name: Located<'a, &'a str>,
body: Body<'a>,
},
Rule {
name: Located<'a, &'a str>,
body: Body<'a>,
},
Check {
subject: Option<Located<'a, &'a str>>,
bidirectional: bool,
},
}Expand description
A top-level statement.
Variants§
Import(Located<'a, &'a str>)
IMPORT "path" — reuse another source (resolved by the compiler).
Fact(Located<'a, Atom<'a>>)
FACT <atom> — a TRUE assertion.
Negation(Located<'a, Atom<'a>>)
NOT <atom> — a FALSE assertion.
Assume(Located<'a, Literal<'a>>)
ASSUME [NOT] <atom> — a soft (retractable) assertion. Same shape as a
FACT/NOT, but it is a hypothesis, not a commitment: when the
assumptions cannot all hold the solver names which to drop, and it never
blames a FACT/PREMISE. The Literal carries the optional NOT.
Premise
PREMISE <name>: ... — a checked first principle.
Fields
Rule
RULE <name>: ... — a fact-producing inference rule.
Fields
Check
CHECK [subject] [BIDIRECTIONAL] — a query.
Trait Implementations§
Source§impl<'a> PartialEq for Statement<'a>
impl<'a> PartialEq for Statement<'a>
impl<'a> StructuralPartialEq for Statement<'a>
Auto Trait Implementations§
impl<'a> Freeze for Statement<'a>
impl<'a> RefUnwindSafe for Statement<'a>
impl<'a> Send for Statement<'a>
impl<'a> Sync for Statement<'a>
impl<'a> Unpin for Statement<'a>
impl<'a> UnsafeUnpin for Statement<'a>
impl<'a> UnwindSafe for Statement<'a>
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