tpdb 2.1.0 → 2.1.1
raw patch · 3 files changed
+21/−5 lines, 3 files
Files
- src/TPDB/XTC/Read.hs +4/−4
- test/read_print_xml_relative.hs +10/−0
- tpdb.cabal +7/−1
src/TPDB/XTC/Read.hs view
@@ -77,13 +77,13 @@ getTRS c = do sig <- getSignature c- str <- c $/ element "rules" >=> getRulesWith Strict - let nostr = ( c $/ element "relrules" >=> getRulesWith Weak )+ let str = c $/ element "rules" >=> getRulesWith Strict + nostr = c $/ element "rules" &/ ( element "relrules" >=> getRulesWith Weak ) -- FIXME: check that symbols are use with correct arity return $ RS { signature = case sig of Signature fs -> do f <- fs ; return $ mk (fs_arity f) ( fs_name f) HigherOrderSignature {} -> []- , rules = str ++ concat nostr+ , rules = concat str ++ concat nostr , separate = False -- for TRS, don't need comma between rules } @@ -107,7 +107,7 @@ read_content c = (read . ST.unpack) <$> content c -getRulesWith s = element "rules" >=> \ c ->+getRulesWith s c = return ( c $/ ( element "rule" >=> getRule s ) ) getRule :: Relation -> Cursor -> [ Rule (Term Identifier Identifier) ]
+ test/read_print_xml_relative.hs view
@@ -0,0 +1,10 @@+import TPDB.Data+import TPDB.Pretty+import TPDB.XTC+import TPDB.Plain.Write++import Control.Monad ( forM, void )++main = void $ do+ p <- readProblemF "test/rel12.xml"+ print $ pretty p
tpdb.cabal view
@@ -1,5 +1,5 @@ Name: tpdb-Version: 2.1.0+Version: 2.1.1 Author: Alexander Bau, Johannes Waldmann Maintainer: Johannes Waldmann Category: Logic@@ -56,6 +56,12 @@ Build-Depends: base==4.*, tpdb Type: exitcode-stdio-1.0 main-is: read_print_xml.hs+ hs-source-dirs: test ++Test-Suite XML_relative+ Build-Depends: base==4.*, tpdb+ Type: exitcode-stdio-1.0+ main-is: read_print_xml_relative.hs hs-source-dirs: test Test-Suite TRS