ACM Home Page
Please provide us with feedback. Feedback
Operational semantics-directed compilers and machine architectures
Full text PdfPdf (2.13 MB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 16 ,  Issue 4  (July 1994) table of contents
Pages: 1215 - 1247  
Year of Publication: 1994
ISSN:0164-0925
Author
John Hannan  The Pennsylvania State University
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 26,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues   peer to peer  

Tools and Actions: Review this Article  
Save this Article to a Binder    Display Formats: BibTex  EndNote ACM Ref   
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/183432.183458
What is a DOI?

ABSTRACT

We consider the task of automatically constructing intermediate-level machine architectures and compilers generating code for these architectures, given operational semantics for source languages. We use operational semantics in the form of abstract machines given by rewrite systems in which the rewrite rules operate on terms representing states of computations. To construct compilers and new architectures we employ a particular strategy called pass separation, a form of staging transformation, that takes a program p and constructs a pair of programs p1, p2 such that p(x, y) = p2(p1(x), y)) for all x,y. If p represents an operational semantics for a language, with arguments x and y denoting a source program and its input data, then pass separation constructs programs p1 and p2 corresponding to a compiler and an executor. The compiler translates the source language into an intermediate-level target language, and the executor provides the definition for this language. Our use of pass separation supports the automatic definition of target languages or architectures, and the structure of these architectures is directed by the structure of the given source semantics. These architectures resemble abstract machine languages found in hand-crafted compilers. Our method is restricted to a limited class of abstract machines given as term-rewriting systems, but we argue that this class encompasses a large set of language definitions derived from more natural operational semantics. We provide two examples of our method by constructing compilers and target architectures for a simple functional language and a simple imperative language. Though we construct these architectures automatically, they bear a striking resemblance to existing architectures constructed by hand.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
BONDORF, A. AND DANVY, O. 1990. Automatic autoprojection of recursive equations with global variables and abstract data types. Tech. Rep. 90/4, DIKU, University of Copenhagen.
 
3
 
4
5
 
6
HANNAN, J. AND MILLER, D. 1992. From operational semantics to abstract machines. Math. Struct. Comput. Sci. 2, 4, 415-459.
 
7
HANNAN, J. AND PFENNING, F. 1992. Compiler verification in LF. In Proceedings of the 7th Annual IEEE Symposium on Logic ~n Computer Science, A. Scedrov, Ed. IEEE Computer Society Press, Los Alamitos, Calif., 407-418.
8
 
9
JONES, N.D. 1987. Challenging problems in partial evaluation and mixed computation. In Partial Evaluation and Mixed Computation, D. Bjorner, A. P. Ershov, and N. D. Jones, Eds. North-Holland, Amsterdam, 1-14.
 
10
 
11
JONES, N., SESTOFT, P., AND SCNDERGAARD, H. 1989. MIX: A self-applicable partial evaluator for experiments in compiler generation. J. LISP Symbol. Comput. 2, 1, 9-50.
12
 
13
14
 
15
 
16
LANDIN, P.J. 1964. The mechanical evaluation of expressions. Comput. J. 6, 5, 308-320.
 
17
 
18
 
19
NILSSON, U. 1993. Towards a methodology for the design of abstract machines for logic programming languages. J. Logic Program. 16, 1, 2 (May), 163-189.
20
 
21
PLOTKIN, G. 1981. A structural approach to operational semantics. DAIMI FN-19, Aarhus Univ., Aarhus, Denmark.
 
22
23
24


Peer to Peer - Readers of this Article have also read: