tpdb 2.7.1 → 2.7.2
raw patch · 6 files changed
+13/−9 lines, 6 files
Files
- src/TPDB/CPF/Proof/Read.hs +1/−1
- src/TPDB/DP/Transform.hs +2/−0
- src/TPDB/Data.hs +3/−1
- src/TPDB/Data/Rule.hs +5/−5
- src/TPDB/XTC/Read.hs +1/−1
- tpdb.cabal +1/−1
src/TPDB/CPF/Proof/Read.hs view
@@ -115,7 +115,7 @@ getRule :: Relation -> Cursor -> [ Rule (Term Identifier Symbol) ] getRule s c = - ( \ l r -> Rule {lhs=l,relation=s,rhs=r,top=False})+ ( \ l r -> Rule {lhs=l,relation=s,rhs=r,top=False, original_variable=Nothing}) <$> (c $/ element "lhs" &/ getTerm) <*> (c $/ element "rhs" &/ getTerm) getProof :: Cursor -> [ Proof ]
src/TPDB/DP/Transform.hs view
@@ -64,6 +64,7 @@ , lhs = tmap Original $ lhs u , rhs = tmap Original $ rhs u , top = False+ , original_variable = original_variable u } ) $ rules s def = defined s@@ -83,6 +84,7 @@ , lhs = mark_top $ lhs u , rhs = mark_top r , top = True+ , original_variable = original_variable u } in RS { signature = map Marked ( S.toList def ) ++ map Original ( signature s )
src/TPDB/Data.hs view
@@ -148,7 +148,9 @@ from_strict_rules :: Bool -> [(t,t)] -> RS i t from_strict_rules sep rs = RS { rules = map ( \ (l,r) ->- Rule { relation = Strict, top = False, lhs = l, rhs = r } ) rs+ Rule { relation = Strict, top = False, lhs = l, rhs = r+ , original_variable = Nothing+ } ) rs , separate = sep }
src/TPDB/Data/Rule.hs view
@@ -6,14 +6,14 @@ data Relation = Strict | Weak | Equal deriving ( Eq, Ord, Typeable, Show ) data Rule a = Rule- { lhs :: a, rhs :: a - , relation :: Relation- , top :: Bool- -- TPDC (XTC) represents SRS as TRS,+ { lhs :: !a, rhs :: !a + , relation :: !Relation+ , top :: !Bool+ -- TPDB (XTC) represents SRS as TRS, -- e.g., "ab -> ba" is "a(b(x)) -> b(a(x))", -- and when we convert back (as we need for CPF), -- need to use the original variable in the rule- , original_variable :: Maybe Identifier + , original_variable :: !(Maybe Identifier) } deriving ( Eq, Ord, Typeable )
src/TPDB/XTC/Read.hs view
@@ -115,6 +115,6 @@ getRule :: Relation -> Cursor -> [ Rule (Term Identifier Identifier) ] getRule s c = - ( \ l r -> Rule {lhs=l,relation=s,rhs=r,top=False})+ ( \ l r -> Rule {lhs=l,relation=s,rhs=r,top=False,original_variable=Nothing}) <$> (c $/ element "lhs" &/ getTerm) <*> (c $/ element "rhs" &/ getTerm)
tpdb.cabal view
@@ -1,7 +1,7 @@ Cabal-Version: 3.0 Name: tpdb-Version: 2.7.1+Version: 2.7.2 Author: Alexander Bau, Johannes Waldmann Maintainer: Johannes Waldmann