ABSTRACT
Any expression in combinatory logic made up of combinators and variables can be abstracted into a pure combinator expression applied to a sequence of variables. Because there are great similarities between combinators and certain APL operators, a similar result obtains in many APL dialects. However, rewriting arbitrary APL expressions as pure functions requires new operators, not provided as primitives by any dialect. This paper defines functional completeness, gives a construction for achieving it, proves a conjecture of Kenneth Iverson that J is functionally complete, and shows how closely the major APL dialects have approached these conditions.
- 1.John Backus, "Can Programming be Liberated from the Von Neumann Style? A Functional Style and Its Algebra of Programs", Turing award lecture, CACM 21, No.8, pp. 613-641, (Aug. 1978). Google ScholarDigital Library
- 2.J. Philip Benkard'~Nonce Functions", APL90 Proceedings, Quote-Quad 20, No. 4, pp. 27-39, (Aug. 1990). Google ScholarDigital Library
- 3.Edward Cherlin, "APL Trivia", APL90 Proceedings, Quote-Quad 20,4, pp. 71-75, (Aug. 1990). Google ScholarDigital Library
- 4.Alonzo Churc h, The Calculi of Lambda Conversion, Princeton University Press, (1941). Google ScholarDigital Library
- 5.Haskell B~ Curry and Richard Feys, Combinatory Logic, North-Holland, (1958).Google Scholar
- 6.Kurt G0del, "Uber formal unentscheidbare Satze der Principia Mathematica und verwandter S ysteme I", Monatshefte fiir Mathematik und Physik, Vol. 37, pp. 349-360, (1931). Translated into English as "On Formally Undecidable Propositions of the Principia Mathematica and Related Systems I", in Davis, The Undecidable, Raven Press, (1965).Google Scholar
- 7.Alan Graham, "APL0: A Simple Modem APL", APL89 Conference Proceedings, Quote-Quad, 19, No. 4, pp. 178-183, (1989). Google ScholarDigital Library
- 8.Paul Hudak, "Functional Programming Languages",ACM Computing Surveys, 21, No. 3, pp. 359-411, (Sept. 1989). Google ScholarDigital Library
- 9.Roger Hui, Kenneth Iverson, Eugene McDonnell, and Arthur Whitney, "APL\?", APL90 Proceedings, Quote- Quad 20, No. 4, 192-200, (Aug. 1990). Google ScholarDigital Library
- 10.international Standards Organisation, Programming Language APL, ISO standard 8485, (1989).Google Scholar
- 11.International Standards Organisation. Programming Language APL, Extended, Draft Proposal, Eugene McDonnell, Editor, (October 1990).Google Scholar
- 12.Kenneth Iverson, "Operators", ACM Transactions on Programming Languages and Systems, 1, No. 2, pp. 161-176, (October 1979). Google ScholarDigital Library
- 13.Kenneth Iverson, "A Dictionary of APL", Quote Quad, 18, No. 1, pp. 5-40, (Sept. 1987). Google ScholarDigital Library
- 14.Kenneth Iverson and E. E. McDonnell, "Phrasal Forms" APL89 Conference Proceedings, Quote Quad, 19, No. 4, pp. 197-199, (Aug. 1989). Corrections, APL News, 20, No. 3, pp. 5--6 and 20, No. 4 p. 1, Springer-Veflag, New York, (1989). Google ScholarDigital Library
- 15.Kenneth Iverson, personal communication, (1990).Google Scholar
- 16.A. A. Markov, "Teoria Algorifmov" (Theory of Algorithms), Trudy Mat. Inst. Steklov , 38, pp. 176-189.Google Scholar
- 17.Eugene McDonnell, The Four Cube Problem, APL Press, Weed, CA, (1981).Google Scholar
- 18.Eugene McDonnell, oral presentation, APL90, (Aug. 1990).Google Scholar
- 19.S. L. Peyton-Jones, The Implementation of Functional Programming Languages, Prentice-Hall International, Englewood Cliffs, NJ, (1987). Google ScholarDigital Library
- 20.Emil Post, "Formal Reduction of the General Combinatorial Decision Problem", American Journal of Mathematics, 65, pp. 197-215, (1943).Google ScholarCross Ref
- 21.Reuter:file, Inc., SAX Language, Edition 1.2, (March 30, 1989).Google Scholar
- 22.M. SchOnfinkel, "f, Jber die Bausteine der mathematischen Logik", Mathematischen Annalen, 92, pp. 305--584, (1924).Google ScholarCross Ref
- 23.Hai-Chen Tu, FAC: Functional Array Calculator and its Application to APL and Functional Programming, YALEU/DCS/TR-468, Yale University, New Haven, CT, (Apr. 1986).Google Scholar
- 24.Alan Turing, "On Computable Numbers with an Application to the Entscheidungsproblem", Proceedings of the London Mathematical Society, 42, pp. 230-265, (1936).Google Scholar
Index Terms
- Pure functions in APL and J
Recommendations
Pure functions in APL and J
Any expression in combinatory logic made up of combinators and variables can be abstracted into a pure combinator expression applied to a sequence of variables. Because there are great similarities between combinators and certain APL operators, a ...
A machine-independent APL interpreter
The problem of writing machine-independent APL interpreters is solved by means of a systems programming approach making use of an intermediate level language specially designed for that purpose. This paper describes the language, as well as the ...
Generic functions by nonstandard name scoping in APL
We show how to acheive generic functions as in abstract datatypes (such as the Simula CLASS construct or ADA Package notion) for typeless languages, specifically APL. We do this by altering the standard dynamic scoping of names in APL to a scheme we ...
Comments