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 behaviors in the modification. This result conforms with the programming methodology in which one should write a subclass method so that it does not override the behavior of superclass methods.
Preview
Unable to display preview. Download preview PDF.
References
G. Castagna. A meta-language for typed object-oriented languages. In 13th Conference on the Foundations of Software Technology and Theoretical Computer Science, number 761 in LNCS, Bombay, India, 1993.
F. Cardone and M. Coppo. Two extensions of curry's type inference system. In Logic and Computer Science, pp. 19–66. Academic Press, 1990.
Giuseppe Castagna, Giorgio Ghelli, and Giuseppe Longo. A calculus for overloaded functions with subtyping. Information and Computation, Vol. to appear, 1994.
R. Hasegawa. Parametricity of extensionally collapsed term models of polymorphism and their categorical properties. In Theoretical Aspects of Computer Software, volume 526 of Lecture Notes in Computer Science, pp. 495–512, 1991.
R. Harper and B. Pierce. A record calculus based on symmetric concatenation. In Proc. The Eighteenth Annual Symp. on Principles of Programming Languages, pp. 131–142, 1991.
R. Milner. Fully abstract models of typed λ-calculus. Theoret. Corn-put. Sci, Vol. 4, pp. 1–22, 1977.
Gennaro Monteleone. Generalized conjunctive types. In Proc. The Sixteenth Annual Symposium on Principles of Programming Languages, pp. 242–249. ACM, 1989.
A. Ohori and P. Buneman. Type inference in a database programming language. In Proc. AC Conf. on LISP and Functional Programming, pp. 174–183, 1988.
Didier Remy. Typing record concatenation for free. In Proc. The Nineteenth Annual Symposium on Principles of Programming Languages, pp. 166–176. ACM, 1992.
J. C. Reynolds. Using category theory to design implicit conversions and generic operators. In Lecture Notes in Computer Science, 94. Springer-Verlag, 1981.
J. C. Reynolds. Types, abstraction, and parametric polymorphism. In R. E. A. Mason, editor, Information Processing 83, pp. 513–523. North-Holland, 1983.
John C. Reynolds. Preliminary design of the programming language Forsythe. Technical Report CMU-CS-88-159, Carnegie Mellon University, June 1988.
Hideki Tsuiki. A Record Calculus with a Merge Operator. PhD thesis, Keio University, 1992.
Hideki Tsuiki, A normalizing calculus with overloading and subtyping. In 2'nd Int. Symp. on Theoretical Aspects of Computer Software, LNCS 789, pp. 273–295, 1994.
Mitchell Wand. Type inference for record concatenation and multiple inheritance. In Proc. Fourth IEEE Annual Symp. on Logic in Computer Science, pp. 92–97, 1989.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Tsuiki, H. (1994). On typed calculi with a merge operator. In: Thiagarajan, P.S. (eds) Foundation of Software Technology and Theoretical Computer Science. FSTTCS 1994. Lecture Notes in Computer Science, vol 880. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58715-2_117
Download citation
DOI: https://doi.org/10.1007/3-540-58715-2_117
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58715-6
Online ISBN: 978-3-540-49054-8
eBook Packages: Springer Book Archive