Skip to content

Commit ca0e798

Browse files
committed
Add syntactic filtering of side conditions after simplification
1 parent e62fba2 commit ca0e798

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
@@ -886,9 +886,17 @@ applyEquation term rule = fmap (either Failure Success) $ runExceptT $ do
886886
renderOneLineText $
887887
"Known true side conditions (won't check):" <+> hsep (intersperse "," $ map pretty knownTrue)
888888

889+
-- unclear conditions may have been simplified and
890+
-- could now be syntactically present in the path constraints, check again
891+
-- FIXME: factor this filtering out into a function ans use above
889892
unclearConditions' <- catMaybes <$> mapM (checkConstraint ConditionFalse) toCheck
893+
let (newKnownTrue, stillUnclear) = partition (`Set.member` knownPredicates) unclearConditions'
894+
unless (null newKnownTrue) $
895+
logMessage $
896+
renderOneLineText $
897+
"Known true side conditions (won't check):" <+> hsep (intersperse "," $ map pretty knownTrue)
890898

891-
case unclearConditions' of
899+
case stillUnclear of
892900
[] -> do
893901
-- check ensured conditions, filter any
894902
-- true ones, prune if any is false

0 commit comments

Comments
 (0)