Assignments for applicative languages

  • Vipin Swarup
  • Uday S. Reddy
  • Evan Ireland
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 523)


We propose a theoretical framework for adding assignments and dynamic data to functional languages without violating their semantic properties. This differs from semifunctional languages like Scheme and ML in that values of expressions remain static and side-effect-free. A new form of abstraction called observer is designed to encapsulate state-oriented computation from the remaining purely applicative computation. The type system ensures that observers are combined linearly, allowing an implementation in terms of a global store. The utility of this extension is in manipulating shared dynamic data embedded in data structures. Evaluation of well-typed programs is Church-Rosser. Thus, programs produce the same results whether an eager or lazy evaluation order is used (assuming termination). A simple, sound logic permits reasoning about well-typed programs. The benefits of this work include greater expressive power and efficiency (compared to applicative languages), while retaining simplicity of reasoning.


Functional languages imperative programming lambda calculus type systems strong normalization Church-Rosser property referential transparency  continuation-passing style 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Fel88]
    M. Felleisen. lambda-v-cs: An extended lambda-calculus for scheme. In ACM Symp. on LISP and Functional Programming, 1988.Google Scholar
  2. [FF87]
    M. Felleisen and D. P. Friedman. A calculus for assignments in higher-order languages. In ACM Symp. on Principles of Programming Languages, pages 314–325, 1987.Google Scholar
  3. [FH89]
    M. Felleisen and R. Hieb. The revised report on the syntactic theories of sequential control and state. Technical Report COMP TR89-100, Rice University, 1989.Google Scholar
  4. [GH90]
    J.C. Guzman and P. Hudak. Single-threaded polymorphic lambda calculus. In IEEE Symp. on Logic in Computer Science, pages 333–343, 1990.Google Scholar
  5. [GL86]
    D.K. Gifford and J.M. Lucassen. Integrating functional and imperative programming. In ACM Symp. on LISP and Functional Programming, pages 28–38, 1986.Google Scholar
  6. [GLT89]
    Jean-Yves Girard, Yves Lafont, and Paul Taylor. Proofs and Types. Cambridge University Press, 1989.Google Scholar
  7. [HB85]
    P. Hudak and A. Bloss. The aggregate update problem in functional programming systems. In ACM Symp. on Principles of Programming Languages, pages 300–314, 1985.Google Scholar
  8. [HHJ+87]
    C. A. R. Hoare, I. J. Hayes, He Jifeng, C. C. Morgan, A. W. Roscoe, J. W. Sanders, I. H. Sorensen, J. M. Spivey, and B. A. Sufrin. Laws of programming. Communications of the ACM, 30(8):672–686, August 1987.Google Scholar
  9. [HS88]
    P. Hudak and R. Sundaresh. On the expressiveness of purely functional I/O systems. Technical Report YALEU/DCS/RR665, Yale University, Dec 1988.Google Scholar
  10. [Hue80]
    G. Huet. Confluent reductions: abstract properties and applications to term rewriting systems. Journal of the ACM, 27(4):797–821, October 1980. (Previous version in Proc. Symp. Foundations of Computer Science, Oct 1977).Google Scholar
  11. [Hug90]
    J. Hughes. Why functional programming matters. In Research Topics in Functional Programming, Univ. of Texas at Austin Year of Programming Series, chapter 2, pages 17–42. Addison-Wesley, 1990.Google Scholar
  12. [HW90]
    P. Hudak and P. Wadler (editors). Report on the programming language Haskell, A non-strict purely functional language (Version 1.0). Technical Report YALEU/DCS/RR-777, Dep. of Computer Sc., Yale University, Apr 1990.Google Scholar
  13. [Kar81]
    K. Karlsson. Nebula, A functional operating system. Tech. report, Chalmers University, 1981.Google Scholar
  14. [LG88]
    J.M. Lucassen and D.K. Gifford. Polymorphic effect systems. In ACM Symp. on Principles of Programming Languages, pages 47–57, 1988.Google Scholar
  15. [MH]
    L. M. McLoughlin and S. Hayes. Interlanguage working from a pure functional language. Functional Programming mailing list, Nov 1988.Google Scholar
  16. [Mit90]
    J. C. Mitchell. Type systems for programming languages. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science. North-Holland, Amsterdam, 1990. (also Report No. STAN-CS-89-1277, Department of Computer Science, Stanford University).Google Scholar
  17. [MT89a]
    I. A. Mason and C. Talcott. Axiomatizing operational equivalence in the presence of side effects. In IEEE Symp. on Logic in Computer Science, pages 284–293. IEEE, 1989.Google Scholar
  18. [MT89b]
    I. A. Mason and C. Talcott. A sound and complete axiomatization of operational equivalence between programs with memory. Technical Report STAN-CS-89-1250, Stanford University, 1989. (to appear in Theoretical Computer Science).Google Scholar
  19. [MTH90]
    R. Milner, M. Tofte, and R. Harper. The definition of Standard ML. The MIT Press, Cambridge, Massachusetts, 1990.Google Scholar
  20. [Per90]
    N. Perry. The Implementation of Practical Functional Programming Languages. PhD thesis, Imperial College of Science, Technology and Medicine, University of London, 1990.Google Scholar
  21. [Pra71]
    D. Prawitz. Ideas and results in proof theory. In Proc. Second Scandinavian Logic Symposium, 1971.Google Scholar
  22. [RC86]
    J. Rees and W. Clinger (editors). Revised3 report on the algorithmic language scheme. ACM SIGPLAN Notices, 21(12):37–79, Dec 1986.Google Scholar
  23. [Rey81]
    J. C. Reynolds. The essence of Algol. In J. W. de Bakker and J. C. van Vliet, editors, Algorithmic Languages, pages 345–372. North-Holland, 1981.Google Scholar
  24. [Rey82]
    J. C. Reynolds. Idealized Algol and its specification logic. In Neel. D., editor, Tools and Notions for Program Construction, pages 121–161. Cambridge Univ. Press, 1982.Google Scholar
  25. [Rey88]
    J.C. Reynolds. Preliminary design of the programming language Forsythe. Technical Report CMU-CS-88-159, Carnegie Mellon University, June 1988.Google Scholar
  26. [Rob65]
    J. A. Robinson. A machine-oriented logic based on the resolution principle. Journal of the ACM, 12:23–41, 1965.Google Scholar
  27. [Sch85]
    D. A. Schmidt. Detecting global variables in denotational specifications. ACM Transactions on Programming Languages and Systems, 7(2):299–310, Apr 1985.Google Scholar
  28. [SR91]
    V. Swarup and U.S. Reddy. A logical view of assignments. In Conf. on Constructivity in Computer Science, 1991. (To appear).Google Scholar
  29. [Sto77]
    J. E. Stoy. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press, 1977.Google Scholar
  30. [SW74]
    C. Strachey and C. P. Wadsworth. Continuations — a mathematical semantics for handling full jumps. Tech. Monograph PRG-11, Programming Research Group, University of Oxford, 1974.Google Scholar
  31. [Swa91]
    V. Swarup. Type theoretic properties of assignments. PhD thesis, University of Illinois at Urbana-Champaign, 1991. (To appear).Google Scholar
  32. [Tai75]
    W. W. Tait. A realizability interpretation of the theory of species. In R. Parikh, itor, Proceedings of Logic Colloquium, volume 453 of Lecture Notes in Mathematics, pages 240–251. Springer, Berlin, 1975.Google Scholar
  33. [Tof88]
    M. Tofte. Operational semantics and polymorphic type inference. PhD thesis, Edinburgh University, 1988. Available as Edinburgh Univ. Lab. for Foundations of Computer Science Technical Report ECS-LFCS-88-54.Google Scholar
  34. [Wad90a]
    P. Wadler. Comprehending monads. In ACM Symp. on LISP and Functional Programming, 1990.Google Scholar
  35. [Wad90b]
    P. Wadler. Linear types can change the world. In IFIP Working Conf. on Programming Concepts and Methods, Sea of Gallilee, Israel, Apr 1990.Google Scholar
  36. [Wad91]
    P. Wadler. Is there a use for linear logic? In Proc. ACM SIGPLAN Conf. on Partial Evaluation and Semantics-Based Program Manipulation, New York, 1991. ACM. (SIGPLAN Notices, to appear).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Vipin Swarup
    • 1
  • Uday S. Reddy
    • 2
  • Evan Ireland
    • 3
  1. 1.The MITRE CorporationBedford
  2. 2.Department of Computer ScienceUniversity of Illinois at Urbana-ChampaignUrbana
  3. 3.School of Information SciencesMassey UniversityPalmerston NorthNew Zealand

Personalised recommendations