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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
Calvert, C.: Linq samples update (2007), http://blogs.msdn.com/charlie/archive/2007/03/04/samples-update.aspx
Chamberlin, D., Carey, M., Florescu, D., Kossman, D., Robie, J.: XQueryP: Programming with XQuery. In: XIME-P (2006)
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)
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)
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)
Kirkegaard, C., Møller, A., Schwartzbach, M.: Static analysis of XML transformations in Java. IEEE Transactions on Software Engineering 30(3), 181–192 (2004)
Lieuwen, D.F., DeWitt, D.J.: Optimizing loops in database programming languages. In: DBPL, pp. 287–305 (1991)
Meijer, E., Beckman, B.: XLinq: XML Programming Refactored (The Return of the Monoids). In: XML 2005 Proceedings (2005)
Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45 (2004)
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)
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)
Reichenbach, C., Burke, M., Peshansky, I., Raghavachari, M., Bordawekar, R.: AXIL: An XPath Intermediate Language. IBM Research Report RC24075 (2006)
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)
Steensgaard, B.: Points-to analysis in almost linear time. In: Proceedings of the 23rd Symposium on Principles of Programming Languages, pp. 32–41 (1996)
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)
World Wide Web Consortium. XML Path Language (XPath) Version 1.0 (1999)
World Wide Web Consortium. Document Object Model Level 2 Core (2000)
Author information
Authors and Affiliations
Editor information
Rights 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)