Assignments for Applicative Languages

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.

[1]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[2]  William W. Tait,et al.  Intensional interpretations of functionals of finite type I , 1967, Journal of Symbolic Logic.

[3]  D. Prawitz Ideas and Results in Proof Theory , 1971 .

[4]  B. J. Mailloux,et al.  Report on the Algorithmic Language , 1971 .

[5]  W. Tait A realizability interpretation of the theory of species , 1975 .

[6]  Dana S. Scott,et al.  Data Types as Lattices , 1976, SIAM J. Comput..

[7]  Gerard Huet,et al.  Conflunt reductions: Abstract properties and applications to term rewriting systems , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[8]  John C. Reynolds,et al.  Syntactic control of interference , 1978, POPL.

[9]  Gérard P. Huet,et al.  Confluent Reductions: Abstract Properties and Applications to Term Rewriting Systems , 1980, J. ACM.

[10]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .

[11]  Frank J. Oles,et al.  A category-theoretic approach to the semantics of programming languages , 1982 .

[12]  Joseph Y. Halpern,et al.  The semantics of local storage, or what makes the free-list free?(Preliminary Report) , 1984, POPL '84.

[13]  Paul Hudak,et al.  The aggregate update problem in functional programming systems , 1985, POPL.

[14]  David A. Schmidt Detecting global variables in denotational specifications , 1985, TOPL.

[15]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[16]  William D. Clinger,et al.  Revised3 report on the algorithmic language scheme , 1986, SIGP.

[17]  Kim B. Bruce,et al.  The Finitary Projection Model for Second Order Lambda Calculus and Solutions to Higher Order Domain Equations , 1986, LICS.

[18]  David K. Gifford,et al.  Integrating functional and imperative programming , 1986, LFP '86.

[19]  C. A. R. Hoare,et al.  Laws of programming , 1987, CACM.

[20]  Matthias Felleisen,et al.  A calculus for assignments in higher-order languages , 1987, POPL '87.

[21]  Philip Wadler,et al.  Projections for strictness analysis , 1987, FPCA.

[22]  M. Tofte Operational Semantics and Polymorphic Type Inference , 1988 .

[23]  John C. Reynolds,et al.  Preliminary design of the programming language Forsythe , 1988 .

[24]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

[25]  Matthias Felleisen,et al.  &lgr;-V-CS: an extended &lgr;-calculus for scheme , 1988, LISP and Functional Programming.

[26]  M. Felleisen lambda-V-CS: An Extended lambda-Calculus for Scheme. , 1988 .

[27]  John Hughes,et al.  Why Functional Programming Matters , 1989, Comput. J..

[28]  Paul Hudak Raman S. Sundaresh On the Expressiveness of Purely Functional I/O Systems , 1989 .

[29]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential State , 1989, Theor. Comput. Sci..

[30]  John C. Reynolds,et al.  Syntactic Control of Inference, Part 2 , 1989, ICALP.

[31]  Ian A. Mason,et al.  A sound and complete axiomatization of operational equivalence of programs with memory , 1989, LICS 1989.

[32]  John Launchbury,et al.  Projection factorisations in partial evaluation , 1991 .

[33]  Ian A. Mason,et al.  A Sound and Complete Axiomatization of OperationalEquivalence between Programs with Memory , 1989 .

[34]  Carolyn L. Talcott,et al.  Axiomatizing operational equivalence in the presence of side effects , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[35]  J. Girard,et al.  Proofs and types , 1989 .

[36]  Philip Wadler,et al.  Linear Types can Change the World! , 1990, Programming Concepts and Methods.

[37]  John C. Mitchell,et al.  Type Systems for Programming Languages , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[38]  Robin Milner,et al.  Definition of standard ML , 1990 .

[39]  Carl A. Gunter,et al.  Semantic Domains , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[40]  Robert D. Tennent,et al.  Semantical Analysis of Specification Logic , 1985, Inf. Comput..

[41]  Philip Wadler,et al.  Comprehending monads , 1990, LISP and Functional Programming.

[42]  Paul Hudak,et al.  Single-threaded polymorphic lambda calculus , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[43]  P. Wadler Is there a use for linear logic? , 1991, PEPM '91.

[44]  Philip Wadler Is there a use for linear logic , 1991 .

[45]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[46]  Carolyn L. Talcott,et al.  1 Equivalence in Functional Languages with E ectsIan , 2007 .

[47]  Vipin Swarup,et al.  A Logical View of Assignments , 1991, Constructivity in Computer Science.

[48]  Carolyn L. Talcott,et al.  Inferring the Equivalence of Functional Programs That Mutate Data , 1992, Theor. Comput. Sci..

[49]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

[50]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[51]  R. D. Tennent,et al.  Applications of Categories in Computer Science: Semantics of local variables , 1992 .

[52]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[53]  Simon L. Peyton Jones,et al.  Report on the programming language Haskell: a non-strict, purely functional language version 1.2 , 1992, SIGP.

[54]  Vipin Swarup,et al.  Type Theoretic Properties of Assignments , 1992 .