75 research outputs found

    Early = Earliest?

    No full text
    Early query answering is the core issue of memory efficient query evaluation on data streams. The idea is to select and reject answer candidates as early as possible on the stream, so that they do not have to be stored in main memory. Since earliest query answering is unfeasible for XPath, as first no- ticed by Benedikt, Jeffrey and Ley-Wild in 2008, most exist- ing streaming algorithms for XPath approximate it in some early manner, while focussing on high time efficiency. Such approximations, however, spoil all theoretical guarantees on memory efficiency. In this paper, we prove that earliest query answering is indeed feasible for positive Forward XPath queries, which have neither unsatisfiable nor valid subqueries. The core in- sight is that a variant of Colmerauer's independence property can be proven for the corresponding fragment of the FXP tree logic. Based on this independence property, we can show that the early query answering algorithm from [13], which is based on a compiler from FXP to early nested word automata, is indeed earliest for all positive FXP0 queries with neither unsatisfiable nor valid subformulas. Further- more, this algorithm outperforms most previous algorithms for XPath evaluation on XML streams in time efficiency and coverage, as shown elsewhere. Available here.</p

    Early Nested Word Automata for XPath Query Answering on XML Streams

    Get PDF
    International audienceolynomial time for disjunctions of k-bounded simpl

    Earliest Query Answering for Deterministic Nested Word Automata

    Get PDF
    International audienceEarliest query answering (EQA) is an objective of many recent streaming algorithms for XML query answering, that aim for close to optimal memory management. In this paper, we show that EQA is infeasible even for a small fragment of Forward XPath except if P=NP. We then present an EQA algorithm for queries and schemas defined by deterministic nested word automata (dNWAs) and distinguish a large class of dNWAs for which streaming query answering is feasible in polynomial space and time

    XQuery Streaming by Forest Transducers

    Full text link
    Streaming of XML transformations is a challenging task and only very few systems support streaming. Research approaches generally define custom fragments of XQuery and XPath that are amenable to streaming, and then design custom algorithms for each fragment. These languages have several shortcomings. Here we take a more principles approach to the problem of streaming XQuery-based transformations. We start with an elegant transducer model for which many static analysis problems are well-understood: the Macro Forest Transducer (MFT). We show that a large fragment of XQuery can be translated into MFTs --- indeed, a fragment of XQuery, that can express important features that are missing from other XQuery stream engines, such as GCX: our fragment of XQuery supports XPath predicates and let-statements. We then rely on a streaming execution engine for MFTs, one which uses a well-founded set of optimizations from functional programming, such as strictness analysis and deforestation. Our prototype achieves time and memory efficiency comparable to the fastest known engine for XQuery streaming, GCX. This is surprising because our engine relies on the OCaml built in garbage collector and does not use any specialized buffer management, while GCX's efficiency is due to clever and explicit buffer management.Comment: Full version of the paper in the Proceedings of the 30th IEEE International Conference on Data Engineering (ICDE 2014

    Bounded Delay and Concurrency for Earliest Query Answering

    Get PDF
    International audienceEarliest query answering is needed for streaming XML processing with optimal memory management. We study the feasibility of earliest query answering for node selection queries. Tractable queries are distinguished by a bounded number of concurrently alive answer candidates at every time point, and a bounded delay for node selection. We show that both properties are decidable in polynomial time for queries defined by deterministic automata for unranked trees. Our results are obtained by reduction to the bounded valuedness problem for recognizable relations between unranked trees

    A Benchmark Collection of Deterministic Automata for XPath Queries

    Get PDF
    International audienceWe provide a benchmark collection of deterministic automatafor regular XPath queries. For this, we select the subcollection offorward navigational XPath queries from a corpus that Lick and Schmitzextracted from real-world XSLT and XQuery programs, compile them tostepwise hedge automata (SHAs), and determinize them. Large blowups by automatadeterminization are avoided by using schema-based determinization. The schemacaptures the \XML data model and the fact thatany answer of a path query must return a single node.Our collection also provides deterministic nested word automatathat we obtain by compilation from deterministic SHAs

    Projection for Nested Word Automata Speeds up XPath Evaluation on XML Streams

    Get PDF
    International audienceWe present an evaluator for navigational XPath on Xmlstreams with projection. The idea is to project away those parts of anXml stream that are irrelevant for evaluating a given XPath query. Thistask is relevant for processing Xml streams in general since all Xmlstandard languages are based on XPath. The best existing streamingalgorithm for navigational XPath queries runs nested word automata.Therefore, we develop a projection algorithm for nested word automata,for the first time to the best of our knowledge. It turns out that projection can speed up the evaluation of navigational XPath queries on Xmlstreams by a factor of 4 in average on the usual XPath benchmarks.The extended version of the document is available in pdf here

    Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams

    Get PDF
    International audienceWe study the problem of certain query answering (CQA) on compressed string patterns. These are incomplete singleton context-free grammars, that can model systems of multiple streams with references to others, called hyperstreams more recently. In order to capture regular path queries on strings, we consider nondeterministic finite automata (NFAs) for query definition. It turns out that CQA for Boolean NFA queries is equivalent to regular string pattern inclusion, i.e., whether all strings completing a compressed string pattern belong to a regular language. We prove that CQA on compressed string patterns is PSpace- complete for NFA queries. The PSpace-hardness even applies to Boolean queries defined by deterministic finite automata (DFAs) and without compression. We also show that CQA on compressed linear string patterns can be solved in PTime for DFA queries. The proofs of the results presented here can be found in the long version of this paper (https://hal.inria.fr/hal-01846016)

    Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams (long version)

    Get PDF
    We study the problem of certain query answering (CQA) on compressed string patterns. These are incomplete singleton context-free grammars, that can model systems of multiple streams with references to others, called hyperstreams more recently. In order to capture regular path queries on strings, we consider nondeterministic finite automata (NFAs) for query definition. It turns out that CQA for Boolean NFA queries is equivalent to regular string pattern inclusion, i.e., whether all strings completing a compressed string pattern belong to a regular language. We prove that CQA on compressed string patterns is PSPACE-complete for NFA queries. The PSPACE-hardness even applies to Boolean queries defined by deterministic finite automata (DFAs) and without compression. We also show that CQA on compressed linear string patterns can be solved in PTIME for DFA queries

    Determinization and Minimization of Automata for Nested Words Revisited

    Get PDF
    International audienceWe consider the problem of determinizing and minimizing automata for nested words in practice. For this we compile the nested regular expressions (NREsNRE_s) from the usual XPath benchmark to nested word automata (NWNWAsA_s). The determinization of these NWNW AsA_s, however, fails to produce reasonably small automata. In the best case, huge deterministic NWNWAsA_s are produced after few hours, even for relatively small NREsNRE_s of the benchmark. We propose a different approach to the determinization of automata for nested words. For this, we introduce stepwise hedge automata (SHAsSHA_s) that generalize naturally on both (stepwise) tree automata and on finite word automata. We then show how to determinize SHAsSHA_s, yielding reasonably small deterministic automata for the NREsNRE_s from the XPath benchmark. The size of deterministic SHAsSHA_s automata can be reduced further by a novel minimization algorithm for a subclass of SHAsSHA_s. In order to understand why the new approach to determinization and minimization works so nicely, we investigate the relationship between NWAsNWA_s and SHAsSHA_s further. Clearly, deterministic SHAsSHA_s can be compiled to deterministic NWAs in linear time, and conversely, NWNWAsA_s can be compiled to nondeterministic SHAsSHA_s in polynomial time. Therefore, we can use SHAsSHA_s as intermediates for determinizing NWAsNWA_s, while avoiding the huge size increase with the usual determinization algorithm for NWAsNWA_s. Notably, the NWAs obtained from the SHAsSHA_s perform bottom-up and left-to-right computations only, but no top-down computations. This NWANWA-behavior can be distinguished syntactically by the (weak) single-entry property, suggesting a close relationship between SHAsSHA_s and single-entry NWAsNWA_s. In particular, it turns out that the usual determinization algorithm for NWAsNWA_s behaves well for single-entry NWAsNWA_s, while it quickly explodes without the single-entry property. Furthermore, it is known that the class of deterministic multi-module single-entry NWAsNWA_s enjoys unique minimization. The subclass of deterministic SHAsSHA_s to which our novel minimization algorithm applies is different though, in that we do not impose multiple modules. As further optimizations for reducing the sizes of the constructed SHAsSHA_s, we propose schema-based cleaning and symbolic representations based on apply-else rules, that can be maintained by determinization. We implemented the optimizations and report the experimental results for the automata constructed for the XPathMark benchmark
    corecore