Compiler generation from relational semantics - Springer Link

3 downloads 0 Views 1MB Size Report
Also Plotkin pro- posed the ... James Clerk Maxwell Building, The King's Buildings, Mayfield Road, ... but automated, transformational approach for relational se-.
COMPILER

GENERATION

FROM

Mads Frank

P~LATIONAL

SEMANTICS

Dam I Jensen 2

ABSTRACT We consider the problem of automatically deriving correct compilers from relational semantic specifications of programming languages. A relational semantics is an assignment of initial-state final-state relations (defined by means of proof rules) to programs. Compilers are generated in three steps. First, the language definition is transformed into a stack semantics in which the sto~age of semantic values is made explicit. Next, stack rules are assembled into a socalled language scheme containing exactly one rule for each language construct. We consider languages for which non-deterministic branches may be replaced by deterministic ones. Finally, rules are expanded for the purpose of recursion detection, thus obtaining schemes which may be used for code generation in a syntax-directed compiler.

I. I n t r o d u c t i o n In t h i s tions

correct way.

compilers

The

between

term

73].

tional

use

proposed tive

Their

by Greif

the use

tural

operational

understanding

is m u c h

however,

and Meyer

of r e l a t i o n a l

have

the

in

a much

[Hoare/

less

in t h a t

semantics

of

loops.

to t h e d e d u c t i v e

and Lauer.

operathey Our

systems

81])

as an a l t e r n a -

Also

Plotkin

semantics

in his w o r k

semantics

([Plotkin

81]),

of r e l a t i o n a l

semantics

has been

and

pro-

on s t r u c -

in f a c t heavily

our in-

by his work.

IAuthors' address: University of Edinburgh, Dept. of Computer Science, James Clerk Maxwell Building, The King's Buildings, Mayfield Road, Edinburgh, EH9 3JZ, U.K. 2Authors'

as

to h a v e o r i g i n a t e d

here,

([Greif/Meyer

of H o a r e

to p r o g r a m s

and Lauer

considered for

in a n a u t o m a t i c

is g i v e n

seems

closer

specifica-

of d e r i v i n g

states.

of Hoare

properties

semantics

posed

fluenced

the one

semantics

to t h e

final

semantics"

semantics,

semantic

the problem

meaning

and

theories

than

and

specifications

semantics initial

invariant

relational

such

"relational

flavour

relational

languages

the relational

Lauer

e.g.

consider

from

In r e l a t i o n a l

relations

with

paper we

of p r o g r a m m i n g

address: Aalborg University Centre, Institute of Electronic

Systems, Strandvejen 19, 4, DK-9000 Aalborg, Denmark

The basic constituent ductive system

of a relational

semantics

is a de-

(in the style of [Plotkin 81]) consisting of

a finite number of axioms and rules of inference,

from which

formulae denoting valid state transitions may be proved. Formulae in such systems are expressions y[p]y', where ¥ and y' are expressions denoting initial and final states respectively,

and p is a construct

language under consideration. are constructed

(or terminal)

in the programming

Axioms and rules of inference

from such formulae together with predicates

on states. We shall neither allow quantification definition of states, operational

and it is from this restriction

nature of the relational

Relational

nor circular

semantics

semantics originates.

in the present setting has been used

for several example languages

in e.g.

[Greif/Meyer

81] and

[H. Nielson 84]. It seems that most of the language cation ideas of Plotkin rectly transferable

the

specifi-

([Plotkin 8i]) are more or less di-

to the domain of relational

semantics

(at least for languages not involving parallellism). The traditional

approach to semantics-directed

compiler

generation has been to provide a universal compiler, e.g.

[Mosses 79],

[Jones/Schmidt

80],

as in

[Jones/Christiansen

[Mosses 80] and [Sethi 83] for variants of denotational tics

seman-

([Stoy 77] and [Gordon 79]). This approach is also appli-

cable in our case, noting that a relational sentially just a collection of first-order form

81],

([Kowalski 74]). Thus a compiler

sidered a universal compiler approach,

however,

considerations

semantics sentences

is esin Horn

for Prolog may be con-

for relational

semantics.

This

has the major drawback that implementation

are moved from the domain of language speci-

fications to the

(considerably more general)

Prolog programs. On the other hand works on

(non-automated)

domain of

(pure)

semantics-di-

rected compiler development usually takes a transformational approach

([Milne/Strachey

76],

[Ganzinger 80] and [Wand 82]),

that is, compilers are developed mations on denotational complex correctness but automated, mantics.

through a series of transfor-

language definitions

proofs.

involving quite

In this paper we apply a similar,

transformational

approach

for relational

se-

We shall be concerned mainly with ~'ordinary" (deterministic) programming languages and the control flow aspects of their implementation. Three major problems concerning compiler generation are identified. First,

the problem of deriving a machine state

uniform to all types of program fragments,

such that all non-

elementary computations can be viewed as a sequential composition of other computations,

as defined by the proof rules.

This problem is solved by the generation of a stack semantics. Next,

the problem of collecting rules defining the meaning

of identical language constructs,

and, if possible,

replacing

non-deterministic branches by deterministic ones. To this end the stack semantics is transformed into a "language scheme", much like a recursive program scheme

(cf.o [De

Bakker/De Roever 72]). Finally, schemes,

the problem of detecting recursion in language

such that language scheme rules may be used as sche-

mes for use in code generation. This,

however, requires that

"definition by syntactical equivalence"

is used only to a li-

mited extent. The approach taken throughout the paper is basically operational - systems are given operational semantics, which are then proven congruent using mainly In section 2 relational

(numerical)

induction.

semantics is more precisely defined

- we shall, due to the subject of this paper, be rather thorough on this point.

In sections 3-8 the various trans-

formations on semantics are presented and proved to be correct. As most proofs are entirely routine, been very briefly outlined.

Finally,

they have just

in section 9, some direc-

tions for future work are briefly discussed.

2. Relational semantics The relational semantic metalanguage used in this paper is much like the operational semantics of Plotkin

([Plotkin 81])

with the major difference that all transitions are directly from initial to terminal states.

A language d e f i n i t i o n will c o n s i s t of three parts: nition of the language data types used set of rules,

syntax,

(e.g. stores,

comprising

A defi-

a d e f i n i t i o n of the semantic environments),

a formal calculus,

and a finite from w h i c h va-

lid state t r a n s i t i o n s m a y be deduced. P r o g r a m s are c o n s i d e r e d n~o, w h e r e p l , . . . t P n

bol. To each o p e r a t i o n

symbol

sort in the sense of e.g. p r o g r a m s m a y be c o m p o s e d significance

as a b s t r a c t

are programs

is a s s o c i a t e d

[ADJ 78], r e f l e c t i n g

(e.g. commands,

expressions).

the fact that semantic

The set of sorts

is d e n o t e d by S, the set of

symbols by H and the set of p r o g r a m s

Z is indexed by S~xS

sym-

an a r i t y and a

of p h r a s e s of d i f f e r e n t

(which we assume to be finite) operation

trees A ( P l , . . . , p n ) ,

and A is an o p e r a t i o n

(arity and sort),

by P. The set

and the set P is indexed

by S. As w e are concerned m a i n l y w i t h c o n t r o l compiler

generation,

we regard

flow aspects of

states and o p e r a t i o n s

on sta!

tes as primitive.

We shall

simply associate

to each sort s6S, namely the initial

sets D s and D s

and terminal

E.g.

U (DsUD~). s£S for e x p r e s s i o n s w i t h o u t sideeffects,

states of

the sort s, letting D =

m i g h t be a m a p p i n g of identifiers state a value alone. a unique

set of

to values,

Furthermore,

(meta-~ v a r i a b l e

sort and state set. T h r o u g h o u t

~'~I"'"

are used as p r o g r a m and ~'~1'''"

variables

state

and the t e r m i n a l

for the purpose of typing, symbols

program

Expressions

the initial

is a s s o c i a t e d

to each

the paper symbols as state variables.

over p r o g r a m s and states are c o n s t r u c t e d

using

together w i t h elements of sets ~,~ and ~ of opera-

tion symbols to w h i c h an arity and a sort is a s s o c i a t e d m u c h as for programs

above.

functions ~: p n

Dm P

operation

symbol

T = {tt,ff} partial

Operation

symbols ~6~ and ~6¢ d e n o t e s

p and ~: p n

D m D r e s p e c t i v e l y and an P P ~6H d e n o t e s a p r e d i c a t e ~: pn ~p D m ~pT, w h e r e P

is the set of thruthvalues.

function

space constructor

product X s l X . . . X X s n

Here ~

denotes the P and X n and n-ary c a r t e s i a n

for sorts Sl,...,Sn6S.

Thus,

and al,...,o m are p r o g r a m and state v a r i a b l e s sorts and ~6Y is a c o r r e s p o n d i n g ~(Vl .... ,~n) (o1,...,Om) mined by ~. N o t i c e that,

operation

if V l , . . . , ~ n

of a p p r o p r i a t e

symbol,

then

is an e x p r e s s i o n of the sort d e t e r as o p e r a t i o n

symbols A6X m a y be v i e w e d

as d e n o t i n g symbol

functions

~6(~-I)

from a state closure stored

A:

could d e n o t e

given

in the target

in

Now,

programs

ving

only

- thus

(an a s s i g n m e n t

of

is c a l l e d

in ~,~ and

form as p r i m i t i v e the c o m p i l e r much

ope-

an in~ will

instructions

generator

is a c t u a l -

like the a p p r o a c h

variables,

"partially variables

of v a l u e s

~6~(V)

mapping

used

81].

free p r o g r a m

an o p e r a t i o n

of a

of its free v a r i a b l e s

denotations

a set V of p r o g r a m

and ~(V)

of a p r o c e d u r e

The o p e r a t i o n

modified

an o p e r a t i o n

or the c o n s t r u c t i o n

to an i n t e r p r e t a t i o n ,

given

~(V)

a retrieval

and the v a l u e s

K into their

[Jones/Christiansen

~(V),

Intuitively,

of Y,¢ and ~. The o p e r a t i o n s

show up in a s l i g h t l y

ly r e l a t i v e

e.g.

state component.

in ~,¢ and

terpretation

Z~.

an identifier,

from a f u n c t i o n in some

rations

pn pp,

we m a y d e f i n e

evaluated" in V.

to variables)

m a y be r e g a r d e d

Thus,

operations given

a valuation

of the v a r i a b l e s

as d e n o t i n g

sets

invol-

in V,

a function

~: Dn~ P under this valuation. We shall a m b i g u o u s l y a b b r e v i a t e P Y(¢), ¢(~) and K(~) by ~, ¢ and ~ r e s p e c t i v e l y - this n o t a t i o n will

be u s e d

Definition for some

throughout

I:

A formula

s6S,

The m e a n i n g

Starting denoted vided

is an e x p r e s s i o n

of a formula

e1[e2]e 3

and valuation)

in the

should

state d e n o t e d

programs

(relative

be f a i r l y

by el,

and

states

provable

an i n t e r p r e t a t i o n / v a l u a t i o n d and d' are the states (assuming

D s, Ps and

occurrences or applied.

(or p r o g r a m

by e I and

the pair

assigned

of proof

rules

Intuitively

it is the first

execution).

by e 3 - pro-

Thus,

if

~ and - g i v e n denoted

by e2,

e 3 respectively

, w h e r e

defined

distinct

is g i v e n o p e r a t i o n a l l y

the set of l a n g u a g e

We use the n o t a t i o n letting

schemes

~ of ~, • and H

set of configurations,

tution

error

action.

81] r e l a t i v e

operations

L denote

the t r a n s i t i o n

l~i~n,

branching,

binding

[Plotkin

from the c o r r e s p o n d i n g

viation

A n action

action

U denotes

the empty

of l a n g u a g e

and an i n t e r p r e t a t i o n

sequences

~6¢(V)

to d i s a m b i g u a t e .

in the style of

~i and

sequencing,

deterministic

The s e m a n t i c s

relation

~6~(V),

variables.

and an atomic

• denotes

and

h6H,

non-predicate.

the s t r o n g e s t

Letting

symbols,

of

all ~i'

as an a b b r e -

(simultaneous)

substi-

13

:

i b < ~ , C > ~ l ~,

i)~i¢(~)~

PHI 1 :

if ¢£~,

PL I :

I~~I ~ PSI11 :

l)~!,

if ~6Y-P,

PSI2 ! :

1)~l,

if p6P, p=A(p)

and

(A (V) ~h) 61o !

i~ ~l

CPI 1 :

iP~l£ BTi(1) (h) if and

Of course we are particularly inte-

rested in the behaviour of T 1 on actions p6P - that is, programs without free program variables.

This explains why no

rules are present for actions of the form ~£V. Notice also that no rules are present for error-actions as should be expected. Our definition of behaviour leads us to define an equivalence relation ~ such that for all h1,h26H , high 2 if and

14

only if for all 16L BTI(1) (hl)=BTI(1) (h2) - i.e. have the same,

independently

of the particular

if they be-

language

scheme. It is easy to see that s is in fact a congruence tion. First

it is useful

to state

(letting

rela-

• denote rela-

tional composition):

Lemma

I:

For all 16L, h1,h26H:

BT I(I) (h 1"h 2) = BTI(1) (h 1)0BTl(1) (h 2) . Proof:

Lemma

Immediate

2:

from the definition

For all hl,hl,h2,h½6H '

a)

hl-h 2 ~ h~.h 2',

bl

hiUh 2

C)

~'hl,h 2 ~ z~h~,h~.

Proof:

of BT 1 and A 1.

and ~6K,

if hl~h 4 and h2-h = 2' then:

h Uh ,

a) from lemma

I, b) from BRI l' BR21'

c) from TSTI l,

TST21 . Thus the set H/~ of actions modulo behavioural is actually well-defined

with operations

[hl].[h2]=D[h1"h2 ] and [hl]U[h2]=D[hiUh2], the equivalence class of ~ containing h. P~position

I:

The structure

equivalence

• and U defined where

[h] denotes



b)



is a monoid,

c) The operation Proof:

By lemma

is a c o m m u t a t i v e

• distributes

I and A I.

o

monoid,

over U.

by

and

has the

15

Now consider a language definition ~ in stack form. Let Rules(D,A) denote the set of rules in D defining the program operator A6Z. The language scheme corresponding to D is generated quite easily using the mappings A and R of antecedents and rules in definitions in stack form into actions defined by:

and, if r = FI .... 'Fn, where F has the form ~[A(~)]~(~'), then: F R(r)=A(F I)-....A(F n)-~. If Rules(D,A)={rl,...,rm} then the language scheme generated from D contains the production:

A (~) ~

~

R(r I)U...UR(r m), if m>1

~error,

if m=o

where A(~) is the program structure assumed common to all consequents of rules rl,...,r m. Exam~!e_3:

Consider a language with sorts Exp, Cmd, opera-

tions Zs,Cmd={Skip},ZCmdCmd,Cmd={Seq} and ZExpCmd,Cmd={WhileDo}. Let D denote a primitive set of states and let DExp=DCmd=D Exp = D~md =DThe rules are: X31 : X32:

o[Skip]~ ~[Cl]J',~'[c2]o" ~'"'["Seq(cl,c2)]~,,

X33:

~,,,[e]o',isTrue(a',),~'[Seq(c,WhileDo(e,c)!]~" ~[WhileDo(e,c)]~"

X34:

~ [e]o, ,isFalse (c ~) [WhileDo (e,c) ]~'

16

This d e f i n i t i o n

is o b v i o u s l y

in stack form. L e t t i n g

the i d e n t i t y on D the following

language

i denote

scheme is obtained:

S k i p ~ I, Seq(cl,c2)~I'c1"I'c2"I, WhileDo(e,c)~i-e-isTrue-I-Seq(c,WhileDo(e,c))-I

U

I.e-isFalse-I

Notice

that as IEe almost all o c c u r r e n c e s

guage scheme m a y be deleted,

Theorem

I,

(Correctness

Let ~ be an a r b i t r a r y 1 the language and d,d'6D, Proof:

o

of language

l~~d'.

from 0. Then for all p6P

in the height of proof

trees,

in the length n of the d e r i v a t i o n

scheme@

schemes m a y be implemented

e.g. using some kind of b a c k t r a c k i n g This,

and

[]

5. Simple language Language

in stack form,

if and only if for some 16L s, p6P and h£H s) it will be the case that

d'=~1(...(~n(d))...) more,

state d6D

(that is,

for some n>_o and ~1 ..... #n6¢. F u r t h e r -

it is clear that any reachable

d=~1(...(~n(~))...) and ~I .... '~n 6~"

for some constant

state d6D may be w r i t t e n symbol

~ over D,n>_o

21

Now consider an expression #i(.°.(~n(6))...)

with n~o and

V the set of (program) variables free in #1,...,~n,~. Let w denote an arbitrary valuation. Then for any operation ~65-P such that P=~(~l (''" (~n (~))" "') is defined it should be the case that p=w(~) for some v6V. If this condition is satisfied by all interpretations

it seems reasonable to

assume, that corresponding operations ~i,%1,I..., #l,n,61 on label values in fact do exist such that - for any "label valuation" Wl:V~ f Labels such that Wl(~)

is defined if and only if

w(~) is defined - ~i(~1,I (... (~l,n(~l))...))=Wl(~) if and only if ~(~I ('''(~n (~))'''))=w(~)" Let ~', ~' denote the sets of such "label operations" corresponding to P-P,~. Target programs 16I are defined by: ,::=l;ll~l,licall

iI~jexec ~Ireturnierror,

where ~6H, ~6¢', ~6~' and 161abels. The structuring of target programs present here is easily eliminated using associativeness and replacing target programs in branches by labels. This, however, is quite inessential to the present treatment and will thus be omitted. Target programs are interpreted relative to an environment binding labels to programs and a stack of programs remaining to be executed

(a control stack). Let Tt=, where:

Y6Ft=DxC+D c6C=I* ~t~Ux((DxI~)xF t) u6U=labels~fI

(configurations), controls), (the transition relation), and environments).

The transition relation is defined by At: NIL t :

u)~tc

CALLt:

u)=t

PHI t :

u)~t

22

EXECt:

u~ ~t

RET t :

u~~t

CP t

:

u)~t

TST t :

u)~t ~ d ' t The compiler generator is a mapping forest of expansion a target program

cg:F* P*I taking a P trees in F, a source program and yielding

(and with it an environment

fined using the mapping The mapping

C:FxExW~I

u6U).

It is de-

by cg(f) (p)=C(f,f(p)~1,f(p)~2).

C is defined by cases on the tree e£E, and noting,

that the only target programs are those obtained

to be bound in the environment

from trees representing

programs

p6P, we

set labels=P. Now the mapping the elaboration C(f,'e,w)

by

(for simplicity

u6U through

describing

side effects):

= return,

C(f,-error,w) C(f,.~,w)

C is defined

of environments

= error,

= ~', where ~'=~[w]

with all free variables

- i.e. ~ in % replaced

by w(~).

This case gives for all such ~ rise to the bindings u(w(~))=cg(f) (w(~))

in u,

C(f,.~,w)

= exec ~, if ~6~-P,

C(f,-~,w)

= cg(f) (w(~)),

C(f,-A(p),w) C(f'tA(iPlw)

= call A(p) [w], = call A(p)[w],

leaf labelled A(p)

if there is a

in e. This case gives rise to

the binding u(A(p)[w])

= C(f,e,w)

in u,

23

C(f, A(

w) = C(f,e,w),

if no leaf in e is labelled A(p)~

C(f,e1~2,w)

= C(f,el,w) ; C(f,e2,w) ,

C(f,el/~e~,W)

= ~C(f,el,w),

It is easily seen,

C(f,e2,w),

that for any expandable,

if ~6K.

simple language

scheme I£L fined.

and p r o g r a m p6P, cg(F(1)) (p) is in fact w e l l - d e s This follows from the fact that each e x p a n s i o n tree

generated

contains

only a finite number of v a r i a b l e s

v, and

that for all p,F(1) (p)$2 is a s u b p r o g r a m of p.

~!~_~:

Consider

the e x p a n s i o n tree for W h i l e D o of ex.

Let e be an e x p r e s s i o n the t r a n s l a t i o n s

and c a command,

and let le'Ic d e n o t e

in I of e and c. Then the t r a n s l a t i o n

p r o g r a m WhileDo(e,c)

5.

of a

is the program:

call W h i l e D o ( e , c ) ,

w h e r e the label WhileDo(e,c)

l ;isTrue~Ic; e

is bound to:

call W h i l e D o ( e , c ) , I

in the environment,

a

8. The c o r r e c t n e s s proof The c o r r e c t n e s s and p r o g r a m s

of cg - i.e. that for all e x p a n d a b l e

generated

provide a generalization

by cg(F(1))(p)

Intuitively

- we should like to

of cg: a f u n c t i o n m a p p i n g c o n f i g u r a -

tions in T 1 into c o n f i g u r a t i o n s tively that d e r i v a t i o n s e.g.

s

p6P, BTI(1) (p)=BTt(u) (cg(F(i)) (p)) , w h e r e u is

the e n v i r o n m e n t

mapping.

16L

in T t and then prove

in T 1 and T t c o r r e s p o n d s

speaking,

induc-

under this

this is - in the terms of

[Morris 73] - a proof that the r e l a t i o n a l

diagram:

24

['i

G

rt

rI

G

rI

commutes - that is, that ~ { 0 G = @ 0 ~ , mentioned

w h e r e G is the m a p p i n g

above and o d e n o t e s r e l a t i o n a l

composition°

ever, G does not exist - except for c o n f i g u r a t i o n s

in r 1

w h i c h are in either DxP or D. T h e r e f o r e we introduce termediate

transition

sion trees,

system T

giving semantics

e and prove instead c o m m u t a t i v e n e s s

F1

G1

Ae

Gt

Ft

Gt

"r t

How-

an in-

for expan-

of the diagram:

e

v

FI-"

Ol

F

e

Inasmuch as I) @l is surjective,

2) G 1 and G t acts as the

identity on D, and 3) for c o n f i g u r a t i o n s

in F 1 of the form

we can find an "expansion mapping"

$e:Fl~re

d=Gl(Ge())~1

commutativeness

and P = G l ( G e ( < d , p > ) ) 4 2 ,

this d i a g r a m implies c o m m u t a t i v e n e s s DxP

Ge

F

1 ~

Gt

of:

Ft

t D

w h i c h is c l e a r l y what we are aiming at.

such that of

25

9. Conclusion and directions for future work We have been looking at relational ming languages,

semantics of program-

given in the structural operational

style

of [Plotkin 81]. We have presented and outlined a proof of the correctness of an algorithm for the generation of compilers from such semantics into a simple,

somewhat structured

target language, provided:

I)

the language specified can be seen to be deterministic, and

2)

the specification satisfies some technical constraints of expandabi!ity and discip!inedness of primitive operations.

The target language is easily linearized and extended to cover a wider range of control flow instructions and unconditional Like

(mainly conditional

jumps).

[Jones/Christiansen 81] the compiler generator works

relative to an interpretation of data operations.

In order to

obtain a runnable system such an interpretation and an imple/nentation of it in terms of a compiler should be providednot a difficult task as in an essentially operational semantics states should be finite. Much work remains to be done with respect to the practical applicability of the present approach.

First, it should be

tried out on a language of realistic complexity in order to assess the descriptive power of the metalanguage and the efficiency of the system. Secondly,

efficiency should be im-

proved. We see mainly two sources of inefficiency.

First, the

control flow implementation should be optimized by detecting irreversible

("single-threaded",

[Stoy 77]) state components.

Some progress on this point have recently been made in the framework of denotational

semantics

([Schmidt 85]).

Secondly, methods for distinguishing between compile time and run time should be investigated.

This distinction could

either be explicit as e.g. Plotkin's

([Plotkin 81]) proposal

for specifying context-sensitive constraints or through the introduction of a dual type system as in [Nielson/Nielson 85],

26

or it could be implicit by somehow splitting states into compile- and run-time dependent parts - e.g. through some kind of data flow analysis. One might suspect that, due to the more rigid semantic metalanguage used

(all states finite

and all computations expressed in terms of transitions), problems in this direction might be more easily approached in the framework proposed here.

Acknowledgements This work grew out of a thesis prepared for the degree of MSc at the Univeristy Centre of Aalborg, Denmark. Thanks are due to our advisor, Dr. F. Nielson,

for many insightful

comments and discussions during the preparation of our thesis.

27

References J.A. Goguen,

[ADJ 78]

J.W. Thatcher,

E.G. Wagner:

An Initial Algebra Approach to the Specification, Correctness, and Implementation of Abstract Data Types. In: Current Trends

[Bj~rner

77]

in Programming Methodology,

Vol. IV, R.T.

Yeh

1978.

(editor),

D. Bj~rner:

Prentice-Hall

Formal Development of Interpre-

ters and Compilers, DtH ID673, [De Bakker/ De Roever 72]

J.W. De Bakker,

1977.

A Calcu-

W.P. De Roever:

lus for Recursive Program Schemes° In: Automata,

Languages,

Programming,

(editor), North-Holland, [Ganzinger

80]

H. Ganzinger:

Nivat

Amsterdam

1972.

Transforming Denotational

Semantics into practical Attribute Grammars. In: Semantics-Directed neration,

Compiler Ge-

LNCS 94, N.D. Jones

(editor),

1980. [Gordon 79]

M.J.C.

Gordon:

The Denotational Descrip-

tion of Programming Languages - An Introduction, Springer-Verlag [Greif/Meyer

81]

I.Greif,

A.R. Meyer:

1979.

Specifying the Se-

mantics of while Programs: A Tutorial and Critique of a Paper by Hoare and Lauer, ACM Transactions and Systems, Vol. [Hoare/Lauer

73]

C.A.R.

Hoare,

on Programming Languages 3, No. 4, Oct.

P.E. Lauer:

1981.

Consistent and

Complementary Formal Theories of the Semantics of Programming Languages, Acta Informatica

3, 1974.

28 M. Dam: Automatisk generering

Fo Jensen,

[Jensen/Dam 85]

af overs~ttere udfra operationelt semantiske definitioner af programmeringssprog,

[Jones/Christiansen 81]

M.Sc. Thesis

(in danish),

sity Centre,

1985.

N.D. Jones,

Aalborg Univer-

Control Flow

H. Christiansen:

Treatment in a Simple Semantics-Directed Compiler Generator, DAIMI PB-137,

sept.

1981. [Jones/Schmidt

80]

N.D. Jones,

D.A.

Schmidt:

Compiler Gene-

ration from Denotational Semantics. Semantics-Directed

Compiler Generation,

LNCS 94, N.D. Jones [Kowalski 74]

R. Kowalski:

In:

(editor),

1980.

Predicate Logic as Program-

ming Language. In: Information Processing 74, North-Holland [Milne/Strachey

76] R. Milne,

1974.

A Theory of Pro-

C. Strachey:

gramming Language Semantics, Chapman and Hall, [Morris 73]

1976.

F.L. Morris:

Advice on Structuring Compi-

lers and Proving Them Correct, Proc. ACM Symp. on Principles [Mosses 79]

P. Mosses:

2nd

of Prog. Lan.,

1973.

SIS-Semantics Implementation

System, Reference Manual and User's Guide, DAIMI MD-30, [Mosses 80]

1979.

P. Mosses: A Constructive Approach to Compiler Correctness. In: Semantics-Directed Compiler Generation, (editor),

[Nielson 84]

LNCS 94, N.D. Jones

1980.

H.R. Nielson: Hoare Logic's for Run-time Analysis of Programs, Ph.D. Thesis, University of Edinburgh,

oct.

1984.

29

[Nielson/ Nielson 85]

F. Nielson,

H.R. Nielson:

Pragmatic Aspects

of Two-Level Denotational Meta-Languages, AUC R-85-13° [Plotkin 81]

A Structural Approach to Operational Semantics, DAIMI FN-19, sept.

G.D. Plotkin: 1981.

[Schmidt 85]

Detecting Global Variables

D.A. Schmidt:

in Denotational Specifications, ACM Transactions on Programming tems, Vol. 7, No. [Sethi 83]

Languages

2, april 1985.

Control-Flow Aspects of Semantics-Directed Compiling, ACM Transactions

R. Sethi:

on Programming Languages Vol. [Stoy 77]

5, No. 4, oct.

J.E. Stoy:

guage Theory, M. Wand:

and Systems,

1983.

Denotational Semantics: The

Scott-Strachey

[Wand 82]

and Sys-

Approach to Programming MIT Press,

Lan-

1977.

Deriving Target Code as a Repre-

sentation of Continuation Semantics, ACM Transactions Systems, Voi.

on Programming 4, No.

Languages

3, july 1982.

and

Suggest Documents