Skip to main content

Analysis of Imperative XML Programs

  • Conference paper
Book cover Database Programming Languages (DBPL 2007)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 4797))

Included in the following conference series:

  • 387 Accesses

Abstract

The widespread adoption of XML has led to programming languages that support XML as a first class construct. In this paper, we present a method for analyzing and optimizing imperative XML processing programs. In particular, we present a program analysis, based on a flow-sensitive type system, for detecting both redundant computations and redundant traversals in XML processing programs. The analysis handles declarative queries over XML data and imperative loops that traverse XML values explicitly in a uniform framework. We describe two optimizations that take advantage of our analysis: one merges queries that traverse the same set of XML nodes, and the other replaces an XPath expression by a previously computed result. We show the effectiveness of our method by providing performance measurements on XMark benchmark queries and XLinq sample queries.

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. Alpern, B., Wegman, M.N., Zadeck, F.K.: Detecting equality of variables in programs. In: Proceedings of the 15th Symposium on Principles of Programming Languages, pp. 1–11 (January 1988)

    Google Scholar 

  2. Calvert, C.: Linq samples update (2007), http://blogs.msdn.com/charlie/archive/2007/03/04/samples-update.aspx

  3. Chamberlin, D., Carey, M., Florescu, D., Kossman, D., Robie, J.: XQueryP: Programming with XQuery. In: XIME-P (2006)

    Google Scholar 

  4. Genevès, P., Layaida, N., Schmitt, A.: Efficient static analysis of XML paths and types. In: Conference on Programming Language Design and Implementation (June 2007)

    Google Scholar 

  5. Harren, M., Raghavachari, M., Shmueli, O., Burke, M., Bordawekar, R., Pechtchanski, I., Sarkar, V.: XJ: Facilitating XML processing in Java. In: Proceedings of World Wide Web (WWW), pp. 278–287 (May 2005)

    Google Scholar 

  6. Kildall, G.A.: A unified approach to global program optimization. In: Proceedings of the 1st Symposium on Principles of Programming Languages, pp. 194–206 (1973)

    Google Scholar 

  7. Kirkegaard, C., Møller, A., Schwartzbach, M.: Static analysis of XML transformations in Java. IEEE Transactions on Software Engineering 30(3), 181–192 (2004)

    Article  Google Scholar 

  8. Lieuwen, D.F., DeWitt, D.J.: Optimizing loops in database programming languages. In: DBPL, pp. 287–305 (1991)

    Google Scholar 

  9. Meijer, E., Beckman, B.: XLinq: XML Programming Refactored (The Return of the Monoids). In: XML 2005 Proceedings (2005)

    Google Scholar 

  10. Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45 (2004)

    Article  MathSciNet  Google Scholar 

  11. Moon, S.-M., Ebcioǧlu, K.: Parallelizing nonnumerical code with selective scheduling and software pipelining. ACM Transactions on Programming Languages and Systems 19(6), 853–898 (1997)

    Article  Google Scholar 

  12. Raghavachari, M., Shmueli, O.: Conflicting XML updates. In: Ioannidis, Y., Scholl, M.H., Schmidt, J.W., Matthes, F., Hatzopoulos, M., Boehm, K., Kemper, A., Grust, T., Boehm, C. (eds.) EDBT 2006. LNCS, vol. 3896, Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  13. Reichenbach, C., Burke, M., Peshansky, I., Raghavachari, M., Bordawekar, R.: AXIL: An XPath Intermediate Language. IBM Research Report RC24075 (2006)

    Google Scholar 

  14. Schmidt, A., Waas, F., Kersten, M., Carey, M., Manolescu, I., Busse, R.: Xmark: A benchmark for XML data management. In: Bressan, S., Chaudhri, A.B., Lee, M.L., Yu, J.X., Lacroix, Z. (eds.) CAiSE 2002 and VLDB 2002. LNCS, vol. 2590, pp. 974–985. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  15. Steensgaard, B.: Points-to analysis in almost linear time. In: Proceedings of the 23rd Symposium on Principles of Programming Languages, pp. 32–41 (1996)

    Google Scholar 

  16. Wiedermann, B.A., Cook, W.R.: Extracting queries by static analysis of transparent persistence. In: Proceedings of the 34th Symposium on Principles of Programming Languages (January 2007)

    Google Scholar 

  17. World Wide Web Consortium. XML Path Language (XPath) Version 1.0 (1999)

    Google Scholar 

  18. World Wide Web Consortium. Document Object Model Level 2 Core (2000)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Marcelo Arenas Michael I. Schwartzbach

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Burke, M.G., Peshansky, I., Raghavachari, M., Reichenbach, C. (2007). Analysis of Imperative XML Programs. In: Arenas, M., Schwartzbach, M.I. (eds) Database Programming Languages. DBPL 2007. Lecture Notes in Computer Science, vol 4797. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-75987-4_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-75987-4_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-75986-7

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics