## A Theory of Classes for a Functional Language with Effects (1993)

Venue: | In Proceedings of CSL92, volume 702 of Lecture Notes in Computer Science |

Citations: | 7 - 6 self |

### BibTeX

@INPROCEEDINGS{Honsell93atheory,

author = {Furio Honsell and Ian A. Mason and Scott Smith and Carolyn Talcott},

title = {A Theory of Classes for a Functional Language with Effects},

booktitle = {In Proceedings of CSL92, volume 702 of Lecture Notes in Computer Science},

year = {1993},

pages = {309--326},

publisher = {Springer}

}

### OpenURL

### Abstract

this paper we introduce a variable typed logic of effects (i.e. a logic of effects where classes can be defined and quantified over) inspired by the variable type systems of Feferman [3, 4] for purely functional languages. A similar extension incorporating non-local control operations was introduced in [27]. The logic we present provides an expressive language for defining specifications and constraints and for studying properties and program equivalences, in a uniform framework. Thus it has an advantage over a plethora of systems in the literature that aim to capture solitary aspects of computation. The theory also allows for the construction of inductively defined sets and derivation of the corresponding induction principles. Classes can be used to express, inter alia, the non-expansiveness of terms [29]. Other effects can also be represented within the system. These include read/write effects and various forms of interference [24]. The first order fragment is described in [16] where it is used to resolve the denotationally problematic examples of [17]. In our language atoms, references and lambda abstractions are all first class values and as such are storable. This has several consequences. Firstly, mutation and variable binding are separate and so we avoid the problems that typically arise (e.g. in Hoare's and dynamic logic) from the conflation of program variables and logical variables. Secondly, the equality and sharing of references (aliasing) is easily expressed and reasoned about. Thirdly, the combination of mutable references and lambda abstractions allows us to study object based programming within our framework. Our atomic formulas express the (operational or observational) equivalence of programs `a la Plotkin [23]. Neither Hoare's logic nor Dynamic logi...

### Citations

542 | A syntactic approach to type soundness
- Wright, Felleisen
- 1994
(Show Context)
Citation Context ...his sense they are more syntactic than semantic. In the following we illustrate the problems that arise in trying to encode the monomorphic type system with higher-order functions and references (cf. =-=[28, 29, 9, 6]-=-). In this system types are built from base types, N and Nil, using the reference construction and a suitable function space constructor (provisionally denoted by ! ). T= N+ Nil + (T !T)+ ref(T) The t... |

441 | Computational lambda-calculus and monads
- Moggi
- 1989
(Show Context)
Citation Context ...]) = ; ) (\Gamma[R[e oe 0 ]] l \Gamma[R[e oe 1 ]])) The proof of (ciu) appears in [14]. Using this theorem we can easily establish, for example, the validity of the let-rules of the lambda-c calculus =-=[18]-=-. 3. The Syntax and Semantics of Formulas I. --- Individuals In addition to being a useful tool for establishing laws of operational equivalence, (ciu) can be used to define a satisfaction relation be... |

237 | Polymorphic effect systems
- Lucassen, Gifford
- 1988
(Show Context)
Citation Context ... �� !Y with arguments in X 1 ; : : : ; Xn and result in Y allowing for the possible modification of memory in the process. This can be refined by making the possible effects explicit in the spirit=-= of [10, 11]-=-. At the other end of the spectrum there is the function space that corresponds to those operations that return appropriate values without even enlarging memory, let alone altering existing memory. Se... |

128 |
Lambda Calculus Models of Programming Languages
- Morris
- 1968
(Show Context)
Citation Context ...tionally equivalent, written e 0 �� = e 1 , if for any closing context C , C [e 0 ] is defined iff C [e 1 ] is defined. This definition extends the extensional equivalence relations defined by Mor=-=ris [19]-=- and Plotkin [23] to computation over memory structures. In general it is very difficult to establish the operational equivalence of expressions. Thus it is desirable to have a simpler characterizatio... |

111 | Equivalence in functional languages with effects
- Mason, Talcott
- 1991
(Show Context)
Citation Context ...nted in [15] where the corresponding rules had complicated side-conditions. The semantics of expressions is a call-by-value evaluation relation given by a reduction relation on syntactic entities. In =-=[14]-=- we used this approach to establish a useful characterization of operational equivalence. This characterization reduces the number of contexts that need to be considered. The class of contexts that ne... |

99 |
Toward fully abstract semantics for local variables
- Meyer, Sieber
- 1988
(Show Context)
Citation Context ...rences are problematic for polymorphic type systems [28, 29]. References are also troublesome from a denotational point of view as illustrated by the absence of fully abstract models. For example, in =-=[17]-=- Meyer and Sieber give a series of examples of programs that are operationally equivalent (according to the intended semantics of block-structured Algol-like programs) but which are not given equivale... |

90 |
A language and axioms for explicit mathematics
- Feferman
- 1975
(Show Context)
Citation Context ...t under certain simple conditions allocation followed by assignment may be replaced by a suitably altered allocation. 4. The Syntax and Semantics of Formulas II. --- Classes Using methods of Feferman =-=[2, 4]-=- and Talcott [27], we extend our theory to include a general theory of classifications (classes for short). With the introduction of classes, principles such as structural induction, as well as princi... |

57 |
Types and Effects, towards the Integration of Functional and Imperative Programming
- Lucassen
- 1987
(Show Context)
Citation Context ... �� !Y with arguments in X 1 ; : : : ; Xn and result in Y allowing for the possible modification of memory in the process. This can be refined by making the possible effects explicit in the spirit=-= of [10, 11]-=-. At the other end of the spectrum there is the function space that corresponds to those operations that return appropriate values without even enlarging memory, let alone altering existing memory. Se... |

49 | Polymorphic type inference and assignment
- Leroy, Weis
- 1991
(Show Context)
Citation Context ...his sense they are more syntactic than semantic. In the following we illustrate the problems that arise in trying to encode the monomorphic type system with higher-order functions and references (cf. =-=[28, 29, 9, 6]-=-). In this system types are built from base types, N and Nil, using the reference construction and a suitable function space constructor (provisionally denoted by ! ). T= N+ Nil + (T !T)+ ref(T) The t... |

35 | Semantics of local variables
- O’Hearn, Tennent
- 1992
(Show Context)
Citation Context ...h are not given equivalent denotations in traditional denotational semantics. They propose various modifications to the denotational semantics which solve some of these discrepancies, but not all. In =-=[21, 20]-=- a denotational semantics that overcomes some of these problems is presented. However variations on the seventh example remain problematic. Since numerous proof systems for Algol are sound for the den... |

33 |
The Calculi of lambda-v-cs Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages
- Felleisen
- 1987
(Show Context)
Citation Context ...ion contexts identify the subexpression of an expression that is to be evaluated next. They correspond to the left-first, call-by-value reduction strategy of Plotkin [23] and were first introduced in =-=[5]-=-. R= ffflg + app(R;E) + app(V; R)+ Fm+n+1 (V m ; R;E n ) R ranges over R. The crucial fact to note is that an arbitrary expression is either a value expression, or decomposes uniquely into a redex pla... |

30 | References, local variables and operational reasoning
- Mason, Talcott
- 1992
(Show Context)
Citation Context ...expansiveness of terms [29]. Other effects can also be represented within the system. These include read/write effects and various forms of interference [24]. The first order fragment is described in =-=[16]-=- where it is used to resolve the denotationally problematic examples of [17]. In our language atoms, references and lambda abstractions are all first class values and as such are storable. This has se... |

26 | Inferring the equivalence of functional program that mutate data, Theoretical Computer Science 105
- Mason, Talcott
- 1992
(Show Context)
Citation Context ...g contextual assertions we can express the axioms concerning the effects of mk and set simply and elegantly. This improves the complete system (for quantifier/recursion free expressions) presented in =-=[15]-=- where the corresponding rules had complicated side-conditions. The semantics of expressions is a call-by-value evaluation relation given by a reduction relation on syntactic entities. In [14] we used... |

25 |
Trakhtenbrot, The semantics of local storage, or what makes the free-list free
- Halpern, Meyer, et al.
- 1984
(Show Context)
Citation Context ... overcomes some of these problems is presented. However variations on the seventh example remain problematic. Since numerous proof systems for Algol are sound for the denotational models in question, =-=[8, 7, 25, 22, 12, 21, 20]-=-, these equivalences, if expressible, must be independent of these systems. In this paper we introduce a variable typed logic of effects (i.e. a logic of effects where classes can be defined and quant... |

23 |
Polymorphic typed lambda-calculi in a type-free axiomatic framework
- Feferman
- 1990
(Show Context)
Citation Context ...hese systems. In this paper we introduce a variable typed logic of effects (i.e. a logic of effects where classes can be defined and quantified over) inspired by the variable type systems of Feferman =-=[3, 4]-=- for purely functional languages. A similar extension incorporating non-local control operations was introduced in [27]. The logic we present provides an expressive language for defining specification... |

19 | Axiomatizing operational equivalence in the presence of side effects
- Mason, Talcott
- 1989
(Show Context)
Citation Context ...ma 0 ; U 0 [[oe 0 ]] 7! \Gamma 1 ; U 1 [[oe 1 ]]; then \Gamma 0 j= U 0 [[\Phi]][oe 0 ] iff \Gamma 1 j= U 1 [[\Phi]][oe 1 ] This logic extends and improves the complete first order system presented in =-=[13, 15]-=-. There certain reasoning principles were established as basic, and from these all others, suitably restricted, could be derived using simple equational reasoning. The system presented there had sever... |

16 | Faithful ideal models for recursive polymorphic types
- Abadi, Pierce, et al.
- 1991
(Show Context)
Citation Context ...) \Phi : (e; �� b )) ) \Phi : (x:e; �� a ! �� b )) (3) V i!n \Phi : (x i ; �� i ) ) ((\Phi : (e; �� a ! �� b )s\Phi : (e a ; �� a )) ) (\Phi : (app(e; e a ); �� b ) The=-= principle of type faithfulness [1] e a �� = e b ) -=-(( i!n \Phi : (x i ; �� i ) ) \Phi : (e a ; ��)) ) ( i!n \Phi : (x i ; �� i ) ) \Phi : (e b ; ��))) is also a desirable property. Note that in our framework this implies that a subterm... |

13 |
From denotational to operational and axiomatic semantics for ALGOL-like languages: An overview
- Trakhtenbrot, Halpern, et al.
- 1984
(Show Context)
Citation Context ... overcomes some of these problems is presented. However variations on the seventh example remain problematic. Since numerous proof systems for Algol are sound for the denotational models in question, =-=[8, 7, 25, 22, 12, 21, 20]-=-, these equivalences, if expressible, must be independent of these systems. In this paper we introduce a variable typed logic of effects (i.e. a logic of effects where classes can be defined and quant... |

12 |
A theory of variable types. Revista Colombiana de Matem'aticas
- Feferman
- 1975
(Show Context)
Citation Context ...hese systems. In this paper we introduce a variable typed logic of effects (i.e. a logic of effects where classes can be defined and quantified over) inspired by the variable type systems of Feferman =-=[3, 4]-=- for purely functional languages. A similar extension incorporating non-local control operations was introduced in [27]. The logic we present provides an expressive language for defining specification... |

4 |
Problematic features of programming languages
- Manna, Waldinger
- 1981
(Show Context)
Citation Context ... overcomes some of these problems is presented. However variations on the seventh example remain problematic. Since numerous proof systems for Algol are sound for the denotational models in question, =-=[8, 7, 25, 22, 12, 21, 20]-=-, these equivalences, if expressible, must be independent of these systems. In this paper we introduce a variable typed logic of effects (i.e. a logic of effects where classes can be defined and quant... |

2 |
Hoare's logic for programs with procedures--what has been accomplished
- Olderog
(Show Context)
Citation Context |