Skip to main content

An Implementation of Subtyping Among Regular Expression Types

  • Conference paper
Programming Languages and Systems (APLAS 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3302))

Included in the following conference series:

Abstract

We introduce a novel implementation of subtyping among regular expression types in terms of Haskell-style type classes by making use of some modest type class extensions. We assume that each regular expression type has some underlying structured runtime representation. Hence, we not only check for the containment problem among regular expressions, but also automatically derive some appropriate casting functions among the underlying structured values. We believe that this work is the first step in adding type-safe XML support to languages such as Haskell.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aiken, A., Murphy, B.: Implementing regular tree expressions. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 427–447. Springer, Heidelberg (1991)

    Chapter  Google Scholar 

  2. Antimirov, V.M.: Rewriting regular inequalities. In: Reichel, H. (ed.) FCT 1995. LNCS, vol. 965, pp. 116–125. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  3. Benzaken, V., Castagna, G., Frisch, A.: Cduce: An XML-centric general-purpose language. In: Proc. of ICFP 2003, pp. 51–63. ACM Press, New York (2003)

    Google Scholar 

  4. Crary, K.: Foundations for the implementation of higher-order subtyping. In: Proc. of ICFP 1997, pp. 125–135. ACM Press, New York (1997)

    Google Scholar 

  5. Duck, G.J., Peyton-Jones, S., Stuckey, P.J., Sulzmann, M.: Sound and decidable type inference for functional dependencies. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 49–63. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  6. Frisch, A., Cardelli, L.: Greedy regular expression matching. In: PLAN-X 2004 Informal Proceedings (2004)

    Google Scholar 

  7. Glasgow Haskell compiler home page, http://www.haskell.org/ghc/

  8. Hall, C.V., Hammond, K., Peyton Jones, S., Wadler, P.: Type classes in Haskell. In: Sannella, D. (ed.) ESOP 1994. LNCS, vol. 788, pp. 241–256. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  9. Hosoya, H.: Regular Expression Types for XML. PhD thesis, The University of Tokyo (December 2000)

    Google Scholar 

  10. Hosoya, H., Pierce, B.C.: Regular expression pattern matching for XML. In: Proc. of POPL 2001, pp. 67–80. ACM Press, New York (2001)

    Google Scholar 

  11. Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. ACM SIGPLAN Notices 35(9), 11–22 (2000)

    Article  MATH  Google Scholar 

  12. Jones, M.P.: Type classes with functional dependencies. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, p. 230. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  13. Kempa, M., Linnemann, V.: Type checking in XOBE. In: Proc. Datenbanksysteme fur Business, Technologie und Web, BTW 2003, LNI, pp. 227–246, GI (2003)

    Google Scholar 

  14. Lu, K.Z.M., Sulzmann, M.: XHaskell (2004), http://www.comp.nus.edu.sg/~luzm/xhaskell

  15. Lu, K.Z.M., Sulzmann, M.: An implementation of subtyping among regular expression types. Technical report, The National University of Singapore (2004), http://www.comp.nus.edu.sg/~luzm/xhaskell/tr-impsubtype.ps

  16. Neubauer, M., Thiemann, P., Gasbichler, M., Sperber, M.: Functional logic overloading. In: Proc. of POPL 2002, pp. 233–244. ACM Press, New York (2002)

    Google Scholar 

  17. Peyton Jones, S., et al.: Report on the programming language Haskell 98 (February 1999), http://haskell.org

  18. Stuckey, P.J., Sulzmann, M.: A theory of overloading. In: Proc. of ICFP 2002, pp. 167–178. ACM Press, New York (2002)

    Google Scholar 

  19. Stuckey, P.J., Sulzmann, M., Wazny, J.: Interactive type debugging in Haskell. In: Proc. of Haskell Workshop 2003, pp. 72–83. ACM Press, New York (2003)

    Google Scholar 

  20. Sulzmann, M., Wazny, J.: The Chameleon system (July 2004), http://www.comp.nus.edu.sg/~sulzmann/chameleon

  21. Thiemann, P.: A typed representation for HTML and XML documents in Haskell. Journal of Functional Programming 12(4,5), 435–468 (2002)

    MathSciNet  MATH  Google Scholar 

  22. Wallace, M., Runciman, C.: Haskell and XML: Generic combinators or type-based translation? In: ICFP 1999, pp. 148–159. ACM Press, New York (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lu, K.Z.M., Sulzmann, M. (2004). An Implementation of Subtyping Among Regular Expression Types. In: Chin, WN. (eds) Programming Languages and Systems. APLAS 2004. Lecture Notes in Computer Science, vol 3302. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30477-7_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30477-7_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23724-2

  • Online ISBN: 978-3-540-30477-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics