Rule-based semantics for an extended lambda-calculus
Many implementation techniques proposed for functional languages in the literature are based on lambda-calculus and the theory of combinators [5, 12, 14]. The main advantage of functional languages over the more conventional programming languages is their lack of side-effects which makes their semantics much simpler .
This paper presents a λ-calculus dialect with list-handling extensions that can be used for defining an operational semantics for functional programs. This semantics is based on a set of elementary α-rules and β-rules which collectively implement the substitution operation without explicitly using it . Two extra reduction rules, called γ-rules, have been added to the system for list manipulations . Combining λ-calculus with list-handling capabilities makes an efficient vectorization of λ-calculus possible. This way we obtain a very elegant treatment of mutual recursion in our system.
The reduction rules described in this paper represent, in fact, an operational semantics for our extended λ-notation. An interpreter program for this extended λ-calculus has been developed by a direct implementation of the reduction rules which makes the correctness proof of the interpreter very easy. The notion of controlled reduction is introduced here to guarantee the existence of a normal form for λ-expressions representing recursively defined functions using the Y combinator.
KeywordsNormal Form Operational Semantic Reduction Rule Correctness Proof Functional Language
Unable to display preview. Download preview PDF.
- 1.Arvind, Kathail, V., and Pingali, K., Sharing Computation in Functional Language Implementations, Proc. Internat. Workshop on High-level Computer Architecture, Los Angeles, May 21–25, 1985, pp. 5.1–5.12.Google Scholar
- 2.Backus, J., The algebra of functional programs: Function level reasoning, linear equations, and extended definitions, Proc. International Colloquium on the Formalization of Programming Concepts, Lecture Notes in Computer Science, No. 107, Springer-Verlag 1981, pp. 1–43.Google Scholar
- 3.Barendregt, H.P., The Lambda Calculus — Its Sytax and Semantics (revised edition), Studies in Logic and the Foundation of Mathematics, Vol.103, North-Holland 1984.Google Scholar
- 5.Clarke, T. J. W., Gladstone, P. J. S, MacLean, C. D., and Norman, A. C., SKIM — The S, K, I reduction macine, LISP Conference Records, Stanford Univ., Stanford, CA 1980, pp. 128–135.Google Scholar
- 6.Friedman, D. P. and Wise, D. S., Cons should not evaluate its arguments, in Automata, Languages, and Programming (Michaelson S. and Milner, R. eds) pp. 257–284. Edinburgh University Press, Edinburgh (1976).Google Scholar
- 7.Hindley, J. R., and Seldin, J. P., Introduction to Combinators and λ-calculus, London Mathematical Society Student Text 1, Cambridge University Press 1986.Google Scholar
- 8.Johnsson, T., Lambda lifting: Transforming programs to recursive equations, IFIP Conf. on Functional Programming Languages and Computer Architecture, Sept. 16–19, 1985, Nancy, France, Lecture Notes in Computer Science, Vol.201, Springer Verlag 1985, pp. 190–203.Google Scholar
- 9.Noshita, K., and Hikita, T., The BC-chain method for representing combinators in linear space, New Generation Computing, Vol.3, No.2, (1985), pp. 131–144.Google Scholar
- 12.Scheevel, M., NORMA: A graph reduction processor, Proc. of the 1986 ACM Conference on LISP and Functional Programming, Cambridge, Mass. (Aug. 1986), pp. 212–219.Google Scholar
- 13.Turner, D. A., Another algorithm for bracket abstraction, Journal of Symbolic Logic, Vol.44, No.2, (June 1979), pp. 267–270.Google Scholar
- 14.Turner, D. A., A new implementation technique for applicative languages, Software — Practice and Experience, Vol.9, No.1, (1979) pp. 31–49.Google Scholar