ADPfusion 0.4.1.0 → 0.4.1.1
raw patch · 6 files changed
+41/−11 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ADP/Fusion/SynVar/Array/TermSymbol.hs +2/−2
- ADP/Fusion/SynVar/Indices.hs +18/−4
- ADPfusion.cabal +1/−1
- README.md +1/−1
- changelog.md +11/−2
- src/Pseudoknot.hs +8/−1
ADP/Fusion/SynVar/Array/TermSymbol.hs view
@@ -27,9 +27,9 @@ , Show x ) => TerminalStream m (TermSymbol a (ITbl m arr Subword x)) (is:.Subword) where terminalStream (a :| ITbl _ _ c t _) (sv:.IStatic _) (is:.ix@(Subword (i:.j)))- = map (\ (S6 s (zi:.(Subword (_:.l))) (zo:._) is os e) ->+ = map (\ (S6 s (zi:.(Subword (a:.l))) (zo:._) is os e) -> let lj = subword l j- in S6 s zi zo (is:.lj) (os:.subword 0 0) (e:.(t!lj)) )+ in {- traceShow (i,a,' ',l,j,t!lj) $ -} S6 s zi zo (is:.lj) (os:.subword 0 0) (e:.(t!lj)) ) . iPackTerminalStream a sv (is:.ix) terminalStream (a :| ITbl _ _ c t _) (sv:.IVariable _) (is:.ix@(Subword (i:.j))) = flatten mk step Unknown . iPackTerminalStream a sv (is:.ix)
ADP/Fusion/SynVar/Indices.hs view
@@ -32,22 +32,36 @@ . tableIndices cs vs ixs . map (\(S5 s zi zo (is:.i) (os:.o)) -> S5 s (zi:.i) (zo:.o) is os) -- TODO ? using the defns in TermSymbol.hs for Array syns?+ {- tableIndices (cs:._) (vs:.IVariable _) (ixs:.Subword (i:.j)) = map (\(S5 s (zi:.Subword (_:.l)) (zo:._) is os) -> S5 s zi zo (is:.subword l j) (os:.subword 0 0)) . tableIndices cs vs ixs . map (\(S5 s zi zo (is:.i) (os:.o)) -> S5 s (zi:.i) (zo:.o) is os)+ -} -- TODO minsize handling ? constraint handling?- {- tableIndices (cs:._) (vs:.IVariable _) (ixs:.Subword (i:.j)) = flatten mk step Unknown . tableIndices cs vs ixs . map (\(S5 s zi zo (is:.i) (os:.o)) -> S5 s (zi:.i) (zo:.o) is os)- where mk (S5 s (zi:.Subword (_:.l)) (zo:._) is os) = return ( (S5 s zi zo (is:.- step = error "step"+ where mk (S5 s (zi:.Subword (_:.l)) (zo:._) is os) = return (S5 s zi zo is os :. l :. j - l)+ step (s5:.k:.z) | z >= 0 = do let S5 s zi zo is os = s5+ l = j - z+ kl = subword k l+ return $ Yield (S5 s zi zo (is:.kl) (os:.subword 0 0)) (s5 :. k :. z-1)+ | otherwise = return $ Done {-# Inline [0] mk #-} {-# Inline [0] step #-}- -} {-# Inline tableIndices #-}++{-+ where mk (S6 s (zi:.(Subword (_:.l))) (zo:._) is os e) = return (S6 s zi zo is os e :. l :. j - l) -- TODO minsize c !+ step (s6:.k:.z) | z >= 0 = do let S6 s zi zo is os e = s6+ l = j - z+ kl = subword k l+ return $ Yield (S6 s zi zo (is:.kl) (os:.subword 0 0) (e:.(t!kl))) (s6 :. k :. z-1)+ | otherwise = return $ Done+-}+ {- tableIndices (cs:.c) (vs:.Static) (is:.Subword (i:.j)) = S.map (\(Tr s (x:.Subword (_:.l)) ys) -> Tr s x (is:.subword l j)) -- constraint handled: tableStreamIndex
ADPfusion.cabal view
@@ -1,5 +1,5 @@ name: ADPfusion-version: 0.4.1.0+version: 0.4.1.1 author: Christian Hoener zu Siederdissen, 2011-2015 copyright: Christian Hoener zu Siederdissen, 2011-2015 homepage: https://github.com/choener/ADPfusion
README.md view
@@ -2,7 +2,7 @@ # ADPfusion -[*generalized ADPfusion Homepage*](http://www.bioinf.uni-leipzig.de/Software/gADP/)+[*generalized Algebraic Dynamic Programming Homepage*](http://www.bioinf.uni-leipzig.de/Software/gADP/) Ideas implemented here are described in a couple of papers:
changelog.md view
@@ -1,11 +1,20 @@+0.4.1.1+-------++- bugfix in Multitape Subword Index calculations (A.F.S.Indices.hs) [this one+ is quite spurious. I needed quickcheck to find a suitable minimal example+ where Pseudoknot.hs fails]+ 0.4.1.0 ------- - initial support for multi-context free grammars - mcfgs allow for interleaved syntactic variables-- applications include: natural language modelling and pseudoknotted structures in RNA+- applications include: natural language modelling and pseudoknotted structures+ in RNA - the simplest formal language that requires this is: a^i b^j a^i b^j-- the [GenussFold](http://hackage.haskell.org/package/GenussFold) library gives a simple example grammar+- the [GenussFold](http://hackage.haskell.org/package/GenussFold) library gives+ a simple example grammar 0.4.0.2 -------
src/Pseudoknot.hs view
@@ -104,7 +104,14 @@ n = VU.length i !(Z:.t:.u:.v) = runInsideForward i d = unId $ axiom t- bs = runInsideBacktrack i (Z:.t:.u:.v)+ bs = {- let ITbl _ _ _ x _ = v in traceShow (filter (flip elem gives . fst) $ assocs x) $ -} runInsideBacktrack i (Z:.t:.u:.v)+ gives = [ Z:.subword 2 2 :. subword 3 3+ , Z:.subword 1 2 :. subword 3 5+ ]+ {-+ - u g a a c+ - 0 1 2 3 4 5+ -} {-# NOINLINE runPseudoknot #-} type X = ITbl Id Unboxed Subword Int