The implementation of generators and goal-directed evaluation in Icon.

Generators and goal-directed evaluation provide a rich programming paradigm when combined with traditional control structures in an imperative language. Icon is a language whose goal-directed evaluation is integrated with traditional control structures. This integration provides powerful mechanisms...

Full description

Bibliographic Details
Main Author: O'Bagy, Janalee.
Other Authors: Griswold, Ralph E.
Language:en
Published: The University of Arizona. 1988
Subjects:
Online Access:http://hdl.handle.net/10150/184491
Description
Summary:Generators and goal-directed evaluation provide a rich programming paradigm when combined with traditional control structures in an imperative language. Icon is a language whose goal-directed evaluation is integrated with traditional control structures. This integration provides powerful mechanisms for formulating many complex programming operations in concise and natural ways. However, generators, goal-directed evaluation, and related control structures introduce implementation problems that do not exist for languages with only conventional expression evaluation. This dissertation presents an implementation model using recursion that serves as a basis for both an interpreter and a compiler. Furthermore, in the case of the compiler, optimizations can be performed to improve the efficiency of Icon programs, mainly by reducing the general evaluation strategy whenever possible. The dissertation describes a compile-time semantic analysis used to gather information about the properties of expressions and how they are used at their lexical sites. The optimizations that can be performed using this information are illustrated in the context of the compiler model described in the dissertation.