Pure classifier for the normative strength of a requirement statement.
Classifies a statement as one of :must, :shall, :must_not, :shall_not,
:should, :may, or :none. Consumed by the append/must_downgraded
guard at diff time. The classifier is pure and runs only when asked.
Summary
Functions
Classifies a statement string into a modal atom.
Returns true when moving from prior to current is a modal-class
downgrade.
Lists every modal atom in a stable order.
Types
Functions
Classifies a statement string into a modal atom.
Case and punctuation insensitive. Returns :none for any binary input
that does not carry a recognized modal verb. Negative forms take
precedence over positive forms.
Returns true when moving from prior to current is a modal-class
downgrade.
Total over the 7 × 7 Cartesian product of modals. Behaviour:
- Identity pairs return
false. - Transitions starting from
:nonereturnfalse— there is no normative force to lose. - Transitions ending at
:nonereturntrue—:noneis strictly weaker than any recognized modal. - Within a polarity family (positive
{:must, :shall, :should, :may}, negative{:must_not, :shall_not}), rank-decreasing transitions returntrue; rank-increasing transitions returnfalse. - Positive → negative cross-polarity returns
true. - Negative → positive cross-polarity returns
false— polarity loss is a separate append-only concern, not a modal-class downgrade.
@spec modals() :: [modal()]
Lists every modal atom in a stable order.