skip to main content
10.1145/114054.114065acmconferencesArticle/Chapter ViewAbstractPublication PagesaplConference Proceedingsconference-collections
Article
Free Access

Pure functions in APL and J

Published:01 July 1991Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.J. Philip Benkard'~Nonce Functions", APL90 Proceedings, Quote-Quad 20, No. 4, pp. 27-39, (Aug. 1990). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Edward Cherlin, "APL Trivia", APL90 Proceedings, Quote-Quad 20,4, pp. 71-75, (Aug. 1990). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.Alonzo Churc h, The Calculi of Lambda Conversion, Princeton University Press, (1941). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.Haskell B~ Curry and Richard Feys, Combinatory Logic, North-Holland, (1958).Google ScholarGoogle Scholar
  6. 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 ScholarGoogle Scholar
  7. 7.Alan Graham, "APL0: A Simple Modem APL", APL89 Conference Proceedings, Quote-Quad, 19, No. 4, pp. 178-183, (1989). Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.Paul Hudak, "Functional Programming Languages",ACM Computing Surveys, 21, No. 3, pp. 359-411, (Sept. 1989). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.Roger Hui, Kenneth Iverson, Eugene McDonnell, and Arthur Whitney, "APL\?", APL90 Proceedings, Quote- Quad 20, No. 4, 192-200, (Aug. 1990). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.international Standards Organisation, Programming Language APL, ISO standard 8485, (1989).Google ScholarGoogle Scholar
  11. 11.International Standards Organisation. Programming Language APL, Extended, Draft Proposal, Eugene McDonnell, Editor, (October 1990).Google ScholarGoogle Scholar
  12. 12.Kenneth Iverson, "Operators", ACM Transactions on Programming Languages and Systems, 1, No. 2, pp. 161-176, (October 1979). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Kenneth Iverson, "A Dictionary of APL", Quote Quad, 18, No. 1, pp. 5-40, (Sept. 1987). Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.Kenneth Iverson, personal communication, (1990).Google ScholarGoogle Scholar
  16. 16.A. A. Markov, "Teoria Algorifmov" (Theory of Algorithms), Trudy Mat. Inst. Steklov , 38, pp. 176-189.Google ScholarGoogle Scholar
  17. 17.Eugene McDonnell, The Four Cube Problem, APL Press, Weed, CA, (1981).Google ScholarGoogle Scholar
  18. 18.Eugene McDonnell, oral presentation, APL90, (Aug. 1990).Google ScholarGoogle Scholar
  19. 19.S. L. Peyton-Jones, The Implementation of Functional Programming Languages, Prentice-Hall International, Englewood Cliffs, NJ, (1987). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.Emil Post, "Formal Reduction of the General Combinatorial Decision Problem", American Journal of Mathematics, 65, pp. 197-215, (1943).Google ScholarGoogle ScholarCross RefCross Ref
  21. 21.Reuter:file, Inc., SAX Language, Edition 1.2, (March 30, 1989).Google ScholarGoogle Scholar
  22. 22.M. SchOnfinkel, "f, Jber die Bausteine der mathematischen Logik", Mathematischen Annalen, 92, pp. 305--584, (1924).Google ScholarGoogle ScholarCross RefCross Ref
  23. 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 ScholarGoogle Scholar
  24. 24.Alan Turing, "On Computable Numbers with an Application to the Entscheidungsproblem", Proceedings of the London Mathematical Society, 42, pp. 230-265, (1936).Google ScholarGoogle Scholar

Index Terms

  1. Pure functions in APL and J

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              APL '91: Proceedings of the international conference on APL '91
              July 1991
              396 pages
              ISBN:0897914414
              DOI:10.1145/114054

              Copyright © 1991 Author

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 1 July 1991

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • Article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader