
=======================================================================

			>> DISCLAIMER <<
			----------------

This software (the Elle-1.1 system for Isabelle) is provided for use in
the public domain. Responsibility for its use rests entirely with the
user, and the Commonweealth of Australia accepts no liability for such
use, its consequences or for defects in the software (whether negligent
or not).
=======================================================================


Elle - A Verification Environment for ML Programs
=================================================


This is the first release (1.1) of the source code for Elle, an experimental
verification environment for ML Programs.

Elle is so-called because it implements part of the Standard ML
Definition in Isabelle '92.

This code is far from perfect, and is subject to change. In particular,
the next version of the code will be built on top of Isabelle's
Zermelo-Fraenkel Set Theory (ZF).
  

How to install Elle
===================

Elle is built  on top of First Order Logic (FOL) in Isabelle '92, using
the New Jersey SML Compiler Version 0.75. 

The rules for both elaboration and evaluation have been implemented for
essentially the pure functional subset F of the Core of SML.

In the spirit of the Definition, elaboration and evaluation are quite
independent of each other.  The code for them lives in Elle-1.1/Elab and
Elle-1.1/Eval. Thus the directory Elle-1.1 contains the following:

	README   	this file 
	Syntax		The syntax for F, captured in Isabelle.
	Eval		The Isabelle source code for evaluation
	Elab		The Isabelle source code for elaboration

To install Elle, we first need to build the theory for the syntax of
F.  This is used by both elaboration and evaluation, and only needs to
be done once. Start up FOL in the directory Elle-1.1/Syntax, and
type

	use "ROOT.ml";

at the ML prompt. This will load the source code describing
the concrete syntax of F.

If you wish, the image can be exported to the file SML_SYNTAX using the
command

	(exportML "SML_SYNTAX"; print "Core Language Syntax");

The next step is to build the theory for evaluation.  Change to the Eval directory and then load the rootfile as follows:

	cd "../Eval";
	use "ROOT.ml";

The theory will several minutes to build. 

Numerous examples are contained in the test files, Test1.ml to
Test5.ml. These test files can be run in sequence by typing:

	use "Test.ml";
 
To save rebuilding the theoy in a new session, the image can be
exported to the file EVAL (say) using the command

	(exportML "EVAL"; print "Evaluation");

The theory for elaboration can be installed in exactly the same way.
 

Reasoning About Programs
========================

The following tactics are available (see Prover.ml):  

	eval_step_tac  	applies a language rule once
	reduce_tac	simplify goals using rules for environments
	evaluate_tac  	repeatedly applies evaluation rules, using 
			eval_step_tac and reduce_tac
	eval_tac	general-purpose tactic for proving goals by     
                        depth-first search

Interface Functions
===================

The following functions are used in the test files:

	exp_eval E s	takes a string E representing the environment
			and a string s representing the expression to be
			evaluated, and then attempts to carry out the
			evaluation using eval_tac 


(dec_eval and prog_eval are similar functions, which apply to
declarations and programs).  There are also functions exp_elab,
decl_elab and prog_elab, for elaboration.

There are some boolean reference flags which can be altered to modify
the printing of goals.

(1) Syntax Flag

SML_Syntax.show_full_syntax:

- if this flag is true, then the concrete syntax of F will be printed 
  exactly as entered.  

- if it is false, then:
  var x prints as x
  con c prints as c
  excon e prints as e

(2) Evaluation Flags

Obj.show_full_values:
- if false, values are printed in a more readable form.
Obj.show_envs: 
- if false, environments are not printed.


(3) Elaboration Flags

Obj.show_closures:
- if false, full closures are not printed.
Obj.show_contexts:
- if false, full contexts are not printed.
Obj.show_envs: 
- if false,full  environments are not printed.


=================================================================
=================================================================

A Cant and M A Ozols

Trusted Computer Systems Group
Information Technology Division
Defence Science and Technology Organisation
PO Box 1500
SALISBURY 
South Australia 5108 

(email: cant@itd.dsto.gov.au, maris@itd.dsto.gov.au)
