This module implements a simple E-matching procedure as a backtracking search.
We represent an E-matching problem as a list of constraints.
- match
(gen? : Option GenPatternInfo)
(pat e : Expr)
: Cnstr
Matches pattern
patwith terme - offset
(gen? : Option GenPatternInfo)
(pat : Expr)
(k : Nat)
(e : Expr)
: Cnstr
Matches offset pattern
pat+kwith terme - continue
(pat : Expr)
: Cnstr
This constraint is used to encode multi-patterns.
Instances For
Choice point for the backtracking search. The state of the procedure contains a stack of choices.
Constraints to be processed.
- gen : Nat
Maximum term generation found so far.
Partial assignment so far. Recall that pattern variables are encoded as de-Bruijn variables.
Instances For
Context for the E-matching monad.
- useMT : Bool
useMTistrueif we are using the mod-time optimization. It is always set to false for newEMatchTheorems. - thm : EMatchTheorem
EMatchTheorembeing processed. - initApp : Expr
Initial application used to start E-matching
Instances For
Returns some uniqueId if proof was marked using markTheoremInstanceProof
Equations
Instances For
State for the E-matching monad
Choices that still have to be processed.
- instanceMap : InstanceMap
When tracing is enabled track instances here. See comment at
InstanceMap
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Similar to reportIssue!, but only reports issue if grind.debug is set to true
Equations
Instances For
Equations
Instances For
Equations
Instances For
Performs one round of E-matching, and returns true if new instances were generated.
Recall that the mapping is nonempty only if tracing is enabled.
Equations
Instances For
Performs one round of E-matching, and returns true if new instances were generated.
Equations
Instances For
Performs one round of E-matching using the giving theorems, and returns true if new instances were generated.