The derivation of functional equivalents of imperative programs

被引:1
作者
Roberts, GHB [1 ]
机构
[1] Flinders Univ S Australia, Sch Informat & Engn, Adelaide, SA 5001, Australia
来源
PROCEEDINGS OF THE 24TH AUSTRALASIAN COMPUTER SCIENCE CONFERENCE, ACSC 2001 | 2001年 / 23卷 / 01期
关键词
D O I
10.1109/ACSC.2001.906639
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Denotational semantics is presented as a valuable theoretical tool, having many applications including language design, compiler generation and program analysis. In particular, a method is described for deriving a concise and useful functional representation of a program using a denotational definition of the source language's semantics. Our aim is to translate a given program into a compact functional representation to facilitate its evaluation on functional hardware. The X-expressions are first translated into Turner's combinator code (see [7]) WE choose to use a fired set of combinators as the resulting code is more amenable to analysis and there are many inherent advantages such as lazy evaluation and once only evaluation of reducible sub-expressions. Semantic algebras relating to static semantics and the store algebra are "unfrozen" so they can be partially evaluated. The reduction machine that performs the evaluation includes simplification rules that allows a more compact functional representation (denotation) to be reached. If desired, some or all of the programs arguments can be supplied to produce a new denotation (result) using the same reduction machine.
引用
收藏
页码:171 / 176
页数:6
相关论文
共 7 条
[1]  
ABRAMSKY S, 1987, ABSTRACT INTERPERETA
[2]  
CHAO S, 1988, SIGPLAN NOTICES, V23
[3]  
HINDLEY JR, 1986, INTRO COMBINATORY LO
[4]  
Peyton-Jones Simon, 1987, IMPLEMENTATION FUNCT
[5]  
Schmidt D.A., 1986, Denotational Semantics: A Methodology for Language Development
[6]  
SCOTT D, 1973, LOGIC METHODOLOGY PH, V4, P157
[7]   NEW IMPLEMENTATION TECHNIQUE FOR APPLICATIVE LANGUAGES [J].
TURNER, DA .
SOFTWARE-PRACTICE & EXPERIENCE, 1979, 9 (01) :31-49