Enum sdml_core::model::BooleanSentence
source · pub enum BooleanSentence {
Negation(Box<ConstraintSentence>),
Conjunction(BinaryOperation),
Disjunction(BinaryOperation),
ExclusiveDisjunction(BinaryOperation),
Implication(BinaryOperation),
Biconditional(BinaryOperation),
}
Expand description
Corresponds to the grammar rule boolean_sentence
.
Boolean sentences are those that are constructed with the boolean operations negation (not), conjunction (and), disjunction (or), exclusive disjunction (xor), implication, or biconditional.
Variants§
Negation(Box<ConstraintSentence>)
Corresponds to the grammar rule negation
. Uses the prefix keyword not
or the operator $\lnot$.
Conjunction(BinaryOperation)
Corresponds to the grammar rule conjunction
. Uses the infix keyword and
or the operator $\land$.
Disjunction(BinaryOperation)
Corresponds to the grammar rule disjunction
. Uses the infix keyword or
or the operator $\lor$.
ExclusiveDisjunction(BinaryOperation)
Corresponds to the grammar rule exclusive_disjunction
. Uses the infix keyword xor
or the operator $\veebar$. Note that this operation is not a part of ISO Common Logic but
$a \veebar b$ can be rewritten as $\lnot (a \iff b)$
Implication(BinaryOperation)
Corresponds to the grammar rule implication
. Uses the infix keyword implies
or the operator $\implies$.
Biconditional(BinaryOperation)
Corresponds to the grammar rule biconditional
. Uses the infix keyword iff
or the operator $\iff$.
Implementations§
source§impl BooleanSentence
impl BooleanSentence
pub fn is_negation(&self) -> bool
pub fn as_negation(&self) -> Option<&ConstraintSentence>
pub fn is_conjunction(&self) -> bool
pub fn as_conjunction(&self) -> Option<&BinaryOperation>
pub fn is_disjunction(&self) -> bool
pub fn as_disjunction(&self) -> Option<&BinaryOperation>
pub fn is_exclusive_disjunction(&self) -> bool
pub fn as_exclusive_disjunction(&self) -> Option<&BinaryOperation>
pub fn is_implication(&self) -> bool
pub fn as_implication(&self) -> Option<&BinaryOperation>
pub fn is_biconditional(&self) -> bool
pub fn as_biconditional(&self) -> Option<&BinaryOperation>
Trait Implementations§
source§impl Clone for BooleanSentence
impl Clone for BooleanSentence
source§fn clone(&self) -> BooleanSentence
fn clone(&self) -> BooleanSentence
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more