Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/289423.289433acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article
Free access

Programming with variable functions

Published: 29 September 1998 Publication History
  • Get Citation Alerts
  • Abstract

    What is a good method to specify and derive imperative programs? This paper argues that a new form of functional programming fits the bill: where variable functions can be updated at specified points in their domain.Traditional algebraic specification and functional programming are a powerful pair of tools for specifying and implementing domains of discourse and operations on them. Recent work on evolving algebras has introduced the function update in algebraic specifications, and has applied it with good success in the modelling of reactive systems. We show that similar concepts allow one to derive efficient programs in a systematic way from functional specifications. The final outcome of such a derivation can be made as efficient as a traditional imperative program with pointers, but can still be reasoned about at a high level.Variable functions can also play an important role in the structuring of large systems. They can subsume object-oriented programming languages, without incurring the latter's problems with pointer aliasing and modularity.

    References

    [1]
    P. Achten and R. Plasmeijer. Towards distributed interactive programs in the functional programming language Clean. In J. Glauert, editor, Proceedings of the 6th International Workshop on the Implementation of Funtional Languages, pages 28.1- 28.16. University of East Anglia, Norwich, UK, 1994.]]
    [2]
    Henry G. Baker. Lively linear Lisp--'look ma, no garbage!'. A CM SIGPLAN Notices, 27(8):89-98, August 1992.]]
    [3]
    C. Beierle, E. BSrger, I. Durdanovic, U. G1/isser, and E. Riccobene. Refining Abstract Machine Specifications of the Steam Boiler Control to Well Documented Executable Code. In J.-R. Abrial, E. BSrger, and H. Langmaack, editors, Formal Methods for Industrial Applications. Specifying and Pro~ gramming the Steam-Boiler Control, number 1165 in LNCS, pages 62-78. Springer, 1996.]]
    [4]
    A. Bijshna. Calculating with pointers. Science of Computer Programming, 12(3)'191- 205, September 1989.]]
    [5]
    Egon D. BSrger and Dean Rosenzweig. A mathematical definition of full Prolog. Science of Computer Programming, 1994.]]
    [6]
    Egon D. B6rger and R. Salamone. CLAM specification for provably correct compilation of CLP(R) programs. In Egon D. B6rger. editor, Specification and Validation Methods. Oxford University Press, 1994.]]
    [7]
    R.M. Burstall. Some techniques for proving correctness of programs which alter data structures. In B. Meltzer and D. Michie, editors, Machine Intelligence 7, pages 23-50. Edinburgh University Press, 1972.]]
    [8]
    Warren Burton. An efficient functional implementation of FIFO queues. Information Processing Letters, 14:205-206, 1982.]]
    [9]
    Erik Crank and Matthias Felleisen. Parameter-passing and the lambda-calculus. In Proc. 18th A CM Symposium on Principles of Programming Languages, Orlando, Florida, pages 233-244, January 1991.]]
    [10]
    Chih-Ping Chen and Paul Hudak. Rolling your own mutable adt- a connection between linear types and monads. In Proc. ~4th A CM Symposium on Principles of Programming Languages, pages 54-67, January 1997.]]
    [11]
    Edsger W. Dijkstra. A Discipline of Programming. Prentice-Hall, Englewood Cliffs, New Jersey, 1976.]]
    [12]
    Yuri Gurevich and James K. Huggins. The semantics of the C programming language. In Computer Science Logic, Springer LNCS 702, pages 274-309, 1993.]]
    [13]
    Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns ' Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.]]
    [14]
    Jean-Yves Girard. Linear logic. Theoretical Computer Science, 50:1-102, 1987.]]
    [15]
    Y. Gurevich. Evolving Algebras 1993: Lipari Guide. In E. B6rger, editor, Specification and Validation Methods, pages 9-36. Oxford University Press, 1995.]]
    [16]
    David Hard. First-Order Dynamic Logic, volume 68 of Lecture Notes in Computer Science. Springer Verlag, 1979.]]
    [17]
    C.A.R. Hoare and Cliff B. Jones. Essays in Computing Science. Prentice-Hall international, London, 1989.]]
    [18]
    Robert Hood and Robert Melville. Real-time queue operations in pure Lisp. Information Processing Letters, 13:50-53, 1981.]]
    [19]
    C.A.R. Hoare. Proof of a program' Find. Communications of the ACM, 14(1):39-45, 1971.]]
    [20]
    C.A.R. Hoare. Proof of correctness of data representations. Acta lnformatica, 1'271- 281. 1972.]]
    [21]
    C.A.R. Hoare. Hints on programming language design. Stanford Artificial Intelligence Laboratory Memo AIM-224 or STAN-CS- 73-403, Stanford University, Stanford, California, December 1973.]]
    [22]
    Urs HSlzle. Integrating independentlydeveloped components in object-oriented languages. In Object-Oriented Programming 7th European Conference ECOOP '93 Kaiserslautern, Germany, Proceedings, volume 707 of Springer Verlag, Lecture Notes in Computer Science: pages 36-56, 1993.]]
    [23]
    Paul Hudak, Simon Peyton Jones, and Philip Wadler. Report on the programming language Haskell' a non-strict, purely functional language, version 1.2. Technical Report YALEU/DCS/RR-777, Yale University Department of Computer Science, March 1992.]]
    [24]
    John Hughes. Lazy memo-functions. In Proceedings, Functional Programming Languages and Computer Architecture, Nancy, France, pages 129-146. Springer-Vertag, September 1985. Lecture Notes in Computer Science 201.]]
    [25]
    C.A.R. Hoare and Niklaus Wirth. An axiomatic definition of the programming language Pascal. Acta Informatica, 2'335-355, 1973.]]
    [26]
    Ralph Keller and Urs HSlzle. Binary component adaptation. In Proc. European Conference on Object-Oriented Programming, Springer Lecture Notes in Computer Science, July 1998.]]
    [27]
    Patrick Lincoln and John Mitchelk Operational aspects of linear lambda calculus. In Seventh Annual IEEE Symposium on Logic in Computer Science, Santa Cruz, California, pages 235-246, Los Alamitos. California, June 1992. IEEE Computer Society Press.]]
    [28]
    I.A. Mason. Verification of programs that destructively manipulate data. Science of Computer Programming, 10:177-210, 1988.]]
    [29]
    Eugenio Moggi. Computational lambdacalculus and monads. In Proceedings 1989 iEEE Symposium on Logic in Computer Science, pages 14-23. IEEE, June 1989.]]
    [30]
    Eugenio Moggi. Notions of computation and monads. Information and Computation, 93:55-92, 1991.]]
    [31]
    Bernhard MSller. Towards pointer algebra. Science of Computer Programming, 21, 57- 90 1993.]]
    [32]
    Bernhard M6iler. Calculating with pointer structures. In Proc. IFIP TC~/WG~.i Working Conference on Algorithmic Languages and Calculi, Le Bischenberg, ~~ance, 1997.]]
    [33]
    John Maraist, Martin Odersky, David N. Turner, and Philip Wadler. Call-by-name, call-by-value, call-by-need, and the linear lambda calculus. Electronic Notes in Theoretical Computer Science, 1(1), 1995.]]
    [34]
    Robin Milner, Joachim Parrow, and David Walker. A calculus of mobile processes, I + II. Information and Computation, 100:1-77, 1992.]]
    [35]
    Ian Mason and Carolyn Talcott. Equivalence in functional languages with side effects. Journal of Functional Programming, 1(3):287-327, July 1991.]]
    [36]
    Martin Odersky. Observers for linear types. In B. Krieg-Brfickner, editor, ESOP '92: 4th European Symposium on Programming, Rennes, France, Proceedings, pages 390-407. Springer-Verlag, February 1992. Lecture Notes in Computer Science 582.]]
    [37]
    Chris Okasaki. Catenable double-ended queues. In Proc. International Conference on Functional Programming, pages 66-74. ACM, June 1997.]]
    [38]
    Martin Odersky, Dan Rabin, and Paul Hudak. Call-by-name, assignment, and the lambda calculus. In Proc. 20th A CM Symposium on Principles of Programming Languages, pages 43-56, January 1993.]]
    [39]
    John C. Reynolds. Reasoning about arrays. Communications of the ACM, 22:290-299, 1979.]]
    [40]
    R. Strom, D. Bacon, A. Lowry, A. Goldberg, D. Yellin, and S. Yemini. Hermes: A Language for Distributed Computing. Prentice Hall: February 1991. ISBN 0-13-389537-8.]]
    [41]
    J. Schwartz, R. Dewar, E. Dubinsky, and E. Schonberg. Programming with Sets: An Introduction to $ETL. Springer-Verlag, 1986.]]
    [42]
    Amr Sabry and John Field. Reasoning about explicit and implicit representations of state. In SIPL '93 A CM SIGPLAN Workshop on State in Programming Languages, Copenhagen, Denmark, pages 17-30, June 1993. Yale University Research Report YALEU/DCS/RR-968.]]
    [43]
    Philip Wadler. Comprehending monads. In Proc. A CM Conf. on Lisp and Functional Programming, pages 61-78, June 1990.]]
    [44]
    Philip Wadler. Linear types can change the world! In M. Broy and C. Jones, editors, IFIP TC 2 Working Conference on Programming Concepts and Methods, Sea of Galilee, Israel, pages 347-359. North Holland, April 1990.]]
    [45]
    Philip Wadler. The essence of functional programming. In Proc. 19th A CM Symposium on Principles of Programming Languages, pages 1-14, January 1992.]]
    [46]
    Niklaus Wirth and C.A.R. Hoare. A contribution to the development of ALGOL. Communications o.f the A CM, 9(6):413-432, 1966.]]

    Cited By

    View all

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ICFP '98: Proceedings of the third ACM SIGPLAN international conference on Functional programming
    September 1998
    351 pages
    ISBN:1581130244
    DOI:10.1145/289423
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 29 September 1998

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Article

    Conference

    ICFP98
    Sponsor:
    ICFP98: 1998 International Conference on Functional Programming
    September 26 - 29, 1998
    Maryland, Baltimore, USA

    Acceptance Rates

    ICFP '98 Paper Acceptance Rate 30 of 77 submissions, 39%;
    Overall Acceptance Rate 333 of 1,064 submissions, 31%

    Upcoming Conference

    ICFP '24

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)46
    • Downloads (Last 6 weeks)13
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2002)Objects + Views = Components?Abstract State Machines - Theory and Applications10.1007/3-540-44518-8_5(50-68)Online publication date: 26-Jul-2002
    • (2000)From recursion to iterationProceedings of the 2000 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation10.1145/328690.328700(73-82)Online publication date: 1-Jan-2000
    • (2000)Explicit NamespacesModular Programming Languages10.1007/10722581_8(77-89)Online publication date: 2000
    • (1999)From recursion to iterationACM SIGPLAN Notices10.1145/328691.32870034:11(73-82)Online publication date: 1-Nov-1999
    • (2005)Axioms for strict and lazy functional programsAnnals of Pure and Applied Logic10.1016/j.apal.2004.10.013133:1-3(293-318)Online publication date: May-2005

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media