Expand description
Semantic invariant mining over inferred grammars.
This module is a clean-room, deterministic implementation of the D8 inference layer. It keeps the public model grammar-aware and query-shaped, while the current backend mines observations from the positive corpus until a public derivation-tree parser is available from the CFG runtime.
Structs§
- Constraint
Clause - One conjunctive clause in a disjunctive-normal-form constraint.
- Constraint
Pattern - A reusable invariant template with named non-terminal slots.
- NonTerminal
Ref - A reference to a non-terminal plus the structural query that locates it.
- Semantic
Constraint - A ranked disjunctive-normal-form semantic constraint.
- Semantic
Inference Config - Configuration for semantic invariant mining.
Enums§
- Constraint
Atom - A grammar-aware atomic predicate over derivation-tree observations.
- Length
Unit - Unit used by
ConstraintAtom::LengthField.
Functions§
- default_
pattern_ catalog - Returns the built-in semantic-invariant pattern catalog.
- evaluate_
atom - Evaluates one atom over one input.
- evaluate_
clause - Evaluates one clause over one input.
- evaluate_
constraint - Evaluates a semantic DNF over one input.
- evaluate_
probabilistic - Evaluates a semantic DNF as a probabilistic truth value.
- mine_
semantic_ constraints - Mines a ranked DNF of semantic constraints from a grammar and positive corpus.
Type Aliases§
- Constraint
Instantiator - Function type used by a constraint-pattern template.