Abstract
In this paper we illustrate, using the Id language, that both the operational semantics of a language and its compilation process can be formalized together. Id is a higher-order non-strict functional language augmented with I-structures and M-structures. The operational semantics of Id is given in terms of a smaller kernel language, called Kid. Kid is also the intermediate form used by the compiler to perform type checking and optimizations. Optimizations are described as extensions of Kid operational semantics. A criteria for correctness of optimizations is presented. P-TAC, a lower-level language, is introduced to capture some efficiency issues related to code generation. The salient features of translating Kid into P-TAC are presented.
Preview
Unable to display preview. Download preview PDF.
References
A. Aho, J. Ullman, and R. Sethi. Compilers: Principles, Techniques, Tools. London, Addison-Wesley, 1986.
Z. M. Ariola. Orthogonal Graph Rewriting Systems. Technical Report CSG Memo 323, MIT Laboratory for Computer Science, 1991.
Z. M. Ariola and Arvind. Compilation of Id−: a Subset of Id. Technical Report CSG Memo 315, MIT Laboratory for Computer Science, November 1990.
Z. M. Ariola and Arvind. A Syntactic Approach to Program Transformations. In Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics Based Program Manipulation, Yale University, 1991.
Arvind, R. Nikhil, and K. Pingali. I-Structures: Data Structures for Parallel Computing. In Proceedings of the Workshop on Graph Reduction, Santa Fe, New Mexico, Springer-Verlag LNCS 279, pages 336–369, September/October 1987.
L. Augustsson. Compiling Lazy Functional Languages, Part II. PhD thesis, Chalmers University of Technology, Department of Computer Science, 1987.
P. Barth, R. Nikhil, and Arvind. M-structures: Extending a Parallel, Non-strict, Functional Language with state. In Proc. ACM Conference on Functional Programming Languages and Computer Architecture, Cambridge, 1991.
T. Johnsson. Lambda Lifting: Transforming Programs to Recursive Equations. In Proc. Conf. on Functional Programming Languages and Computer Architecture, Nancy, France, September 1985.
T. Johnsson. Compiling Lazy Functional Languages. PhD thesis, Chalmers University of Technology, Department of Computer Science, 1987.
J. Klop. Term Rewriting Systems. Course Notes, Summer course organized by Corrado Boehm, Ustica, Italy, September 1985.
P. Landin. A Correspondence between Algol60 and Church's Lambda notation. Communications ACM, 8, 1965.
J.-J. Lévy. Réductions Correctes et Optimales dans le Lambda-Calcul. Ph.D. thesis, Université Paris VII, October 1978.
R. S. Nikhil. Id (Version 90.0) Reference Manual. Technical Report CSG Memo 284-a, MIT Laboratory for Computer Science, 545 Technology Square, Cambridge, MA 02139, USA, July 1990.
S. L. Peyton Jones. The implementation of Functional Programming Languages. Prentice-Hall International, Englewood Cliffs, N.J., 1987.
K. PÃngali, M. Beck, R. Johnson, M. Moudgill, and P. Stodghill. Dependence Flow Graphs: An Algebraic Approach to Program Dependencies. In Proceedings of the 18th ACM Symposium on Principle of programming Languages, pages 67–78, January 1991.
K. Schauser, D. Culler, and T. von Eicken. Compiler-Controlled Multithreading for Lenient Parallel Languages. In Proc. ACM Conference on Functional Programming Languages and Computer Architecture, Cambridge, 1991.
K. Traub. Compilation as Partitioning: A New Approach to Compiling Non-strict Functional Languages. In Proc. ACM Conference on Functional Programming Languages and Computer Architecture, Cambridge, 1991.
P. Welch. Continuous Semantics and Inside-out Reductions. In λ-Calculus and Computer Schience Theory, Italy (Springer-Verlag Lecture Notes in Computer Science 37), March 1975.
Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics Based Program Manipulation, Yale University, New Haven, CN. June 1991.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ariola, Z., Arvind (1992). Compilation of Id. In: Banerjee, U., Gelernter, D., Nicolau, A., Padua, D. (eds) Languages and Compilers for Parallel Computing. LCPC 1991. Lecture Notes in Computer Science, vol 589. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0038660
Download citation
DOI: https://doi.org/10.1007/BFb0038660
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55422-6
Online ISBN: 978-3-540-47063-2
eBook Packages: Springer Book Archive