Package transf
[frames] | no frames]

Package transf



Term transformation framework.

This framework allows to create complex term transformations from simple blocks. It is inspired on the Stratego/XT, adapted to Python idiosyncracies.

The basic block is a transformation -- an object which attemtps to transform a aterm.term.Term within a specified context and returns the transformed term on success or raises an exception on failure. A context is a mutable dictionary-like object, which holds named term variables.

Another implicit concept is a transformation factory -- any callable which takes a combination of terms, transformations, and other transformations factories and returns a transformation. Due to Python's dynamic typing there is no need for transformation factories to derive a particular class. Therefore any transformation class or transformation yielding functions can be used.

To help distinguish between transformations and transformation factories, throughout the code, transformations instances' names start with a lower-case letter, while transformations factories start with a capital.

More information about Stratego/XT can be found in its Manual and its API Documentation.

Package Tree for transf
Package Tree for transf



Submodules