[Haskell-cafe] library on common sub-expression elimination?
stephen.tetley at gmail.com
Thu Aug 11 11:58:48 CEST 2011
Strafunski and its successors (Uniplate, SYB, KURE) are really for
working on trees. If you want to work on graphs you would probably be
better of with something else.
I think I overlooked that you want common sub-expression
_elimination_, rather than expression simplification. There are
libraries for observable sharing (Andy Gill's recent one is the
state-of-the-art, its on Hackage but I've forgotten its name) - that
are pertinent where you have built the expressions as an embedded DSL
in Haskell and you want sharing in code you generate from the Haskell
On 11 August 2011 08:57, Anton Kholomiov <anton.kholomiov at gmail.com> wrote:
> Thank you for the reference to Strafunski libraries, I read
> HaskellWiki, but I don't have a permission to visit their site.
> All links are forbidden.
> Can it be a function:
> fun :: Eq a => Tree a -> [(Int, (a, [Int]))]
> where tuple codes nodes, and Int's code edges.
> 2011/8/11 Stephen Tetley <stephen.tetley at gmail.com>
>> Wouldn't this be dependent upon your AST and thus not readily
>> "package-able" as a library?
>> Expression simplification has been a prime example for Strafunski
>> style traversal libraries. You might be able to find examples that you
>> can adapt to your own AST written with Uniplate or similar library.
>> On 11 August 2011 05:00, Anton Kholomiov <anton.kholomiov at gmail.com>
>> > Is there a library on common sub-expression elimination?
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe