File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,15 @@ import Pretty (
38
38
)
39
39
import Pretty qualified
40
40
41
+ {- This log entry will be emitted if, after unifying with rewrite rules,
42
+ there is a satisfiable remainder condition -}
41
43
data DebugRewriteRulesRemainder = DebugRewriteRulesRemainder
42
44
{ configuration :: ! (Pattern VariableName )
45
+ -- ^ the state the rules unified with
43
46
, rulesCount :: ! Int
47
+ -- ^ how many rules were unified
44
48
, remainder :: ! (Predicate RewritingVariableName )
49
+ -- ^ the condition not covered by the rules
45
50
}
46
51
deriving stock (Show )
47
52
@@ -81,7 +86,7 @@ instance Entry DebugRewriteRulesRemainder where
81
86
[ " After applying "
82
87
, pretty rulesCount
83
88
, " rewrite rules"
84
- , " there is a remainder condition: "
89
+ , " there is a satisfiable remainder condition: "
85
90
, Pretty. group . pretty $ remainder
86
91
]
87
92
)
Original file line number Diff line number Diff line change @@ -306,7 +306,6 @@ finalizeRulesParallel
306
306
& fmap fold
307
307
let unifications = MultiOr. make (Conditional. withoutTerm <$> unifiedRules)
308
308
remainderPredicate = Remainder. remainder' unifications
309
- debugRewriteRulesRemainder initial (length unifiedRules) remainderPredicate
310
309
-- evaluate the remainder predicate to make sure it is actually satisfiable
311
310
SMT. evalPredicate
312
311
(ErrorDecidePredicateUnknown $ srcLoc Nothing )
@@ -316,7 +315,8 @@ finalizeRulesParallel
316
315
-- remainder condition is UNSAT: we prune the remainder branch early to avoid
317
316
-- jumping into the pit of function evaluation in the configuration under the
318
317
-- contradictory condition (the unsatisfiable remainder)
319
- Just False ->
318
+ Just False -> do
319
+ debugRewriteRulesRemainder initial (length unifiedRules) remainderPredicate
320
320
return
321
321
Step. Results
322
322
{ results = Seq. fromList results
You can’t perform that action at this time.
0 commit comments