Commit 971d25b2 authored by Paul Ogris's avatar Paul Ogris
Browse files

Remove #instance from output

The relaxed problem does not need these. It would only throw off gringo later.
parent 4be03bb3
......@@ -7,7 +7,7 @@ import Control.Monad ( guard )
relax :: [Statement] -> [Statement]
relax stmts =
map normalRules . concatMap splitChoices . filter (not . isConstraint) $ stmts
filter (not . isInstance) . map normalRules . concatMap splitChoices . filter (not . isConstraint) $ stmts
where
normalRules (StmtRule (Rule h@HeadAtom{} bs)) =
StmtRule (Rule h (mapMaybe removeNegation bs))
......@@ -23,6 +23,9 @@ relax stmts =
isConstraint (StmtRule (Rule HeadFalse _)) = True
isConstraint _ = False
isInstance StmtInstance{} = True
isInstance _ = False
instances = instanceSigs stmts
removeNegation :: BodyElement -> Maybe BodyElement
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment