3 research outputs found
Icon: A Interpreter-Based Approach
This paper introduces the Icon programming language in a simplified form using a lisp-like syntax to represent an interesting subset of the language. The paper also discusses the semantics and implementation of some of Icon\u27s advanced features with emphasis on generators and goal-directed evaluation. The organization of the paper resembles a chapter in the book ``Programming Languages: An Interpreter-Based Approach\u27\u27 by Samuel Kamin. This paper can serve as a supplement to that book, allowing comparative programming language instructors who use the Kamin text to efficiently teach the Icon programming languag
Recommended from our members
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 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