@@ -267,6 +267,7 @@ def modify (vmap : VariableMap) (var : PremiseIndex) (f : InstMap → InstMap ×
267267for each variable in `slot.common`). Returns `true` if the variable map
268268changed. -/
269269def addHyp (vmap : VariableMap) (slot : Slot) (hyp : Hyp) : BaseM (VariableMap × Bool) :=
270+ withAesopTraceNode .forwardDebug (fun _ => return m!"VariableMap.addHyp {slot.index}" ) do
270271 slot.common.foldM (init := (vmap, false )) λ (vmap, changed) var => do
271272 if let some inst := hyp.subst.find? var then
272273 let (vmap, changed') ← vmap.modifyM var (·.insertHyp slot.index inst hyp)
@@ -278,6 +279,7 @@ def addHyp (vmap : VariableMap) (slot : Slot) (hyp : Hyp) : BaseM (VariableMap
278279`m.level + 1`. Returns `true` if the variable map changed. -/
279280def addMatch (vmap : VariableMap) (nextSlot : Slot) (m : Match) :
280281 BaseM (VariableMap × Bool) :=
282+ withAesopTraceNode .forwardDebug (fun _ => return m!"VariableMap.addMatch {nextSlot.index.toNat - 1}" ) do
281283 nextSlot.common.foldM (init := (vmap, false )) λ (vmap, changed) var => do
282284 let (vmap, changed') ← vmap.modifyM var (·.insertMatch var m)
283285 return (vmap, changed || changed')
@@ -297,6 +299,7 @@ def erasePatSubst (vmap : VariableMap) (subst : Substitution) (slot : SlotIndex)
297299each variable contained in `slot.common` is also contained in `subst`. -/
298300def findMatches (vmap : VariableMap) (slot : Slot) (subst : Substitution) :
299301 BaseM (Std.HashSet Match) := do
302+ withAesopTraceNode .forwardDebug (fun _ => return m!"VariableMap.findMatches {slot.index}" ) do
300303 if slot.index == ⟨0 ⟩ then
301304 panic! "slot has index 0"
302305 let common := slot.common.toArray
@@ -323,6 +326,7 @@ Precondition: `slot.common` is nonempty and each variable contained in it is
323326also contained in `subst`. -/
324327def findHyps (vmap : VariableMap) (slot : Slot) (subst : Substitution) :
325328 BaseM (Std.HashSet Hyp) := do
329+ withAesopTraceNode .forwardDebug (fun _ => return m!"VariableMap.findHyps {slot.index}" ) do
326330 let common := slot.common.toArray
327331 if h : 0 < common.size then
328332 let mut hyps := PersistentHashSet.toHashSet (← slotHyps common[0 ])
0 commit comments