Module
Baskerville.Conformance
- Package
- purescript-baskerville-core
- Repository
- afcondon/purescript-baskerville
The ⊨ side of the seam: measure a rule system (⊢) against a model enumeration.
The client supplies the Oracle — the finite set of worlds consistent
with its observations (not with the engine's conclusions: the oracle
must be independent of the thing it judges), a satisfaction relation,
and the finite claim universe. Everything else is counting, which is
the lesson the bettor taught: for finite universes the semantic side
needs no solver.
The instruments:
unsound— claims the engine believes that some world refutes. Always empty for a sound rule set; a non-empty result is a bug (or contradictory observations, whichworlds == []exposes).gap— claims true in every world that the engine has not derived: the completeness gap, the honest number kibitzer measured against Z3 and any client can now measure natively.explainOr— the seam made into a function: a proof, or a countermodel, orUnderived(the gap, pointed at one claim).
#countermodel Source
countermodel :: forall world claim. Oracle world claim -> claim -> Maybe worldA world where the claim fails, if one survives.
#Refutation Source
data Refutation worldConstructors
Countermodel worldUnderivedNoWorldsNo world survives the observations at all — they contradict.
#explainOr Source
explainOr :: forall residue world claim rule axiom. Ord claim => Oracle world claim -> KB residue claim rule axiom -> claim -> Either (Refutation world) (DerivationDag claim rule axiom)The seam: ⊢ if the engine can, else what ⊨ has to say about it.
Entailed by every world, underivable by the rules: the gap, pointed at one claim.