pub enum Term<'a> {
Constant(Symbol),
Variable(Symbol),
Function(Symbol, &'a [Term<'a>]),
Group(&'a [Term<'a>]),
Possessed {
possessor: &'a Term<'a>,
possessed: Symbol,
},
Sigma(Symbol),
Intension(Symbol),
Kind(Symbol),
Proposition(&'a LogicExpr<'a>),
Value {
kind: NumberKind,
unit: Option<Symbol>,
dimension: Option<Dimension>,
},
}Expand description
First-order logic term representing entities or values.
Terms denote individuals, groups, or computed values in the domain of discourse. They serve as arguments to predicates.
Variants§
Constant(Symbol)
Named individual constant (e.g., john, paris).
Variable(Symbol)
Bound or free variable (e.g., x, y).
Function(Symbol, &'a [Term<'a>])
Function application: f(t1, t2, ...) (e.g., mother(john)).
Group(&'a [Term<'a>])
Plural group for collective readings (e.g., john ⊕ mary).
Possessed
Possessive construction: john's book → Poss(john, book).
Sigma(Symbol)
Definite description σ-term: σx.P(x) (“the unique x such that P”).
Intension(Symbol)
Intensional term (Montague up-arrow ^P) for de dicto readings.
Kind(Symbol)
Kind term (^Kind) — a Carlson-style kind-denoting entity, distinct
from a Montague intension. Used for kind reference (“the dodo is extinct”)
and as the base of a kind-level relational adjective (“dental procedure”
→ Pertains(x, ^Tooth); McNally & Boleda 2004, predicates of kinds).
Proposition(&'a LogicExpr<'a>)
Sentential complement (embedded clause as propositional argument).
Value
Numeric value with optional unit and dimension.
Implementations§
Source§impl<'a> Term<'a>
impl<'a> Term<'a>
Sourcepub fn write_to<W>(
&self,
w: &mut W,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> Result<(), Error>where
W: Write,
pub fn write_to<W>(
&self,
w: &mut W,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> Result<(), Error>where
W: Write,
Writes the term to a writer using abbreviated symbols.
Sourcepub fn write_to_full<W>(
&self,
w: &mut W,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> Result<(), Error>where
W: Write,
pub fn write_to_full<W>(
&self,
w: &mut W,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> Result<(), Error>where
W: Write,
Writes the term to a writer using full (unabbreviated) symbols.
Sourcepub fn write_to_raw<W>(
&self,
w: &mut W,
interner: &Interner,
) -> Result<(), Error>where
W: Write,
pub fn write_to_raw<W>(
&self,
w: &mut W,
interner: &Interner,
) -> Result<(), Error>where
W: Write,
Writes the term preserving original case (for code generation).
Sourcepub fn transpile(
&self,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> String
pub fn transpile( &self, registry: &mut SymbolRegistry, interner: &Interner, ) -> String
Transpiles the term to a logic formula string.
Trait Implementations§
Source§impl<'a> DisplayWith for Term<'a>
impl<'a> DisplayWith for Term<'a>
impl<'a> Copy for Term<'a>
Auto Trait Implementations§
impl<'a> Freeze for Term<'a>
impl<'a> RefUnwindSafe for Term<'a>
impl<'a> Send for Term<'a>
impl<'a> Sync for Term<'a>
impl<'a> Unpin for Term<'a>
impl<'a> UnsafeUnpin for Term<'a>
impl<'a> UnwindSafe for Term<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.