Regular Object Types

  • Vladimir Gapeyev
  • Benjamin C. Pierce
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2743)


Regular types have been proposed as a foundation for statically typed processing of XML and other forms of tree-structured data. To date, however, regular types have only been explored in special-purpose languages (e.g., XDuce, CDuce, and XQuery) with type systems designed around regular types “from the ground up.” The goal of the Xtatic language is to bring regular types to a broad audience by offering them as a lightweight extension of a popular object-oriented language, C#.

We develop here the formal core of the Xtatic design-a combination of the tree-structured data model of XDuce and the classes-and-objects data model of a conventional object-oriented language. Our tool for this investigation is a tiny language called FX with features drawn from Featherweight Java (FJ) and from the core of XDuce. Points of interest include (1) a smooth interleaving of the two data models, in which XDuce’s tree structures are grafted into of FJ’s class hierarchy while objects and object types play the role of XDuce’s label values and label types; (2) an intuitive “semantic” definition of the subtype relation, inherited from XDuce and extended to objects; and (3) a natural encoding of XML documents and their schemas using a simple form of singleton classes.


Pattern Match Regular Type Semistructured Data Label Type Program Context 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aldrich, J., Kostadinov, V., Chambers, C.: Alias annotations for program understanding. In: ACM Symposium on Object Oriented Programming: Systems, Languages, and Applications, OOPSLA (November 2002)Google Scholar
  2. 2.
    Ancona, D., Lagorio, G., Zucca, E.: A core calculus for Java exceptions. In: ACM Symposium on Object Oriented Programming: Systems, Languages, and Applications (OOPSLA), pp. 16–30 (2001)Google Scholar
  3. 3.
    Ancona, D., Zucca, E.: True modules for Java-like languages: Design and foundations, Technical Report DISI-TR-00-12, Dipartimento di Informatica e Scienze dellInformazione, Universit‘a di Genova (August 2000)Google Scholar
  4. 4.
    Benzaken, V., Castagna, G., Frisch, A.: CDuce: a white paper. In: Workshop on Programming Language Technologies for XML, PLAN-X (2002),
  5. 5.
    Bracha, G., Odersky, M., Stoutamire, D., Wadler, P.: Making the future safe for the past: Adding genericity to the Java programming language. In: Chambers, C. (ed.) ACM Symposium on Object Oriented Programming: Systems, Languages, and Applications (OOPSLA), ACM SIGPLAN Notices, Vancouver, BC, October 1998, vol. 33(10), pp. 183–200 (1998)Google Scholar
  6. 6.
    Catell, R. (ed.): The Object Database Standard: ODMG-1993. Morgan Kaufmann, San Francisco (1994)Google Scholar
  7. 7.
    Christensen, A.S., Moller, A., Schwartzbach, M.I.: Extending Java for highlevel web service construction (2002),
  8. 8.
    Clark, J.: TREX: Tree Regular Expressions for XML (2001),
  9. 9.
    Clark, J., Murata, M.: RELAX NG (2001),
  10. 10.
    Document Object Model (DOM) Level 3 validation specification, W3C working draft (2002),
  11. 11.
    Fernández, M.F., Siméon, J., Wadler, P.: A semi-monad for semi-structured data. In: Van den Bussche, J., Vianu, V. (eds.) ICDT 2001. LNCS, vol. 1973, pp. 263–300. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  12. 12.
    Frisch, A., Castagna, G., Benzaken, V.: Semantic subtyping. In: IEEE Symposium on Logic in Computer Science (LICS) (2002)Google Scholar
  13. 13.
    Hosoya, H.: Regular Expression Types for XML. PhD thesis, The University of Tokyo, Japan (2000)Google Scholar
  14. 14.
    Hosoya, H.: Regular expression pattern matching - a simpler design. Technical Report 1397, RIMS, Kyoto University (2003)Google Scholar
  15. 15.
    Hosoya, H., Murata, M.: Validation and boolean operations for attributeelement constraints. In: Workshop on Programming Language Technologies for XML, PLAN-X (2002)Google Scholar
  16. 16.
    Hosoya, H., Pierce, B.: Regular expression pattern matching. In: ACM Symposium on Principles of Programming Languages (POPL), London, England (2001); Full version to appear in Journal of Functional ProgrammingGoogle Scholar
  17. 17.
    Hosoya, H., Pierce, B.C.: XDuce: A typed XML processing language (preliminary report). In: Suciu, D., Vossen, G. (eds.) WebDB 2000. LNCS, vol. 1997, p. 226. Springer, Heidelberg (2001); Reprinted in The Web and Databases, Selected Papers. LNCS, vol. 1997. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  18. 18.
    Hosoya, H., Pierce, B.C.: XDuce: A statically typed XML processing language. ACM Transactions on Internet Technology (2003) (to appear)Google Scholar
  19. 19.
    Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. In: Proceedings of the International Conference on Functional Programming, ICFP (2000)Google Scholar
  20. 20.
    Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. In: ACM Symposium on Object Oriented Programming: Systems, Languages, and Applications, OOPSLA (October 1999); Full version in ACM Transactions on Programming Languages and Systems (TOPLAS) 23(3) (May 2001)Google Scholar
  21. 21.
    Igarashi, A., Pierce, B.C.: On inner classes. Information and Computation 177(1), 56–89 (2002); A special issue with papers from the 7th Workshop on Foundations of Object-Oriented Languages (FOOL); informal proceedings. An earlier version appeared in Proceedings of the 14th European Conference on Object- Oriented Programming (ECOOP). LNCS, vol. 1850, pp. 129–153. Springer, Heidelberg zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    Lahiri, T., Abiteboul, S., Widom, J.: Ozone: integrating structured and semistructured data. In: Connor, R.C.H., Mendelzon, A.O. (eds.) DBPL 1999. LNCS, vol. 1949, pp. 297–332. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  23. 23.
    League, C., Shao, Z., Trifonov, V.: Type-preserving compilation of Featherweight Java. ACM Transactions on Programming Languages and Systems 24(2), 112–152 (2002)CrossRefGoogle Scholar
  24. 24.
    Meijer, E., Shields, M.: XMλ: A functional programming language for constructing and manipulating XML documents (1999) (submitted for publication)Google Scholar
  25. 25.
    Odersky, M.: Report on the programming language Scala (2002),
  26. 26.
    Odersky, M., Wadler, P.: Pizza into Java: Translating theory into practice. In: ACM Symposium on Principles of Programming Languages (POPL), Paris, France (1997)Google Scholar
  27. 27.
    Papaconstantinou, Y., Garcia-Molina, H., Widom, J.: Object exchange across heterogeneous information sources. In: International Conference on Data Engineering (March 1995)Google Scholar
  28. 28.
  29. 29.
    Schultz, U.P.: Partial evaluation for class-based object-oriented languages. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, pp. 173–197. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  30. 30.
    Shields, M., Meijer, E.: Type-indexed rows. In: ACM Symposium on Principles of Programming Languages (POPL), London, England (2001)Google Scholar
  31. 31.
    Studer, T.: Constructive foundations for Featherweight Java. In: Kahle, R., Schroeder-Heister, P., Stärk, R.F. (eds.) PTCS 2001. LNCS, vol. 2183, p. 202. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  32. 32.
    Sun Microsystems. The Java architecture for XML binding, JAXB (2001),
  33. 33.
    Tabuchi, N., Sumii, E., Yonezawa, A.: Regular expression types for strings in a text processing language. In: Barthe, G., Thiemann, P. (eds.) Proceedings of Workshop on Types in Programming (TIP 2002). Electronic Notes in Theoretical Computer Science, vol. 75, pp. 1–19. Elsevier Science, Amsterdam (2002)Google Scholar
  34. 34.
    Tofte, M.: Type inference for polymorphic references. Information and Computation 89(1) (November 1990)Google Scholar
  35. 35.
    Wallace, M., Runciman, C.: Haskell and XML: Generic combinators or typebased translation? In: Proceedings of the Fourth ACM SIGPLAN International Conference on Functional Programming (ICFP‘99), ACM SIGPLAN Notices, vol. 34–9, pp. 148–159. ACM Press, New York (1999)CrossRefGoogle Scholar
  36. 36.
    Extensible Markup Language (XMLTM), XML 1.0, W3C Recommendation (February 1998),
  37. 37.
    XQuery 1.0: An XML Query Language, W3C Working Draft (November 2002),
  38. 38.
    XQuery 1.0 and XPath 2.0 Formal Semantics, W3C Working Draft (November 2002),
  39. 39.
    XML Schema Part 0: Primer, W3C Working Draft (2000),
  40. 40.
    XSL Transformations (XSLT) (1999),
  41. 41.
    Zenger, M.: Type-safe prototype-based component evolution. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, p. 470. Springer, Heidelberg (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Vladimir Gapeyev
    • 1
  • Benjamin C. Pierce
    • 1
  1. 1.University of Pennsylvania 

Personalised recommendations