pub struct PhaseSemantics {
pub monoid: String,
pub facts: Vec<String>,
}Expand description
Phase semantics: Girard’s completeness model for linear logic based on a commutative monoid with a set of facts closed under a Galois connection.
Fields§
§monoid: StringName of the underlying monoid.
facts: Vec<String>Names of the facts (elements of the monoid satisfying the facts predicate).
Implementations§
Source§impl PhaseSemantics
impl PhaseSemantics
Sourcepub fn new(monoid: impl Into<String>, facts: Vec<String>) -> Self
pub fn new(monoid: impl Into<String>, facts: Vec<String>) -> Self
Create a new phase semantics structure.
Sourcepub fn interpret_formula(&self, formula: &str) -> String
pub fn interpret_formula(&self, formula: &str) -> String
Interpret a formula in the phase space.
Returns a string description of the interpretation (the “fact set” for that formula).
Sourcepub fn soundness(&self, formula: &str) -> bool
pub fn soundness(&self, formula: &str) -> bool
Soundness: every provable formula is valid in all phase spaces.
Sourcepub fn completeness_statement(&self) -> String
pub fn completeness_statement(&self) -> String
Completeness: every formula valid in all phase spaces is provable.
Trait Implementations§
Source§impl Clone for PhaseSemantics
impl Clone for PhaseSemantics
Source§fn clone(&self) -> PhaseSemantics
fn clone(&self) -> PhaseSemantics
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 moreAuto Trait Implementations§
impl Freeze for PhaseSemantics
impl RefUnwindSafe for PhaseSemantics
impl Send for PhaseSemantics
impl Sync for PhaseSemantics
impl Unpin for PhaseSemantics
impl UnsafeUnpin for PhaseSemantics
impl UnwindSafe for PhaseSemantics
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