* Design notes about Grail and Logic definition in Isabelle  -*- outline -*-
===========================================================


** da, Sat Feb 15 03:  How much abstract syntax do we include?

Summary:   include the exactly subset that Isabelle handles,
	   separate declarations (defining a program) from method
	   bodies (used in operational semantics).

Rethinking Rovereto discussions, I think we should include Grail
abstract syntax for class definitions, etc, after all, and define the
gdf translation as we originally imagined it, as a direct export of
the abstract syntax of a Grail program (except that it might occur at
a later stage in the gdf translation, e.g. after type-checking there).

This means that we have the possibility to do type-checking and other
static semantics in Isabelle if we want.  But the class environment
(program, type classenv) should be extracted before executing the
operational semantics.

I don't think it would be inordinately ineffcient to do the
elaboration of class definitions in Isabelle with some rewriting rules
(at least, while our programs are small).  But these should be
executed before the operational semantics (roughly corresponding to
compiling a class file, before executing it).  The definition that
mixed the two things up was a bit confusing IMHO.

The operational semantics is based on the abstract syntax for method
bodies, which includes type declarations that get ignored, since the
operational semantics is untyped at present.  This seems fine: later
we might make use of the type declarations.

Any simplifications/limitations made in the exporting of theories from
gdf to Isabelle should be clearly explained somewhere, and the
Isabelle representation of the abstract syntax should be exactly what
Isabelle deals with, rather than containing extra constructors.  The
reason for this is that proofs may want to use induction over the
syntax, and might get stuck on constructors which don't appear in
semantics.

