Philip Zucker
[conference details] [pre-recorded video] [conference video] [live video (at 00:24:43)] [slides]
(The audio is corrupted for most of the conference-recorded talk.)
Basic form of completion:
[X * 2 = X << 2] ==> {X * 2 -> X << 2}
.{X * 2 -> X << 1; (X * Y) / Y -> X} => [(X << 1) / 2 = X]
.This repairs confluence.
More advanced completion (Baader and Nipkow):
If new rewrite rules are derived, which imply the old, then the R-simplify and L-simplify rules let you compact and canonicalize your rewrite system.
Completion sounds like what Cranelift does statically to its rewrite rules before generating core for them.
Union-find is an instance of completion, in particular ground atomic completion. Instead of variables for patterns, we have atomic symbols.
Term rewrite system | Union-find |
---|---|
Run TRS | Find |
Add equation | Union |
R/L simplify | Path compression |
Term ordering | Tie breaking (e.g., depth or rank) |
Twee has the best visualization of proof production of any automated theorem prover he’s seen. Remark: The user names axioms (rewrites), which would help for identification and provenance.
TRS | E-graph |
---|---|
Canonical term | E-class |
R/L-simplify | Canonicalization |
Run rules | Extraction |
Term orders | Extraction objective |
KBO weights | Weights |
Most important point: a Compressed Ground Rewrite System can be diagrammatically represented in just as compelling or a simpler way than e-graphs:
Flattening: introduce fresh constants for every term and rank them less in term ordering.
This has two types of rules: f(e1, e2) -> e3
uses the e-node table
(which e-nodes belong to which e-classes) and e3 -> e1
uses union-find
(e-class ID to e-class ID).
cons(q1, q1) -> q1
is a
bottom-up tree automata.Run rules in reverse to generate all equivalent terms.
Bottom-up e-matching is perhaps related to the ae-graph.
Bottom-up e-matching is better behaved in regards to polynomial and destructive rewrites.
In completion, everything is put into a single sack and run repeatedly. In e-graphs, there’s a distinction between the rules and e-graph; rules don’t apply to each other to make inferences.
Set of Support strategy: there are active and passive rules, where passive rules aren’t allowed to infer among themselves; only active against passive or active against active is allowed. Passive is the eqsat rewrite rules and active is the e-graph.
Prolog and Datalog can be seen as incomplete strategies on resolution.
Propositional | Equational |
---|---|
Resolution | Paramodulation |
Ordered resolution | Superposition |
? | Completion |
Ground Ordered Resolution | E-graph / Ground Completion / Ground Superposition |
Prolog | Functional Logic Programming |
Datalog | Egglog |
Answer Set Programming | ? |
Lambda Prolog | ? |
Hypothetical Datalog | ? |
Minikanren | ? |