LogicFormatter

Trait LogicFormatter 

Source
pub trait LogicFormatter {
Show 43 methods // Required methods fn universal(&self) -> String; fn existential(&self) -> String; fn cardinal(&self, n: u32) -> String; fn at_least(&self, n: u32) -> String; fn at_most(&self, n: u32) -> String; fn and(&self) -> &'static str; fn or(&self) -> &'static str; fn implies(&self) -> &'static str; fn iff(&self) -> &'static str; fn not(&self) -> &'static str; fn necessity(&self) -> &'static str; fn possibility(&self) -> &'static str; fn past(&self) -> &'static str; fn future(&self) -> &'static str; fn progressive(&self) -> &'static str; fn perfect(&self) -> &'static str; fn habitual(&self) -> &'static str; fn iterative(&self) -> &'static str; fn passive(&self) -> &'static str; fn lambda(&self, var: &str, body: &str) -> String; fn counterfactual(&self, antecedent: &str, consequent: &str) -> String; fn superlative(&self, comp: &str, domain: &str, subject: &str) -> String; fn categorical_all(&self) -> &'static str; fn categorical_no(&self) -> &'static str; fn categorical_some(&self) -> &'static str; fn categorical_not(&self) -> &'static str; // Provided methods fn quantifier(&self, kind: &QuantifierKind, var: &str, body: &str) -> String { ... } fn binary_op(&self, op: &TokenType, left: &str, right: &str) -> String { ... } fn unary_op(&self, op: &TokenType, operand: &str) -> String { ... } fn identity(&self) -> &'static str { ... } fn wrap_identity(&self) -> bool { ... } fn modal(&self, domain: ModalDomain, force: f32, body: &str) -> String { ... } fn temporal(&self, op: &TemporalOperator, body: &str) -> String { ... } fn aspectual(&self, op: &AspectOperator, body: &str) -> String { ... } fn voice(&self, op: &VoiceOperator, body: &str) -> String { ... } fn event_quantifier(&self, pred: &str, adverbs: &[String]) -> String { ... } fn sanitize(&self, s: &str) -> String { ... } fn use_simple_events(&self) -> bool { ... } fn use_full_names(&self) -> bool { ... } fn preserve_case(&self) -> bool { ... } fn include_world_arguments(&self) -> bool { ... } fn write_comparative<W: Write>( &self, w: &mut W, adjective: &str, subject: &str, object: &str, difference: Option<&str>, ) -> Result { ... } fn write_predicate<W: Write>( &self, w: &mut W, name: &str, args: &[Term<'_>], registry: &mut SymbolRegistry, interner: &Interner, ) -> Result { ... }
}
Expand description

Trait for formatting logical expressions in various notations.

Required Methods§

Source

fn universal(&self) -> String

Source

fn existential(&self) -> String

Source

fn cardinal(&self, n: u32) -> String

Source

fn at_least(&self, n: u32) -> String

Source

fn at_most(&self, n: u32) -> String

Source

fn and(&self) -> &'static str

Source

fn or(&self) -> &'static str

Source

fn implies(&self) -> &'static str

Source

fn iff(&self) -> &'static str

Source

fn not(&self) -> &'static str

Source

fn necessity(&self) -> &'static str

Source

fn possibility(&self) -> &'static str

Source

fn past(&self) -> &'static str

Source

fn future(&self) -> &'static str

Source

fn progressive(&self) -> &'static str

Source

fn perfect(&self) -> &'static str

Source

fn habitual(&self) -> &'static str

Source

fn iterative(&self) -> &'static str

Source

fn passive(&self) -> &'static str

Source

fn lambda(&self, var: &str, body: &str) -> String

Source

fn counterfactual(&self, antecedent: &str, consequent: &str) -> String

Source

fn superlative(&self, comp: &str, domain: &str, subject: &str) -> String

Source

fn categorical_all(&self) -> &'static str

Source

fn categorical_no(&self) -> &'static str

Source

fn categorical_some(&self) -> &'static str

Source

fn categorical_not(&self) -> &'static str

Provided Methods§

Source

fn quantifier(&self, kind: &QuantifierKind, var: &str, body: &str) -> String

Source

fn binary_op(&self, op: &TokenType, left: &str, right: &str) -> String

Source

fn unary_op(&self, op: &TokenType, operand: &str) -> String

Source

fn identity(&self) -> &'static str

Source

fn wrap_identity(&self) -> bool

Source

fn modal(&self, domain: ModalDomain, force: f32, body: &str) -> String

Source

fn temporal(&self, op: &TemporalOperator, body: &str) -> String

Source

fn aspectual(&self, op: &AspectOperator, body: &str) -> String

Source

fn voice(&self, op: &VoiceOperator, body: &str) -> String

Source

fn event_quantifier(&self, pred: &str, adverbs: &[String]) -> String

Source

fn sanitize(&self, s: &str) -> String

Source

fn use_simple_events(&self) -> bool

Source

fn use_full_names(&self) -> bool

Source

fn preserve_case(&self) -> bool

Source

fn include_world_arguments(&self) -> bool

Source

fn write_comparative<W: Write>( &self, w: &mut W, adjective: &str, subject: &str, object: &str, difference: Option<&str>, ) -> Result

Hook for customizing how comparatives are rendered. Default implementation uses standard logic notation: tallER(subj, obj) or tallER(subj, obj, diff)

Source

fn write_predicate<W: Write>( &self, w: &mut W, name: &str, args: &[Term<'_>], registry: &mut SymbolRegistry, interner: &Interner, ) -> Result

Hook for customizing how predicates are rendered. Default implementation uses standard logic notation: Name(Arg1, Arg2)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§