[comp.specification] Forward references in denotational semantics

collberg@dna.lth.se (Christian S. Collberg) (05/10/91)

I am not sure whether this is the correct newsgroup for this type
of query, but the load in comp.specification is so low that
hopefully no-one will mind...

I am working on a denotational static semantic description of an experimental
Modula-2-like language (named Zuse). One (important) aspect of the language 
is that one may reference objects who's implementation is unknown at the
point of reference. Let's call this a "forward"-reference. Example:

   FORWARD CONSTANT A : INTEGER;

   ......

   CONSTANT C : INTEGER = A + 10;

   ...... 

   CONSTANT A : INTEGER = 13;


When the declaration of C is seen it is possible to perform the type-check
but it is not possible to evaluate C's value. The example is not an accurate 
description of what actually goes on in the language, but it does give the
gist of the problem. The question now is how to give a correct description of
C's value when the values on which it depends (A in the example) are not a
part of the environment in which C is declared. Similar problems must arise
in languages which allow use-before-declaration for, for example, procedures.

If anyone has a clue as to how I should approach this problem I'd be 
interested in hearing about it. Thanks.

Christian

 
-- 

--------------------------------------------------------------------
Christian.Collberg@dna.lth.se
Department of Computer Science, Lund University, 
BOX 118, S-221 00 LUND, Sweden