Programatica Tools

Directory tools/hs2stratego

The README file is displayed below the directory index.
NameLast modifiedSize
Parent Directory  -
AST/2006-03-31 03:35 -
Base2Stratego2.hs2005-07-19 09:29 128
BaseStruct2Stratego2.hs2005-10-11 01:09 6.1K
Flags.ghc2003-06-26 02:14 47
Prop2Stratego2.hs2005-10-11 01:09 1.6K
PropDecorate2Stratego2.hs2005-07-21 00:02 2.0K
PropStruct2Stratego2.hs2006-03-31 03:35 2.6K
StrategoCmds.hs2005-07-21 00:02 3.2K
TiBase2Stratego2.hs2005-07-19 09:29 535
TiProp2Stratego2.hs2005-10-11 01:09 1.4K

What is in this directory (hs2stratego)

The code in this directory implements a simple translation of Haskell code to the Stratego representation defined in ../../Plogic. There is one new pfe command:
    pfe stratego M
For the time being, it translates a Haskell module M to a list of Decl (defined below). Unsupported forms of declarations are ignored. The translation is made before type checking.

The command pfe prove, which provided an earlier version of the translation to Stratego, has been removed. The code is still available in ../Phugs.


The subdirectory AST contains the Haskell implementation of the abstract syntax in ../../Plogic:

FileCorresponds to
AST/StrategoPattern.hs Pattern.r
AST/StrategoProp.hs Prop.r, Pred.r
AST/StrategoTerm.hs Term.r
AST/StrategoType.hs Type.r
AST/StrategoDecl.hs a type for top-level declarations
AST/StrategoAST2.hs collects and re-exports all

This directory contains the translation functions and the code to hook into the PFE framework.

StrategoCmds.hs hook it into the PFE framework
BaseStruct2Stratego2.hs base syntax translation
PropStruct2Stratego2.hs P-logic translation
Prop2Stratego2.hs knot-tying definitions
Flags.ghc compiler flags for GHC

About the translation

Changes that should be made in the Stratego files

Other things TODO

Authors: TH
Contact: TH