Skip to content

Commit c5f8fcd

Browse files
committed
Add syntactic filtering of side conditions after simplification
1 parent f1d4ba6 commit c5f8fcd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

booster/library/Booster/Pattern/ApplyEquations.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,9 +967,17 @@ applyEquation term rule = withRuleContext rule $ fmap (either Failure Success) $
967967
renderOneLineText $
968968
"Known true side conditions (won't check):" <+> hsep (intersperse "," $ map pretty knownTrue)
969969

970+
-- unclear conditions may have been simplified and
971+
-- could now be syntactically present in the path constraints, check again
972+
-- FIXME: factor this filtering out into a function ans use above
970973
unclearConditions' <- catMaybes <$> mapM (checkConstraint ConditionFalse) toCheck
974+
let (newKnownTrue, stillUnclear) = partition (`Set.member` knownPredicates) unclearConditions'
975+
unless (null newKnownTrue) $
976+
logMessage $
977+
renderOneLineText $
978+
"Known true side conditions (won't check):" <+> hsep (intersperse "," $ map pretty knownTrue)
971979

972-
case unclearConditions' of
980+
case stillUnclear of
973981
[] -> do
974982
-- check ensured conditions, filter any
975983
-- true ones, prune if any is false

0 commit comments

Comments
 (0)