Results 1 -
7 of
7
Semantics-Based Compiling: A Case Study in Type-Directed Partial Evaluation
- Eighth International Symposium on Programming Language Implementation and Logic Programming
"... . We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the sty ..."
Abstract
-
Cited by 21 (8 self)
- Add to MetaCart
. We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the style of denotational semantics; -- the output of the generated compiler is e#ectively three-address code, in the fashion and e#ciency of the Dragon Book; -- the generated compiler processes several hundred lines of source code per second. The source language considered in this case study is imperative, blockstructured, higher-order, call-by-value, allows subtyping, and obeys stack discipline. It is bigger than what is usually reported in the literature on semantics-based compiling and partial evaluation. Our compiling technique uses the first Futamura projection, i.e., we compile programs by specializing a definitional interpreter with respect to the program. Specialization is carri...
Automatic Generation and Management of Interprocedural Program Analyses
- In Twentieth Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL'93
, 1993
"... We have designedand implemented an interprocedural program analyzer generator, called system Z. Our goal is to automate the generation and management of semantics-based interprocedural program analysis for a wide range of target languages. System Z is based on the abstract interpretation framework. ..."
Abstract
-
Cited by 19 (1 self)
- Add to MetaCart
We have designedand implemented an interprocedural program analyzer generator, called system Z. Our goal is to automate the generation and management of semantics-based interprocedural program analysis for a wide range of target languages. System Z is based on the abstract interpretation framework. The input to system Z is a high-level specification of an abstract interpreter. The output is a C code for the specified interprocedural program analyzer. The system provides a high-level command set (called projection expressions) in which the user can tune the analysis in accuracy and cost. The user writes projection expressions for selected domains; system Z takes care of the remaining things so that the generated analyzer conducts an analysis over the projected domains, which will vary in cost and accuracy according to the projections. We demonstrate the system's capabilities by experiments with a set of generated analyzers which can analyze C, FORTRAN, and SCHEME programs. 1 Introductio...
Programming Language Specification and Prototyping Using the MAX System
- Programming Language Implementation and Logic Programming
, 1993
"... The paper describes the MAX system, a tool for specification and prototyping of language processors. The MAX system is based on a first--order framework generalizing attribute grammar like frameworks. It allows to refer to syntax tree nodes and "distant" attribute occurrences. Attributes may have ..."
Abstract
-
Cited by 9 (2 self)
- Add to MetaCart
The paper describes the MAX system, a tool for specification and prototyping of language processors. The MAX system is based on a first--order framework generalizing attribute grammar like frameworks. It allows to refer to syntax tree nodes and "distant" attribute occurrences. Attributes may have tree nodes as values, so that global relations between distant tree nodes can be expressed. This enables more compact and readable specifications for a wide class of complex problems. Within the presented framework, context conditions can be globally formulated by first--order predicate formulae. The paper explains the fundamental semantical concepts of the system, shows its application to a small name analysis problem, and describes the main implementation issues. In particular, we present a powerful attribute evaluation algorithm that can handle attribute dependencies arising during evaluation time. Finally, we report on the experiences made by the system and compare it to other s...
Rie, a Compiler Generator Based on a One-pass-type Attribute Grammar
, 1995
"... this paper was first published in Japanese 1 CCC 0038--0644/95/030229--22 Received 3 December 1993 1995 by John Wiley & Sons, Ltd. Revised 26 July 1994 On the other hand, generators in the latter group mainly aim at improving the efficiency of compilation. Coco/R is an example of the latter gr ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
this paper was first published in Japanese 1 CCC 0038--0644/95/030229--22 Received 3 December 1993 1995 by John Wiley & Sons, Ltd. Revised 26 July 1994 On the other hand, generators in the latter group mainly aim at improving the efficiency of compilation. Coco/R is an example of the latter group. Most of them generate a one-pass compiler, in which action routines are embedded in a recursive descent parser. Their compilation efficiency is acceptable; however, their compiler description mechanism consists of embedding semantic actions into syntax rules, in which variables of imperative languages are regarded as attributes. Therefore, their notation is not based on pure attribute grammars. HLP84 also generates a one-pass compiler but from an object-oriented style compiler description; it is interesting but it also does not conform to pure attribute grammar
Using verified data-flow analysis-based optimizations in attribute grammars
- In Proc. Intl. Workshop on Compiler Optimization Meets Compiler Verification (COCV
, 2006
"... Building verified compilers is difficult, especially when complex analyses such as type checking or data-flow analysis must be performed. Both the type checking and program optimization communities have developed methods for proving the correctness of these processes and developed tools for using, r ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Building verified compilers is difficult, especially when complex analyses such as type checking or data-flow analysis must be performed. Both the type checking and program optimization communities have developed methods for proving the correctness of these processes and developed tools for using, respectively, verified type systems and verified optimizations. However, it is difficult to use both of these analyses in a single declarative framework since these processes work on different program representations: type checking on abstract syntax trees and data-flow analysis-based optimization on control flow or program dependency graphs. We present an attribute grammar specification language that has been extended with constructs for specifying attribute-labelled control flow graphs and both CTL and LTL-FV formulas that specify data-flow analyses. These formulas are modelchecked on these graphs to perform the specified analyses. Thus, verified type rules and verified data-flow analyses (verified either by hand or with automated proof tools) can both be transcribed into a single declarative framework based on attribute grammars to build a high-confidence language implementations. Also, the attribute grammar specification language is extensible so that it is relatively straight-forward to add new constructs for different temporal logics so that alternative logics and model checkers can be used to specify data-flow analyses in this framework. Key words: compiler optimization, optimization verification, data flow analysis, attribute grammars 1
Z1: A Data Flow Analyzer Generator
"... We have developed a software tool called Z1 by which one can quickly achieve an accurate yet affordable program analysis. The user writes an analysis specification and sets a parameter for a desired cost-accuracy tradeoff. The tool then creates an executable analyzer that has the specified performan ..."
Abstract
- Add to MetaCart
We have developed a software tool called Z1 by which one can quickly achieve an accurate yet affordable program analysis. The user writes an analysis specification and sets a parameter for a desired cost-accuracy tradeoff. The tool then creates an executable analyzer that has the specified performance balance. Z1 has been used for developing both conventional and non-conventional flow analyses. These analyses were for programs written in C, FORTRAN, and Standard ML, without restriction upon the programs treated. We present experimental data showing the performances of Z1 for analyzing C, FORTRAN, and Standard ML programs. Index Terms: data flow analysis, abstract interpretation, global program analysis, collecting analysis, lattice, projection Correspondence: Kwangkeun Yi, kwang@research.att.com AT&T Bell Laboratories, Rm 2A-421, Murray Hill, NJ 07974, USA. A preliminary version of this paper appeared in the Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Prog...

