Abstract
We study the problem of avoiding multiple traversals of data structures in functional programming. A solution proposed in [Bir84] makes use of lazy evaluation and local recursion. We show that analogous perfomances can be achieved using higher order functions and lambda abstractions. The solution we propose works for the call-by-value evaluation rule and it does not require local recursion. We also show through some examples that higher order functions allow us to simulate the use of pointers of a Pascal-like language. We finally spend a few words on a theory of strategies for program development.
Preview
Unable to display preview. Download preview PDF.
7. References
Abdali, K.S. and Vytopil, J.: "Generalization Heuristics for Theorems Related to Recursively Defined Functions" Report Buro Voor Systeemontwikkeling. Postbus 8348, Utrecht, Netherlands (1984).
Aubin, R.: "Mechanizing Structural Induction" Ph.D. Thesis, Dept. of Artificial Intelligence, University of Edinburgh (1976).
Backus, J.: "Can Programming be Liberated from the Von Neumann Style?" Comm. A.C.M. 21(8) (1978), pp. 613–641.
Bird, R.S.: "Using Circular Programs to Eliminate Multiple Traversal of Data" Acta Informatica 21 (1984), pp. 239–250.
Bird, R.S.: "An Introduction to the Theory of Lists" Technical Monograph PRG-56, Oxford University Computing Laboratory, Oxford, England (1986).
Boyer, R.S. and Moore, J.S.: "Proving Theorems About LISP Functions" J.A.C.M. 22, 1 (1975), pp. 129–144.
Burstall, R.M. and Darlington, J.: "A Transformation System for Developing Recursive Programs" J.A.C.M. Vol.24, 1 (1977), pp. 44–67.
Chirica, L.M. and Martin, D.F.: "An Order-Algebraic Definition of Knuthian Semantics" Mathematical System Theory 13, 1–27 (1979), pp. 1–27.
Darlington, J.: "An Experimental Program Transformation and Synthesis System" Artificial Intelligence 16, (1981), pp. 1–46.
Ershov, A. P.: "Mixed Computation: Potential Applications and Problems for Study" Theoretical Computer Science Vol.18, (1982), pp. 41–67.
Feather, M.S.: "A Survey and Classification of Some Program Transformation Techniques" Proc. TC2 IFIP Working Conference on Program Specification and Transformation. Bad Tölz, Germany (ed. L. Meertens) (1986).
Jørring, U. and Scherlis, W. L.: "Compilers and Staging Transformations" Thirteenth Annual A.C.M. Symposium on Principles of Programming Languages, St. Petersburgh Beach, Florida, USA (1986), pp. 86–96.
Mycroft, A.: "Abstract Interpretations and Optimising Transformations for Applicative Programs" Ph.D. Thesis, Computer Science Department, University of Edinburgh, Scotland (1981).
Pettorossi, A.: "Improving Memory Utilization in Transforming Recursive Programs" Proc. MFCS 78, Zakopane (Poland), Lecture Notes in Computer Science n.64, Springer Verlag (1978), pp. 416–425.
Pettorossi, A.: "A Powerful Strategy for Deriving Efficient Programs by Transformation" ACM Symposium on Lisp and Functional Programming, Austin, Texas (1984), pp.273–281.
Pettorossi, A. and A. Skowron: "Higher Order Generalization in Program Derivation" Proc. Intern. Joint Conference on Theory and Practice of Software Development. Pisa, Italy. Lecture Notes in Computer Science n. 250, Springer-Verlag (1987), pp. 182–196.
Scherlis, W. L.: "Program Improvement by Internal Specialization" A.C.M. Eighth Symposium on Principles of Programming Languages, (1981), pp. 146–160.
Scherlis, W. L., and Scott, D.: "Semantical Based Programming Tools" Mathematical Foundations of Software Development, TAPSOFT '85, Lecture Notes in Computer Science n. 185, Springer-Verlag, Berlin (1985), pp. 52–59.
Swierstra, D.: "Communication 513 SAU-15". IFIP WG.2.1, Sausalito, California, USA (1985).
Takeichi, M.: "Partial Parametrization Eliminates Multiple Traversals of Data Structures" Acta Informatica 24, (1987), pp.57–77.
Wadler, P.L.: "Listlessness is Better than Laziness" Ph. D. Thesis, Computer Science Department, CMU-CS-85-171, Carnegie Mellon University, Pittsburgh, USA (1985).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1987 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Pettorossi, A. (1987). Program development using lambda abstraction. In: Nori, K.V. (eds) Foundations of Software Technology and Theoretical Computer Science. FSTTCS 1987. Lecture Notes in Computer Science, vol 287. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-18625-5_65
Download citation
DOI: https://doi.org/10.1007/3-540-18625-5_65
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-18625-0
Online ISBN: 978-3-540-48033-4
eBook Packages: Springer Book Archive