Skip to main content

Extension of Type-Based Approach to Generation of Stream-Processing Programs by Automatic Insertion of Buffering Primitives

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3901))

Abstract

In our previous paper, we have proposed a framework for automatically translating tree-processing programs into stream-processing programs. However, in writing programs that require buffering of input data, a user has to explicitly use buffering primitives which copy data from input stream to memory or copy constructed trees from memory to an output stream. Such explicit insertion of buffering primitives is often cumbersome and worsens the readability of the program. We overcome the above-mentioned problems by developing an algorithm which, given any simply-typed tree-processing program, automatically inserts buffering primitives. The resulting program is guaranteed to be well-typed under our previous ordered-linear type system, so that the program can be further transformed into an equivalent stream-processing program using our previous framework.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bray, T., Paoli, J., Sperberg-McQueen, C.M., Maler, E.: Extensible markup language (XML) 1.0 (second edition). Technical report, World Wide Web Consortium (October 2000), http://www.w3.org/TR/REC-xml

  2. Fülöp, Z.: On attributed tree transducers. Acta Cybernetica 5, 261–280 (1981)

    MathSciNet  MATH  Google Scholar 

  3. Ganzinger, H., Giegerich, R.: Attribute coupled grammars. In: Proceedings of the ACM SIGPLAN 1984 Symposium on Compiler Construction (1984)

    Google Scholar 

  4. Hosoya, H., Pierce, B.C.: XDuce: A typed XML processing language. ACM Transactions on Internet Technology (TOIT) 3(2), 117–148 (2003)

    Article  Google Scholar 

  5. Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. In: Proceedings of the International Conference on Functional Programming (ICFP), pp. 11–22 (September 2000)

    Google Scholar 

  6. Kodama, K.: Derivation of XML stream processor based on ordered linear type. Master’s thesis, Tokyo Institute of Technology (March 2005)

    Google Scholar 

  7. Kodama, K., Suenaga, K., Kobayashi, N.: Translation of tree-processing programs into stream-processing programs based on ordered linear type. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 41–56. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  8. Nakano, K.: Composing stack-attributed tree transducers. Technical Report METR–2004–01, Department of Mathematical Informatics, University of Tokyo, Japan (2004)

    Google Scholar 

  9. Nakano, K.: An Implementation Scheme for XML Transformation Languages Through Derivation of Stream Processors. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 74–90. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  10. Nakano, K., Nishimura, S.: Deriving event-based document transformers from tree-based specifications. In: van den Brand, M., Parigot, D. (eds.) Electronic Notes in Theoretical Computer Science, vol. 44, Elsevier Science Publishers, Amsterdam (2001)

    Google Scholar 

  11. Nishimura, S., Nakano, K.: XML stream transformer generation through program composition and dependency analysis. Science of Computer Programming 54, 257–290 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  12. Polakow, J.: Ordered linear logic and applications. PhD thesis, Carnegie Mellon University, Available as Technical Report CMU-CS-01-152 (June 2001)

    Google Scholar 

  13. Rehof, J., Mogensen, T.: Tractable constraints in finite semilattices. Science of Computer Programming 35(2), 191–221 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  14. Suenaga, K., Kobayashi, N., Yonezawa, A.: Extension of type-based approach to generation of stream-processing programs by automatic insertion of buffering primitives. Full paper, Available from http://www.yl.is.s.u-tokyo.ac.jp/~kohei/doc/paper/lopstr05-full.pdf

  15. Benzaken, V., Castagna, G., Frisch, A.: CDuce: An XML-centric general-purpose language. In: Proceedings of the ACM International Conference on Functional Programming (2003)

    Google Scholar 

  16. W3C. Document Object Model (DOM) Level 1 Specification (October 1998)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Suenaga, K., Kobayashi, N., Yonezawa, A. (2006). Extension of Type-Based Approach to Generation of Stream-Processing Programs by Automatic Insertion of Buffering Primitives. In: Hill, P.M. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2005. Lecture Notes in Computer Science, vol 3901. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11680093_7

Download citation

  • DOI: https://doi.org/10.1007/11680093_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-32654-0

  • Online ISBN: 978-3-540-32656-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics