Skip to content

Commit 506ac84

Browse files
committed
Forward.State: make rule state update more lazy
1 parent 9aeebca commit 506ac84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Aesop/Forward/State.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,9 @@ def eraseHyp (h : FVarId) (pi : PremiseIndex) (rs : RuleState) : RuleState :=
703703

704704
def update (goal : MVarId) (rs : RuleState) : BaseM (RuleState × Array ForwardRuleMatch) :=
705705
withAesopTraceNode .forward (fun r => return m!"{exceptEmoji r} update rule state {rs.rule.name}") do
706+
if ! rs.clusterStates.all (·.haveHypForEachSlot) then
707+
aesop_trace[forward] "skipping update since some cluster states cannot yet have complete matches"
708+
return (rs, #[])
706709
goal.withContext do
707710
withNewMCtxDepth do
708711
let some ruleExpr ←

0 commit comments

Comments
 (0)