Constant-Delay Enumeration for Nondeterministic Document Spanners

Authors Antoine Amarilli , Pierre Bourhis , Stefan Mengel , Matthias Niewerth

Thumbnail PDF


  • Filesize: 0.56 MB
  • 19 pages

Document Identifiers

Author Details

Antoine Amarilli
  • LTCI, France
  • Télécom ParisTech, France
  • Université Paris-Saclay, France
Pierre Bourhis
  • CNRS, CRIStAL UMR 9189, France
  • Inria Lille, France
Stefan Mengel
  • CNRS, France
  • CRIL UMR 8188, Lens, France
Matthias Niewerth
  • University of Bayreuth, Germany

Cite AsGet BibTex

Antoine Amarilli, Pierre Bourhis, Stefan Mengel, and Matthias Niewerth. Constant-Delay Enumeration for Nondeterministic Document Spanners. In 22nd International Conference on Database Theory (ICDT 2019). Leibniz International Proceedings in Informatics (LIPIcs), Volume 127, pp. 22:1-22:19, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)


We consider the information extraction framework known as document spanners, and study the problem of efficiently computing the results of the extraction from an input document, where the extraction task is described as a sequential variable-set automaton (VA). We pose this problem in the setting of enumeration algorithms, where we can first run a preprocessing phase and must then produce the results with a small delay between any two consecutive results. Our goal is to have an algorithm which is tractable in combined complexity, i.e., in the sizes of the input document and the VA; while ensuring the best possible data complexity bounds in the input document size, i.e., constant delay in the document size. Several recent works at PODS'18 proposed such algorithms but with linear delay in the document size or with an exponential dependency in size of the (generally nondeterministic) input VA. In particular, Florenzano et al. suggest that our desired runtime guarantees cannot be met for general sequential VAs. We refute this and show that, given a nondeterministic sequential VA and an input document, we can enumerate the mappings of the VA on the document with the following bounds: the preprocessing is linear in the document size and polynomial in the size of the VA, and the delay is independent of the document and polynomial in the size of the VA. The resulting algorithm thus achieves tractability in combined complexity and the best possible data complexity bounds. Moreover, it is rather easy to describe, in particular for the restricted case of so-called extended VAs.

Subject Classification

ACM Subject Classification
  • Information systems → Information extraction
  • Theory of computation → Formal languages and automata theory
  • Theory of computation → Database query processing and optimization (theory)
  • enumeration
  • spanners
  • automata


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. The design and analysis of computer algorithms. Addison-Wesley, 1974. Google Scholar
  2. Antoine Amarilli, Pierre Bourhis, Louis Jachiet, and Stefan Mengel. A circuit-based approach to efficient enumeration. In, 2017. URL:
  3. Antoine Amarilli, Pierre Bourhis, and Stefan Mengel. Enumeration on trees under relabelings. In ICDT, 2018. URL:
  4. Antoine Amarilli, Pierre Bourhis, Stefan Mengel, and Matthias Niewerth. Enumeration on Trees with Tractable Combined Complexity and Efficient Updates. Under review, 2019. URL:
  5. Marcelo Arenas, Francisco Maturana, Cristian Riveros, and Domagoj Vrgoc. A framework for annotating CSV-like data. PVLDB, 9(11), 2016. URL:, URL:
  6. Guillaume Bagan. MSO queries on tree decomposable structures are computable with linear delay. In CSL, 2006. Google Scholar
  7. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. Answering Conjunctive Queries under Updates. In PODS, 2017. URL:
  8. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. Answering FO+MOD Queries Under Updates on Bounded Degree Databases. In ICDT, 2017. URL:
  9. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. Answering UCQs under Updates and in the Presence of Integrity Constraints. In ICDT, 2018. URL:
  10. Ronald Fagin, Benny Kimelfeld, Frederick Reiss, and Stijn Vansummeren. Document Spanners: A Formal Approach to Information Extraction. J. ACM, 62(2), 2015. URL:, URL:
  11. Fernando Florenzano, Cristian Riveros, Martín Ugarte, Stijn Vansummeren, and Domagoj Vrgoc. Constant Delay Algorithms for Regular Document Spanners. In PODS, 2018. URL:
  12. Dominik D. Freydenberger. A Logic for Document Spanners. Unpublished extended version. URL:
  13. Dominik D. Freydenberger. A Logic for Document Spanners. In ICDT, 2017. URL:, URL:
  14. Dominik D. Freydenberger and Mario Holldack. Document Spanners: From Expressive Power to Decision Problems. Theory Comput. Syst., 62(4), 2018. URL:
  15. Dominik D. Freydenberger, Benny Kimelfeld, and Liat Peterfreund. Joining Extractions of Regular Expressions. In PODS, 2018. URL:
  16. François Le Gall. Improved output-sensitive quantum algorithms for Boolean matrix multiplication. In SODA, 2012. URL:
  17. François Le Gall. Powers of tensors and fast matrix multiplication. In ISSAC, 2014. URL:
  18. Étienne Grandjean. Sorting, linear time and the satisfiability problem. Annals of Mathematics and Artificial Intelligence, 16(1), 1996. Google Scholar
  19. Katja Losemann and Wim Martens. MSO queries on trees: Enumerating answers under updates. In CSL-LICS, 2014. URL:
  20. Arnaud Mary and Yann Strozecki. Efficient Enumeration of Solutions Produced by Closure Operations. In STACS, 2016. URL:
  21. Francisco Maturana, Cristian Riveros, and Domagoj Vrgoc. Document Spanners for Extracting Incomplete Information: Expressiveness and Complexity. In PODS, 2018. URL:
  22. Andrea Morciano. Engineering a runtime system for AQL. Master’s thesis, Politecnico di Milano, 2017. URL:
  23. Matthias Niewerth. MSO queries on trees: Enumerating answers under updates using forest algebras. In LICS, 2018. URL:
  24. Matthias Niewerth and Luc Segoufin. Enumeration of MSO Queries on Strings with Constant Delay and Logarithmic Updates. In PODS, 2018. URL:
  25. Ronald C. Read and Robert E. Tarjan. Bounds on backtrack algorithms for listing cycles, paths, and spanning trees. Networks, 5(3), 1975. Google Scholar
  26. IBM Research. SystemT, 2018. URL:
  27. Luc Segoufin. A glimpse on constant delay enumeration (Invited talk). In STACS, 2014. URL:
  28. Shuji Tsukiyama, Mikio Ide, Hiromu Ariyoshi, and I Shirakawa. A New Algorithm for Generating All the Maximal Independent Sets. SIAM J. Comput., 6, September 1977. URL:
  29. L.G. Valiant. The complexity of computing the permanent. Theoretical Computer Science, 8(2), 1979. URL:
  30. Kunihiro Wasa. Enumeration of enumeration algorithms. CoRR, 2016. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail