Programatica Tools

Directory tools/pfe

The README file is displayed below the directory index.
NameLast modifiedSize
Parent Directory  -
Browser/04-Jan-2009 11:20 -
Flags.ghc21-Jul-2005 00:02 875
HuMakefile24-Nov-2003 23:32 206
Makefile02-Feb-2005 00:38 1.0K
Now.hs04-Jan-2009 11:16 73
PFE0.hs11-Oct-2005 01:09 17K
PFE1.hs13-Mar-2002 09:26 18
PFE2.hs12-Aug-2006 01:30 5.5K
PFE3.hs03-May-2005 09:23 3.2K
PFE4.hs12-Aug-2006 01:30 9.4K
PFE_HTML.hs17-Jan-2004 01:43 1.7K
PFE_Rewrite.hs20-Jul-2005 01:36 563
PFE_Rewrites.hs20-Jul-2005 01:36 812
PFE_StdNames.hs20-Jul-2005 01:36 1.6K
PFEdeps.hs21-Jul-2005 00:02 7.8K
Pfe0Cmds.hs02-Jun-2005 04:10 6.2K
Pfe1Cmds.hs19-May-2005 23:20 1.9K
Pfe2Cmds.hs06-Feb-2005 04:37 1.4K
Pfe3Cmds.hs06-Feb-2005 04:37 888
Pfe3Metrics.hs06-Feb-2005 09:08 1.0K
Pfe4Cmds.hs04-Jan-2009 11:18 6.5K
PfeChase.hs06-Feb-2005 04:37 2.4K
PfeCleanCmd.hs06-Feb-2005 09:08 119
PfeDepCmds.hs24-Jun-2005 02:51 6.2K
PfeHtmlCmds.hs01-Sep-2004 23:49 1.3K
PfeInteractive.hs06-Feb-2005 09:08 1.6K
PfeParse.hs21-Jul-2005 00:02 3.5K
PfeSocket.hs01-Sep-2004 23:49 2.1K
PfeTransformCmds.hs13-Jun-2006 00:15 1.6K
PfeVersionCmd.hs06-Feb-2005 09:08 183
myghci25-Jun-2005 09:58 138
myhugs25-Jun-2005 09:07 53
pfe.hs11-Oct-2005 01:09 1.2K
pfeclient.hs27-Sep-2003 00:33 161
pfeclient.sh20-Sep-2003 00:51 186
pfesetup12-Aug-2006 01:30 1.9K
tstpfe0.hs25-May-2002 20:03 171
tstpfe1.hs25-May-2002 20:03 164
tstpfe2.hs25-May-2002 20:03 164
tstpfe3.hs25-May-2002 20:03 336

Extensible Haskell front-end for the Programatica project

What is in this directory (pfe)

This directory contains modules implementing PFE, the Preliminary Front-End.

PFE provides the infrastructure to work with Haskell programs consisting of a number of interdependent modules, stored in files. We use the term project to denote a collection of Haskell modules that are to be processed together by PFE.

PFE has built-in make(1)-like functionality: it automatically processes files in the right order, and caches results between runs to avoid reparsing and reanalyzing files that haven't changed.

Functionality

PFE provides the following functionality, which is available both in the form of command line tools and as Haskell functions:
Level 0
Project management: creating a project, adding/removing files to a project. Computing the module dependency graph. Various module level queries.
Level 1
Computing some module properties that can be determined locally and that does not require proper parsing.
Level 2
Analysis of import/export specifications, to determine what is in scope on the top level of each module. This is based on the code decribed in our paper A Formal Specification for the Haskell 98 Module System.
Level 3
Proper parsing of Haskell modules, taking fixity declarations into account. The identifiers in the output of the proper parser are decorated so that they are unique and you can tell what original entity they refer to.
Level 4
Type checking. The type checker can output a syntax tree decorated with type annotations. It can also perform the dictionary translation.
Level 5
Function level dependency graph. This is done after type checking, to properly account for dependencies involving instance declarations. (The module is called PFEdeps.)
Chase (built on top of level 0)
Import chasing. Searches for source files containing needed modules in specified directories. This function assumes that a module M is stored in a file called M.hs or M.lhs. (This is the only function of PFE that assumes a relation between file names and module names.)
HTML (built on top of level 3)
Conversion to HTML, with highlighting and cross references.

Extensibility

PFE is designed to be extensible in several dimensions:
Functionality
It should be ease to create new command line tools that inherits and extends the provided functionality.
Language extensions.
PFE is parameterized over the source language parser, so the source language is not hardwired in PFE, but there are some restrictions: See ../property for an example of reusing PFE in an extended language.
Monadic abstraction

Authors: TH
Contact: TH