Parsers #
A theory assigns its own parses to the sentences of a dataset in two ways. By a rule, it parses a
sentence from its parse in a fragment that the theories share, so that it parses alike every
sentence of the same shared parse, including sentences no dataset holds yet. By a table, it
stipulates the parse of a single sentence. A parser has both, and the table overrides the rule on
the sentences it lists (Eval.Parser). A verdict that rests on a listed sentence rests on a
stipulation, so the listed sentences are what a parser costs beyond its rule
(Parser.stipulations). A rule that reproduces every stipulated parse replaces the table without
changing a parse (Parser.parse_ofRule_eq).
How a theory parses the sentences S of a dataset into its parses P: by a rule on the parse
of a sentence in a shared fragment F, defined on the shared parses the theory covers, and by a
table of parses stipulated for single sentences, which overrides the rule.
- rule : F → Option P
The theory's parse of the sentences of each shared parse it covers.
- table : Finmap fun (x : S) => P
The parses stipulated for single sentences.
Instances For
The sentences whose parses are stipulated.
Equations
- π.stipulations = π.table.keys
Instances For
The parser of a rule alone.
Equations
- Eval.Parser.ofRule r = { rule := r, table := ∅ }
Instances For
The parse of a sentence, given its shared parse: the stipulated one if the table lists the sentence, and the rule's otherwise.
Instances For
A rule that reproduces every stipulated parse, and agrees with the parser's rule on the other sentences, parses every sentence as the parser does.