skip to main content
10.1145/360204.360232acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Subtyping arithmetical types

Authors Info & Claims
Published:01 January 2001Publication History

ABSTRACT

We consider the type system formed by a finite set of primitive types such as integer, character, real, etc., and three type construction operators: (i) Cartesian product, (ii) disjoint sum, and (iii) recursive type definitions. Type equivalence is defined to obey the arithmetical rules: commutativity and associativity of product and sum and distributivity of product over sum. We offer a compact representation of the types in this system as multivariate algebraic functions. This type system admits two natural notions of subtyping: "multiplicative", which roughly corresponds to the notion of object-oriented subtyping, and "additive", which seems to be more appropriate in our context. Both kinds of subtyping can be efficiently computed if no recursive definitions are allowed. Our main result is that additive subtyping is undecidable in the general case. Perhaps surprisingly, this undecidability result is by reduction from Hilbert's Tenth Problem (HIO): the solution of Diophantine equations.

References

  1. 1.R. M. Amadio and L. Cardelli. Subtyping recursive types. ACM Transactions on Programming Languages and Systems, 15(4):575-631, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.K. Arnold and J. Gosling. The Java Programming Language. The Java Series. Addison-Wesley, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.J. Auerbach. The #type system. Unpublished Manuscript, IBM T. J. Watson Research Center, P.O. Box 704, Yorktown Heights, NY 10598, 1998.]]Google ScholarGoogle Scholar
  4. 4.J. Auerbach, C. Barton, M. Chu-Carroll, and M. Raghavachari. Mockingbird: Flexible stub compilation from pairs of declarations. In M. G. Gouda, editor, The 19 th IEEE International Conference on Distributed Computing Systems (ICDCS), Austin, Texas, May-June 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.J. Auerbach and M. Chu-Carroll. The Mockingbird system: A compiler based approach to maximally interoperable distributed programming. Technical Report RC20718, IBM T. J. Watson Research Center, EO. Box 704, Yorktown Heights, NY 10598, 1997.]]Google ScholarGoogle Scholar
  6. 6.J. Avotins, G. Maughan, and C. Mingins. Language processor construction: The case for YOOCC and TROOPER. In Proceedings of TOOLS USA'95, 1995.]]Google ScholarGoogle Scholar
  7. 7.J. Avotins, C. Mingins, and H. Schmidt. Yes! an objectoriented compiler compiler YOOCC. In Proceedings of TOOLS USA'95, 1995.]]Google ScholarGoogle Scholar
  8. 8.S. Basu and M.-E Roy. On the combinatorial and algebraic complexity of quantifier elimination. J. ACM, 43(6):1002- 1045, Nov. 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.M. Brandt and E Henglein. Coinductive axiomatization of recursive type equality and subtyping. Fundamenta Informaticae, 33(4):309-338, May 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.G. E. Collins. Quantifier elimination for real closed fields by cylindrical algebraic decomposition. In Proceeding of the 2 nd GI Conference on Automata Theory and Formal Languages, pages 134-183, New York, 1975. Springer Verlag.]] Google ScholarGoogle Scholar
  11. 11.G.E. Collins. Quantifier elimination by cylindrical algebraic decomposition-twenty years of progress. In B. E Caviness and J. R. Johnson, editors, Quantier Elimination and Cylindrical Algebraic Decomposition, pages 8-23. Springer Verlag, New York, 1998.]]Google ScholarGoogle ScholarCross RefCross Ref
  12. 12.T.H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to Algorithms. MIT Press, Cambridge, Massachusetts, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.D. Cox, J. Little, and D. O'Shea. Ideals, Varieties andAlgorithms. Undergraduate Texts in Mathematics. Springer Verlag, second edition, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.E Datum. Subtyping with union types, intersection types and recursive types. In Hagiya and Mitchell {20}, pages 687-706.]] Google ScholarGoogle Scholar
  15. 15.J. Davenport and J. Heintz. Real quantifier elimination if doubly exponential. J. Symb. Comput., 5:29-35, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.R. Di Cosmo. Isomorphisms of Types: from A-calculus to information retrieval and language design. Birkhiuser, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.J. Gil and D. H. Lorenz. SOOP - A synthesizer of an objectoriented parser. In Proceedings of the 16 International Conference on Technology of Object-Oriented Languages and Systems, pages 81-96, Versailles, France, Mar. 6-10 1995. TOOLS 16 Europe Conference, Prentice-Hall.]]Google ScholarGoogle Scholar
  18. 18.C. F. Goldfarb. The SGML Handbook. Clarendon Press, Oxford, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.C. E Goldfarb and P. Prescod. The XML Handbook. Charles E Goldfarb Series. Prentice-Hall, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.M. Hagiya and J. C. Mitchell, editors. Proceedings of the 2 nd International Symposium on Theoretical Aspects of Computer Software, volume 789 of Lecture Notes in Computer Science, Sendai, Japan, Apr. 1994. Springer Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.M. Hofri. Probabilistic Analysis of Algorithms. Springer- Verlag New York Inc., 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.J. Ichibia, editor. Ada Programming Language. ANSI/MIL- STD-1815A. Ada Joint Program Office, Department of Defense, Washington, DC, 1983.]]Google ScholarGoogle Scholar
  23. 23.C. B. Jay. The FISh programming definition. Available as http: //www-sta f f.mcs .uts. edu. au/au/~cbj/- Publications/lastest_fish.ps. gz, Oct. 1998.]]Google ScholarGoogle Scholar
  24. 24.J. E Jones. Universal Diophantine equation. Journal of Symbolic Logic, 47(3):547-571, 1982.]]Google ScholarGoogle ScholarCross RefCross Ref
  25. 25.B. W. Kernighan and D. M. Ritchie. The C Programming Language. Software Series. Prentice-Hail, second edition, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.D. Kozen, J. Palsberg, and M. Schwartzbach. Efficient recursive subtyping. Mathematical Structures in Computer Science, 5, 1995.]]Google ScholarGoogle Scholar
  27. 27.W. Kuich and A. Salomaa. Semirings, Automata, Languages, volume 5 of EATCS Monographs on Theoretical Computer Science. Springer-Verlag, 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.L. Lamport. ITEX: A Document Preparation System. Addison-Wesley, 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.J. V. Matijasevi. Enumerable sets are Diophantine. Soviet Mathematics. Doklady, 11(2):354-358, 1970. This is an English translation of the original paper in Russian (1970).]]Google ScholarGoogle Scholar
  30. 30.Y. V. Matiyasevich. Hilbert's tenth problem. MIT Press, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.B. Meyer. Object-Oriented Software Construction. Prentice- Hail, second edition, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 32.R. J. Parikh. On context-free languages. J. ACM, 13(4):570- 581, 1966.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33.O. Patashnik. BIBTLfing, 8 Feb. 1988. Documentation for general BIBTEX users.]]Google ScholarGoogle Scholar
  34. 34.L. C. Paulson. MLfor the Working Programmer. Cambridge University Press, Cambridge, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.M. Rittri. Using types as search keys in function libraries. Journal of Functional Programming, 1:71-89, 1991.]]Google ScholarGoogle ScholarCross RefCross Ref
  36. 36.J. Robinson. Hilbert's tenth problem. In Proc. Syrup. Pure Math., 20, pages 191-194. Amer. Math. Soc., Providence, Rhode Island, 1971.]]Google ScholarGoogle Scholar
  37. 37.A. Salomaa. Formal Languages. Academic Press, New York and London, 1973.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 38.A. Salomaa and M. Soittola. Automata-Theoretic Aspects of Formal Power Series. Springer-Verlag, 1978.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 39.R. Sedgewick and P. Flajolet. An Introduction to the Analysis of Algorithms. Addison-Wesley Publishing Company, Inc., 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. 40.T. Sekiguchi and A. Yonezawa. A complete type inference system for subtyped recursive types. In Hagiya and Mitchell 20, pages 667-685.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 41.B. Stroustrup. The C++ Programming Language. Addison- Wesley, third edition, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 42.A. Tarski. A Decision Method for Elementary Algebra and Geometry. University of California Press, Berkeley, CA, second edition, 1951.]]Google ScholarGoogle Scholar
  43. 43.N. Wirth. The programming language Pascal. Acta Informatica, 1:35-63, 1971.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. 44.Recommendation x.208: Speficiation of abstract syntax notation one (ASN.1), Mar. 1988.]]Google ScholarGoogle Scholar
  45. 45.R. E. Zippel. Effective Polynomial Computation. Kluwer Academic Publishers, Boston, Dordrecht, London, 1993.]]Google ScholarGoogle Scholar

Index Terms

  1. Subtyping arithmetical types

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            POPL '01: Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
            January 2001
            304 pages
            ISBN:1581133367
            DOI:10.1145/360204

            Copyright © 2001 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 January 2001

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            POPL '01 Paper Acceptance Rate24of126submissions,19%Overall Acceptance Rate824of4,130submissions,20%

            Upcoming Conference

            POPL '25

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader