Abstract
This work sets the formal bases for building tools that help retrieve classes in object-oriented libraries. In such systems, the user provides a query, formulated as a set of class interfaces. The tool returns classes in the library that can be used to implement the user’s request and automatically builds the required glue code. We propose subtyping of recursive types in the presence of associative and commutative products—that is, subtyping modulo a restricted form of type isomorphisms—as a model of the relation that exists between the user’s query and the tool’s answers. We show that this relation is a composition of the standard subtyping relation with equality up to associativity and commutativity of products and we present an efficient decision algorithm for it. We also provide an automatic way of constructing coercions between related types.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abadi, M., Fiore, M.P.: Syntactic considerations on recursive types. In: IEEE Symposium on Logic in Computer Science (LICS), pp. 242–252 (July 1996)
Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4), 575–631 (1993)
Aponte, M.-V., Di Cosmo, R.: Type isomorphisms for module signatures. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS, vol. 1140, pp. 334–346. Springer, Heidelberg (1996)
Auerbach, J., Barton, C., Raghavachari, M.: Type isomorphisms with recursive types. Technical Report RC 21247, IBM Yorktown Heights (1998)
Auerbach, J., Chu-Carrol, M.C.: The Mockingbird system: a compiler-based approach to maximally interoperable distributed systems. Technical Report RC 20718, IBM Yorktown Heights (1997)
Auerbach, J., Chu-Carrol, M.C., Barton, C., Raghavachari, M.: Mockingbird: Flexible stub generation from pairs of declarations. Technical Report RC 21309, IBM Yorktown Heights (1998)
Balat, V., Di Cosmo, R., Fiore, M.: Remarks on isomorphisms in typed lambda calculi with empty and sum type. In: IEEE Symposium on Logic in Computer Science (LICS) (July 2002)
Barton, C.M.: M-types and their coercions. Technical Report RC-21615, IBM Yorktown Heights (December 1999)
Brandt, M., Henglein, F.: Coinductive axiomatization of recursive type equality and subtyping. Fundamenta Informaticæ 33, 309–338 (1998)
Bruce, K., Di Cosmo, R., Longo, G.: Provable isomorphisms of types. Mathematical Structures in Computer Science 2(2), 231–247 (1992)
Cardone, F.: A coinductive completeness proof for the equivalence of recursive types. Theoretical Computer Science 275(1-2), 575–587 (2002)
Courcelle, B.: Fundamental properties of infinite trees. Theoretical Computer Science 25(2), 95–169 (1983)
Di Cosmo, R.: Deciding type isomorphisms in a type assignment framework. Journal of Functional Programming 3(3), 485–525 (1993)
Di Cosmo, R.: Isomorphisms of types: from λ-calculus to information retrieval and language design. In: Progress in Theoretical Computer Science. Birkhauser, Basel (1995)
Downey, P.J., Sethi, R., Tarjan, R.E.: Variations on the common subexpression problem. Journal of the ACM 27(4), 758–771 (1980)
Gapeyev, V., Levin, M., Pierce, B.: Recursive subtyping revealed. Journal of Functional Programming 12(6), 511–548 (2003)
Hopcroft, J.E., Karp, R.M.: An n 5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing 2(4), 225–231 (1973)
Jha, S., Palsberg, J., Zhao, T.: Efficient type matching. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 187–204. Springer, Heidelberg (2002)
Palsberg, J., Zhao, T.: Efficient and flexible matching of recursive types. Information and Computation 171, 364–387 (2001)
Rittri, M.: Using types as search keys in function libraries. Journal of Functional Programming 1(1), 71–89 (1991)
Rittri, M.: Retrieving library functions by unifying types modulo linear isomorphism. RAIRO Theoretical Informatics and Applications 27(6), 523–540 (1993)
Runciman, C., Toyn, I.: Retrieving re-usable software components by polymorphic type. Journal of Functional Programming 1(2), 191–211 (1991)
Soloviev, S.V.: The category of finite sets and cartesian closed categories. Journal of Soviet Mathematics 22(3), 1387–1400 (1983)
Thatté, S.R.: Automated synthesis of interface adapters for reusable classes. In: ACM Symposium on Principles of Programming Languages (POPL), January 1994, pp. 174–187 (1994)
Wing, J.M., Rollins, E., Zaremski, A.M.: Thoughts on a Larch/ML and a new application for LP. In: First International Workshop on Larch, July 1992, pp. 297–312 (1992)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Di Cosmo, R., Pottier, F., Rémy, D. (2005). Subtyping Recursive Types Modulo Associative Commutative Products. In: Urzyczyn, P. (eds) Typed Lambda Calculi and Applications. TLCA 2005. Lecture Notes in Computer Science, vol 3461. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11417170_14
Download citation
DOI: https://doi.org/10.1007/11417170_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-25593-2
Online ISBN: 978-3-540-32014-2
eBook Packages: Computer ScienceComputer Science (R0)