Premium
An optimizing compiler for the icon programming language
Author(s) -
Walker Kenneth,
Griswold Ralph E.
Publication year - 1992
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380220803
Subject(s) - compiler , computer science , programming language , icon , code generation , assembly language , object code , code (set theory) , operating system , software , key (lock) , set (abstract data type)
Compiling code for the Icon programming language presents several challenges, particularly in dealing with types and goal‐directed expression evaluation. In order to produce optimized code, it is necessary for the compiler to know much more about operations than is necessary for the compilation of most programming languages. This paper describes the organization of the Icon compiler and the way it acquires and maintains information about operations. The Icon compiler generates C code, which makes it portable to a wide variety of platforms and also allows the use of existing C compilers for performing routine optimizations on the final code. A specially designed implementation language, which is a superset of C, is used for writing Icon's run‐time system. This language allows the inclusion of information about the abstract semantics of Icon operations and their type‐checking and conversion requirements. A translator converts code written in the run‐time language to C code to provide an object library for linking with the code produced by the Icon compiler. The translation process also automatically produces a database that contains the information the Icon compiler needs to generate and optimize code. This approach allows easy extension of Icon's computational repertoire, alternate computational extensions, and cross compilation.