## On Typed Calculi with a Merge Operator (1994)

Venue: | In 14th Conference on Foundations of Software Technology and Theoretical Computer Science, LNCS 880 |

Citations: | 5 - 3 self |

### BibTeX

@INPROCEEDINGS{Tsuiki94ontyped,

author = {Hideki Tsuiki},

title = {On Typed Calculi with a Merge Operator},

booktitle = {In 14th Conference on Foundations of Software Technology and Theoretical Computer Science, LNCS 880},

year = {1994},

pages = {101--112},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

. Extensions of the simply typed lambda calculus with a merge operator are defined and investigated. A merge of functions denotes a function which can be applied to more than one type and computes the result by merging the results of the component functions. We propose first two calculi in which the inconsistency between the return values of the component functions is solved using a non-symmetric rule, and show that they do not have good proof-theoretic properties: one does not have the Strong Normalization Property, and the other does not have the Transitivity of Coercions Property. Then, using the type system, we restrict the two calculi in a way that terms which may cause inconsistency are excluded, and show that the two calculi become equivalent and have all the desired properties. A merge of functions in object oriented programming corresponds to writing a method in a subclass by modifying those in superclasses, and the above restriction corresponds to only allowing adding some be...

### Citations

364 |
Types, abstraction and parametric polymorphism
- Reynolds
- 1983
(Show Context)
Citation Context ...ic functions are coherent. Note that this is a relaxization of the characterization of a parametric polymorphic function that it is a function which preserves all the relations between all the types (=-=[Rey83]-=-, [Has91]). A coherent generic function is not a new idea; operators which satisfy this condition have been studied for a decade. For example, consider the implicit coercion from int to real in an Alg... |

138 | A calculus for overloaded functions with subtyping
- Castagna, Ghelli, et al.
- 1995
(Show Context)
Citation Context ...rride the behavior of superclass methods. 1 Introduction Calculi with overloading and subtyping have recently been designed with the aim of providing a foundation for typed object-oriented languages (=-=[CGL94]-=-, [Tsu94]). In the previous work [Tsu94], the author has shown that overloading, when used with subtyping, causes some undesired properties. That is, we can define two sets of reduction rules on the s... |

114 | Type inference for record concatenation and multiple inheritance
- Wand
- 1991
(Show Context)
Citation Context ... or a join or a concatenation of records, can be defined naturally, and has been studied elaborately in the area of database programming language and foundation of object oriented computing ( [OB88], =-=[Wan89]-=-, [HP91], [Rem92]). A simple example of a merge is fx = 100; y = 50g\Omega fcolor = redg = fx = 100; y = 50; color = redg. When both records have a same label, merge is defined recursively. For exampl... |

109 | Design of the programming language Forsythe
- Reynolds
- 1996
(Show Context)
Citation Context ...e result when integer values are considered as reals. This is a natural condition for the two operators to be assigned the same symbol, and [Rey81] gave a semantics to such an operator, and Forsythe (=-=[Rey88]-=-) is a language based on this. However, there have been no works on allowing a programmer to define a coherent generic function. In this paper, we study calculi which propose a way of defining such a ... |

59 | A record calculus based on symmetric concatenation
- Harper, Pierce
- 1991
(Show Context)
Citation Context ...n or a concatenation of records, can be defined naturally, and has been studied elaborately in the area of database programming language and foundation of object oriented computing ( [OB88], [Wan89], =-=[HP91]-=-, [Rem92]). A simple example of a merge is fx = 100; y = 50g\Omega fcolor = redg = fx = 100; y = 50; color = redg. When both records have a same label, merge is defined recursively. For example,sfname... |

51 |
Using category theory to design implicit conversions and generic operators
- Reynolds
- 1980
(Show Context)
Citation Context ...t the integer addition and the real addition produce the same result when integer values are considered as reals. This is a natural condition for the two operators to be assigned the same symbol, and =-=[Rey81]-=- gave a semantics to such an operator, and Forsythe ([Rey88]) is a language based on this. However, there have been no works on allowing a programmer to define a coherent generic function. In this pap... |

46 |
Two extensions of Curry's type inference system
- Cardone, Coppo
- 1990
(Show Context)
Citation Context ... [Tsu92] for the detail. Note that our typing system can be considered as a variant of intersection type system, in which intersection is limited to function types and the set of types is consistent (=-=[CC90]-=-, [Mon89]). Now, we move on to expressions. The pseudo expressions of our calculi are defined as follows: e ::= c S j x S j x S : e j e f j ej S j e1\Omega e2 Here, c S means a constant of type S and ... |

37 | Typing record concatenation for free
- RÉMY
- 1992
(Show Context)
Citation Context ...oncatenation of records, can be defined naturally, and has been studied elaborately in the area of database programming language and foundation of object oriented computing ( [OB88], [Wan89], [HP91], =-=[Rem92]-=-). A simple example of a merge is fx = 100; y = 50g\Omega fcolor = redg = fx = 100; y = 50; color = redg. When both records have a same label, merge is defined recursively. For example,sfname=ffirst=A... |

29 |
Type inference in a database programming language
- Buneman
- 1988
(Show Context)
Citation Context ...records, or a join or a concatenation of records, can be defined naturally, and has been studied elaborately in the area of database programming language and foundation of object oriented computing ( =-=[OB88]-=-, [Wan89], [HP91], [Rem92]). A simple example of a merge is fx = 100; y = 50g\Omega fcolor = redg = fx = 100; y = 50; color = redg. When both records have a same label, merge is defined recursively. F... |

17 | A meta-language for typed object-oriented languages
- Castagna
- 1995
(Show Context)
Citation Context ...g One of the motivations of the study of calculi with overloading is to give foundation to object oriented programming by interpreting a message send as a call to an overloaded function. ([CGL94] and =-=[Cas93]-=-). It is recommended that, when programming in an object oriented language, one should write a method in a subclass by modifying those with the same name in superclasses, and one should not change the... |

13 |
Parametricity of extensionally collapsed term models of polymorphism and their categorical properties
- Hasegawa
(Show Context)
Citation Context ...ons are coherent. Note that this is a relaxization of the characterization of a parametric polymorphic function that it is a function which preserves all the relations between all the types ([Rey83], =-=[Has91]-=-). A coherent generic function is not a new idea; operators which satisfy this condition have been studied for a decade. For example, consider the implicit coercion from int to real in an Algol like l... |

9 |
Fully abstract models of the typed - calculus
- Milner
- 1977
(Show Context)
Citation Context ...at ej T j S is congruent with ej S when TsS, and Congruence of Equivalent Types means that ej T is congruent with e when S ' T and e : S, with the congruence relation defined as follows: Definition 6 =-=[Mil77]-=-. Two closed terms e and f are congruent (esf) if in any context C[] of a basic type, C[e] reduces to a normal form c iff C[f ] reduces to c. Note that esf means that e and f are extensionally equal. ... |

4 |
A Record Calculus with a Merge Operator
- Tsuiki
- 1992
(Show Context)
Citation Context ...od(F; T ) for T a type. Note that expand(F ) is a finite set. The decision procedure checks for function types whether all the elements of expand(S) are lower bounded by an element of expand(T ). See =-=[Tsu92]-=- for the detail. Note that our typing system can be considered as a variant of intersection type system, in which intersection is limited to function types and the set of types is consistent ([CC90], ... |

2 |
Generalized conjunctive types
- Monteleone
- 1989
(Show Context)
Citation Context ... for the detail. Note that our typing system can be considered as a variant of intersection type system, in which intersection is limited to function types and the set of types is consistent ([CC90], =-=[Mon89]-=-). Now, we move on to expressions. The pseudo expressions of our calculi are defined as follows: e ::= c S j x S j x S : e j e f j ej S j e1\Omega e2 Here, c S means a constant of type S and x S means... |

1 |
A normalizing calculus with overloading and subtyping
- Tsuiki
- 1994
(Show Context)
Citation Context ... behavior of superclass methods. 1 Introduction Calculi with overloading and subtyping have recently been designed with the aim of providing a foundation for typed object-oriented languages ([CGL94], =-=[Tsu94]-=-). In the previous work [Tsu94], the author has shown that overloading, when used with subtyping, causes some undesired properties. That is, we can define two sets of reduction rules on the same synta... |