Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network

  Advanced Search  

Properties of a Firstorder Functional Language with Sharing Zena M. Ariola

Summary: Properties of a First­order Functional Language with Sharing
Zena M. Ariola
Computer & Information Science Department
University of Oregon
Laboratory for Computer Science
Massachusetts Institute of Technology
A calculus and a model for a first­order functional language with sharing is presented. In most implementations
of functional languages, argument subexpressions in a function application are shared to avoid their repeated
evaluation. Recursive functions are typically implemented using graphs with cycles. Compilers for these lan­
guages sometimes employ non­left­linear and left­cyclic rules for optimizations. A Graph Rewriting System
(GRS) to address these concerns is developed. It is shown that a GRS without interfering rules is confluent.
Along the lines of L'evy's term model for the –­calculus, a semantics of such a GRS is also presented. An
application of the term model to compiler optimizations is discussed.
1. Introduction
Sharing of subexpressions is of utmost importance in the implementation of functional languages. Consider
the function definition F x = x+x and the expression F(2+3). Any decent implementation, independently of
the evaluation strategy (normal­order or applicative­order) it employs, will evaluate the subexpression 2 + 3
only once. Several compiler optimizations are about increasing the sharing of subexpressions to avoid their
repeated evaluation. In this paper, we discuss the syntactic and semantic properties of a calculus, which is


Source: Ariola, Zena M. - Department of Computer and Information Science, University of Oregon


Collections: Computer Technologies and Information Sciences