Just for fun, this is what BMM4 looks like.
+-------------------------------------------------------------------------------------
| description:: Boolean type
| documentation:: https://splash.org
| keywords:: SPLASH representation model
| author:: Thomas Beale <thomas.beale@splash.org>
| copyright:: Copyright (c) 2025- SPLASH <https://www.splash.org>
| license:: Apache 2.0 <http://www.apache.org/licenses/LICENSE-2.0.html>
+-------------------------------------------------------------------------------------
|
| Built-in class representing minimal interface of Boolean type.
|
builtin class Boolean
is_a Any
feature_group("operators")
|
| Logical conjunction (and-ing) of `Self` with `other`.
|
func conjunction (other: Boolean): Boolean
alias
"and", "∧" ;
post_cond
post_de_Morgan: Result = ¬(¬Self ∨ ¬other);
post_commutative: Result = (other ∧ Self);
;
|
| Logical disjunction (or-ing) of `Self` with `other`.
|
func disjunction (other: Boolean): Boolean
alias
"or", "∨" ;
post_cond
post_de_Morgan: Result = ¬(¬Self ∧ ¬other);
post_commutative: Result = (other ∨ Self);
post_consistent_with_semi_strict: Result ⇒ (Self ∨ other);
;
|
| Logical exclusive or of `Self` with `other`.
|
func exclusive_disjunction (other: Boolean): Boolean
alias
"xor", "⊻" ;
post_cond
post_definition: Result = (Self ∨ other) ∧ ¬(Self ∧ other);
;
|
| Boolean implication of `other` (semi-strict).
|
func implication (other: Boolean): Boolean
alias
"implies", "⇒" ;
post_cond
post_definition: Result = (¬Self ∨ other);
;
|
| Boolean negation of the current value.
|
func negation: Boolean
alias
"not", "¬" ;
;
invariant
involutive_negation: is_equal (¬(¬Self)) ;
non_contradiction: ¬(Self ∧ (¬Self)) ;
completeness: Self ∨ (¬Self) ;
end