Generating Isabelle theory from a Camelot program
=================================================
by Michal Konecny

Usage: see "mkTheory -h".

The program has two parts:
1. generating definitions of predicates
2. generating theorems that restate assertions derived by various typings

ad1

The predicates are derived solely from datatype definitions.  This
part is working but needs testing to gain further confidence that the
output is really correct.

Level 2 is needed for expressing Martin and Steffen's assertions as
well as DEEL assertions.  Level 3 is needed only for DEEL assertions.

The predicates need names of fields for each constructor.  This is
currently missing in Camelot.  Until they are added to Camelot, they
get generated here as "fld1", "fld2", etc.

ad2

Nothing has been done on the theorems generation yet.  At the moment,
assertions are transferred from Camelot per function name, ie. no
assertions within the bodies are considered.  This should be
sufficient because the typing systems are straightforward enough to
simulate their inference in Isabelle when there is no need to solve recursion.

The assertions are defined in
"mrg/progs/Camelot/src/asdl/src/Assertions.asdl".  Their definition
will probably need adjusting.  At the moment they were meant to
support Martin and Steffen's linear inequalities about space usage and
DEEL's separation and preservation assertions.

Files:

Main.sml 
DT2Pred.sml : predicate definition generation
Assn2Thm.sml  : theorem generation (a dummy)
Util.sml
