A Haskell Nominal ToolkitChristophe Calvès (Christophe.Calves AT kcl ac uk)Januray 9th 2009 |
Haskell Nominal ToolKit(HNT) is composed of an Haskell library providing:
and an interactive rewriting tool providing rewriting/updating on any subterm.
The interactive tool has to be seen as a tech-demo of the library possibilities.
darcs get http://perso.crans.org/calves/hnt/hnt-darcs
To install HNT, GHC is required. The package uses cabal, you can build and install it in the usual cabal way. Run in a shell:
cd <package directory> runhaskell Setup.lhs configure runhaskell Setup.lhs build runhaskell Setup.lhs install
The interactive tool executable is named hnt. Is has to be run in a shell.
In the following, X represents an Integer, t,
s and u three terms.
A term is either:
a:X is an atom
c:X is a constant
v:X is a variable
(a:X a:X) t is a swapping
[a:X] t is an abstraction
(t , u) is a pair
fc is {a:X ... a:X}#v:X ... {a:X .... a:X}#v:X
rl is fc |- t -> s
tc is fc |- t
help: print an help message
move down: move to the first subterm
move down to left: move to the left subterm
move down to right: move to the right subterm
move down to modal: move to the modal subterm
move up: move up
move down: move to the next unvisited position
update t: replace the current subterm by t
rewrite rl: apply the rule rl to the current subterm
context fc: replace the freshness context by fc
This document was translated from LATEX by HEVEA.