Typical Uses of Eli

Eli has been used extensively in a number of applications. Those mentioned below are particularly suited for exploration of various aspects of the system. Each application is described briefly here. Click on the header to access a complete description of the application. You can obtain copies of many of these applications for input to Eli as indicated in the brief description.

The following literature is also of interest:

  1. Kastens, U., Sloane, A. M., Waite, W. M. Generating Software from Specifications. Jones and Bartlett, Sudbury, MA, 2007.
  2. Gray, R. W., Heuring, V. P., Levi, S. P., Sloane, A. M., Waite, W. M. ``Eli: A Complete, Flexible Compiler Construction System'', Communications of the ACM 35 (February, 1992), 121-131.
  3. Waite, W. M. ``An Executable Language Definition'', SIGPLAN Notices 28 (February, 1993), 28-40.
  4. Kastens, U. ``Attribute Grammars in a Compiler Construction Environment'', Lecture Notes in Computer Science 545, Springer Verlag, New York-Heidelberg-Berlin, 1991, 380-400.
  5. Kastens, U., Waite, W. M. ``Modularity and Reusability in Attribute Grammars'', Acta Informatica 31 (1994), 601-627.
  6. Sloane, A. M. ``An Evaluation of an Automatically Generated Compiler'', ACM Transactions on Programming Languagesand Systems 17 (September, 1995), 691-703.

Beyond LEX and YACC: How to Generate the Whole Compiler

An invited paper at the USENIX Winter Conference in 1994, this document explains how Eli combines new tools with old ones to complete the solution to many translation problems. It discusses the philosophy on which Eli is based, and gives a complete example to show how a simple program generator might be specified using Eli. Both the paper and the program generator were produced by Eli from the same specification. A tar file containing that specification is available.

ALGOL 60

ALGOL 60 is defined by the Revised Report on the Algorithmic Language ALGOL 60, which appeared (among other places) in the January, 1963 issue of Communications of the ACM (pages 1-17). That paper is generally considered to be the classic example of a language definition, and has strongly influenced the structure and content of its successors.

The document appearing here was generated by Eli from a specification that parallels the Revised Report. This style of specification provides direct traceability to the defining document for a language, allowing users to easily verify its correctness. From the same specification, Eli can generate a ``lint'' processor for ALGOL 60. The specification can also be used unchanged as a component of a specification for an ALGOL 60 translator.

A tar file containing the specification and a small test suite is available, as is a PDF version of the document.

Pascal Minus

An implementation of the Pascal- language defined by Brinch-Hansen in his book Brinch-Hansen on Pascal Compilers (Prentice-Hall, 1985). This document was generated by Eli from a specification that parallels the treatment in the book, allowing you to see two views of the same compiler: Brinch-Hansen's hand-coded implementation and Eli's declarative specification. A complete compiler translating Pascal- into code for Brinch-Hansen's abstract stack machine can be generated from the Eli specification, so the two views are functionally equivalent.

A tar file containing the specification and a small test suite is available, as is a PostScript version of the document. The tar file also contains a set of macro definitions that implement the stack machine operations in C, so that Pascal- programs can actually be executed.

Pascal

A specification of Pascal as defined by ANSI/IEEE 770X3.97-1983. It is organized by function, illustrating how much of the semantic analysis can be expressed in terms of abstract syntax rules that play language-independent name and type analysis roles. Although Pascal is no longer a mainstream language, in presents some interesting type analysis problems. For example, it is possible to construct values whose types have not been defined.

C

A specification of C as defined by ISO/IEC 9899-1990. This document was generated by Eli from a specification that parallels the ANSI Standard, with additional sections covering the consistent renaming of ordinary identifiers, the internal representation of types, and the tactics of type analysis.

Java

The purpose of this specification is to verify that the type analysis modules of Eli 4.5 are useful for describing a modern object-oriented language. It implements the typing rules of Java 1.4, and accepts the entire language. Many programming errors that do not involve type analysis are not reported, due to a lack of time and the particular goal of the project.

Complete name analysis for Java 1.4 requires a fixpoint algorithm for resolving type inheritance, and this specification does not include that algorithm. As a result, some correct programs will be rejected with reports of improper inheritance or undefined identifiers. This deficiency is not relevant for the type analysis demonstration.

FORTRAN

FORTRAN is the usual counterexample for compiler construction tools. An Eli specification covering the lexical, syntactic and semantic analysis of FORTRAN is available as a tar file. This specification illustrates the mixture of declarative and operational techniques needed to define some languages. It is divided into three parts:
Lexical Analysis
This document defines the scanning task for both FORTRAN 77 and FORTRAN 90. A PostScript version is also available.
Syntactic Analysis
This document defines the parsing task for both FORTRAN 77 and FORTRAN 90. A PostScript version is also available.
Semantic Analysis
This document defines the name analysis and type analysis tasks for FORTRAN 77. A PostScript version is also available.

Eli can generate an executable processor from this specification, possibly in combination with other specifications. Depending on the additional specifications, that processor could be used as a compiler, or as a source text analysis tool.