XPath Typing Using a Modal Logic with Converse for Finite Trees

We present an algorithm to solve XPath decision problems under regular tree type constraints and show its use to statically typecheck XPath queries. To this end, we prove the decidability of a logic with converse for finite ordered trees whose time complexity is a simple exponential of the size of a formula. The logic corresponds to the alternation free modal µ-calculus without greatest fixpoint restricted to finite trees where formulas are cycle-free. Our proof method is based on two auxiliary results. First, XML regular tree types and XPath expressions have a linear translation to cycle-free formulas. Second, the least and greatest fixpoints are equivalent for finite trees, hence the logic is closed under negation. With these proofs, we describe a practically effective system for solving the satisfiability of a formula. The system has been experimented with some decision problems such as XPath emptiness, containment, overlap, and coverage, with or without type constraints. The benefit of the approach is that our system can be effectively used in static analyzers for programming languages manipulating both XPath expressions and XML type annotations (as input and output types).

[1]  Floris Geerts,et al.  XPath satisfiability in the presence of DTDs , 2008, JACM.

[2]  Maarten Marx,et al.  XPath with Conditional Axis Relations , 2004, EDBT.

[3]  Steven J. DeRose,et al.  XML Path Language (XPath) Version 1.0 , 1999 .

[4]  Richard E. Ladner,et al.  Propositional Dynamic Logic of Regular Programs , 1979, J. Comput. Syst. Sci..

[5]  Benjamin C. Pierce,et al.  Paths Into Patterns , 2004 .

[6]  Maarten Marx,et al.  Conditional XPath, the first order complete XPath dialect , 2004, PODS.

[7]  Thomas Schwentick,et al.  XPath query containment , 2004, SGMD.

[8]  Pierre Genevès,et al.  A Decision Procedure for XPath Containment , 2006 .

[9]  Paul J. Walmsley,et al.  XML Schema Part 0: Primer Second Edition , 2004 .

[10]  Orna Kupferman,et al.  The Weakness of Self-Complementation , 1999, STACS.

[11]  Gérard P. Huet,et al.  The Zipper , 1997, Journal of Functional Programming.

[12]  Thomas Wilke,et al.  Automata logics, and infinite games: a guide to current research , 2002 .

[13]  James W. Thatcher,et al.  Generalized finite automata theory with an application to a decision problem of second-order logic , 1968, Mathematical systems theory.

[14]  Benjamin C. Pierce,et al.  XDuce: A statically typed XML processing language , 2003, TOIT.

[15]  Dan Suciu,et al.  Containment and equivalence for a fragment of XPath , 2004, JACM.

[16]  Maarten Marx,et al.  Conditional XPath , 2005, TODS.

[17]  Peter Lammich,et al.  Tree Automata , 2009, Arch. Formal Proofs.

[18]  Giuseppe Castagna,et al.  CDuce: an XML-centric general-purpose language , 2003, ICFP '03.

[19]  Wenfei Fan,et al.  Secure XML querying with security views , 2004, SIGMOD '04.

[20]  Benjamin C. Pierce,et al.  Type-Based Optimization for Regular Patterns , 2005, DBPL.

[21]  Jean-Yves Vion-Dury,et al.  Logic-based XPath optimization , 2004, DocEng '04.

[22]  Moshe Y. Vardi Reasoning about The Past with Two-Way Automata , 1998, ICALP.

[23]  Ulrike Sattler,et al.  BDD-based decision procedures for the modal logic K ★ , 2006, J. Appl. Non Class. Logics.

[24]  Michael I. Schwartzbach,et al.  Static validation of XSL transformations , 2005, TOPL.

[25]  Benjamin C. Pierce,et al.  Regular Object Types , 2003, ECOOP.

[26]  Pablo Barceló,et al.  Temporal logics over unranked trees , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[27]  Anders Møller,et al.  The Design Space of Type Checkers for XML Transformation Languages , 2004, ICDT.

[28]  M. de Rijke,et al.  PDL for ordered trees , 2005, J. Appl. Non Class. Logics.

[29]  Dexter Kozen,et al.  Results on the Propositional µ-Calculus , 1982, ICALP.

[30]  Benjamin C. Pierce,et al.  Regular expression types for XML , 2000, TOPL.

[31]  John Doner,et al.  Tree Acceptors and Some of Their Applications , 1970, J. Comput. Syst. Sci..

[32]  Murali Mani,et al.  Taxonomy of XML schema languages using formal language theory , 2005, TOIT.

[33]  Silvano Dal-Zilio,et al.  A logic you can count on , 2004, POPL.

[34]  Edmund M. Clarke,et al.  Design and Synthesis of Synchronization Skeletons Using Branching Time Temporal Logic , 2008, 25 Years of Model Checking.

[35]  Randal E. Bryant,et al.  Graph-Based Algorithms for Boolean Function Manipulation , 1986, IEEE Transactions on Computers.

[36]  Michael Benedikt,et al.  XPath satisfiability in the presence of DTDs , 2008, JACM.

[37]  E BryantRandal Graph-Based Algorithms for Boolean Function Manipulation , 1986 .

[38]  Thomas Schwentick,et al.  XPath Containment in the Presence of Disjunction, DTDs, and Variables , 2003, ICDT.

[39]  Edmund M. Clarke,et al.  Model Checking , 1999, Handbook of Automated Reasoning.

[40]  Masami Hagiya,et al.  A Decision Procedure for the Alternation-Free Two-Way Modal µ-Calculus , 2005, TABLEAUX.

[41]  Pierre Genevès,et al.  A system for the static analysis of XPath , 2006, TOIS.