Robustness¶
pynmms.robustness
¶
Robustness policies for material base entries.
Hlobil & Brandom (2025, Ch. 5) attach to every implication its range of
subjunctive robustness (RSR): the set of premise/conclusion additions under
which the implication survives. A base entry Γ₀ |~ Δ₀ in pyNMMS carries a
:class:Robustness value that fixes a tractable fragment of its RSR:
EXACT
The entry licenses only Γ₀ ⇒ Δ₀ itself. Any addition to either side
defeats it. This is the pre-0.7 behaviour of every entry and schema; its
failure of monotonicity is "by omission rather than by defeat" (Allen,
"Implication-Space Semantics for RDF", remark after def:fitness).
MONOTONE
The entry licenses every Γ ⇒ Δ with Γ ⊇ Γ₀ and Δ ⊇ Δ₀. This is
the reading of a regime base (def:fitness of the same paper).
guarded(left, right, exclusions)
MONOTONE except when Γ meets left, Δ meets right, or some
exclusion pair ⟨x, y⟩ has x ⊆ Γ and y ⊆ Δ. left and
right are singleton defeaters; exclusions are finite conjunctive
ones (Penguin and Injured together defeat Bird |~ Flies,
neither alone). Together they describe the complement of the RSR up to
finite additions, which is what distinguishes relevant defeat from the
arbitrary defeat of EXACT entries. The guard costs O(|left| + |right| +
Σ|pair|) membership tests, independent of |Γ|.
For ontology schemas the left defeaters are concept names, instantiated
on the individuals of the matched consequent (see
:meth:pynmms.onto.base.OntoMaterialBase._applies).
Containment is unaffected by any policy, so every base built from these entries satisfies Definition 1 of Ch. 3 and the NMMS metatheory applies.
EXACT = Robustness(EXACT_KIND)
module-attribute
¶
MONOTONE = Robustness(MONOTONE_KIND)
module-attribute
¶
Robustness
dataclass
¶
How far a base entry survives additions to its antecedent and consequent.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
str
|
|
left |
frozenset[str]
|
Antecedent-side singleton defeaters (atoms, or concept names for schemas). |
right |
frozenset[str]
|
Succedent-side singleton defeaters. |
exclusions |
frozenset[Exclusion]
|
Conjunctive defeaters |
Source code in src/pynmms/robustness.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
allows(gamma, delta)
¶
True if a superset match Γ ⊇ Γ₀, Δ ⊇ Δ₀ is licensed for these sides.
EXACT entries never subset-match (the caller handles exact equality); MONOTONE always does; GUARDED does unless a defeater is present.
Source code in src/pynmms/robustness.py
defeated_by(gamma, delta)
¶
The defeaters actually present (for logging and explanation).
Source code in src/pynmms/robustness.py
from_json(data)
classmethod
¶
Parse the robustness field of a base file. Missing means EXACT.
Source code in src/pynmms/robustness.py
map_atoms(f)
¶
The same policy with every defeater atom renamed by f.
Source code in src/pynmms/robustness.py
guarded(left=(), right=(), exclusions=())
¶
A GUARDED policy (MONOTONE if there are no defeaters at all).
Source code in src/pynmms/robustness.py
split_robustness_clause(text)
¶
Strip a trailing robustness clause from a tell statement or schema line.
"A, B |~ C unless X, Y" yields ("A, B |~ C", guarded({X, Y}));
"A |~ B unless X & Y, Z" makes X & Y a conjunctive exclusion and
Z a singleton defeater; "A |~ B monotone" yields
("A |~ B", MONOTONE); anything else is returned unchanged with
EXACT. The clause is recognised only at parenthesis depth 0 and
outside quoted atoms.