The Complexity of Regular Expressions and Property Paths in SPARQL

被引:33
|
作者
Losemann, Katja [1 ]
Martens, Wim [1 ]
机构
[1] Univ Bayreuth, Inst Informat, D-93440 Bayreuth, Germany
来源
ACM TRANSACTIONS ON DATABASE SYSTEMS | 2013年 / 38卷 / 04期
关键词
Theory; Graph databases; query evaluation; regular expressions; GRAPHS;
D O I
10.1145/2494529
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
The World Wide Web Consortium (W3C) recently introduced property paths in SPARQL 1.1, a query language for RDF data. Property paths allow SPARQL queries to evaluate regular expressions over graph-structured data. However, they differ from standard regular expressions in several notable aspects. For example, they have a limited form of negation, they have numerical occurrence indicators as syntactic sugar, and their semantics on graphs is defined in a nonstandard manner. We formalize the W3C semantics of property paths and investigate various query evaluation problems on graphs. More specifically, let x and y be two nodes in an edge-labeled graph and r be an expression. We study the complexities of: (1) deciding whether there exists a path from x to y that matches r and (2) counting how many paths from x to y match r. Our main results show that, compared to an alternative semantics of regular expressions on graphs, the complexity of (1) and (2) under W3C semantics is significantly higher. Whereas the alternative semantics remains in polynomial time for large fragments of expressions, the W3C semantics makes problems (1) and (2) intractable almost immediately. As a side-result, we prove that the membership problem for regular expressions with numerical occurrence indicators and negation is in polynomial time.
引用
收藏
页数:39
相关论文
共 50 条
  • [31] Regular Transducer Expressions for Regular Transformations
    Dave, Vrunda
    Gastin, Paul
    Krishna, Shankara Narayanan
    LICS'18: PROCEEDINGS OF THE 33RD ANNUAL ACM/IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, 2018, : 315 - 324
  • [32] Regular transducer expressions for regular transformations
    Dave, Vrunda
    Gastin, Paul
    Krishna, Shankara Narayanan
    INFORMATION AND COMPUTATION, 2022, 282
  • [33] Extending SPARQL with regular expression patterns (for querying RDF)
    Alkhateeb, Faisal
    Baget, Jean-Francois
    Euzenat, Jerome
    JOURNAL OF WEB SEMANTICS, 2009, 7 (02): : 57 - 73
  • [34] Synchronized regular expressions
    Della Penna, G
    Intrigila, B
    Tronci, E
    Zilli, MV
    ACTA INFORMATICA, 2003, 39 (01) : 31 - 70
  • [35] Regular Expressions on the Web
    Hodovan, Renata
    Herczeg, Zoltan
    Kiss, Akos
    12TH IEEE INTERNATIONAL SYMPOSIUM ON WEB SYSTEMS EVOLUTION (WSE 2010), 2010, : 29 - 32
  • [36] Forkable Regular Expressions
    Sulzmann, Martin
    Thiemann, Peter
    LANGUAGE AND AUTOMATA THEORY AND APPLICATIONS, LATA 2016, 2016, 9618 : 194 - 206
  • [37] A Play on Regular Expressions
    Fischer, Sebastian
    Huch, Frank
    Wilke, Thomas
    ICFP 2010: PROCEEDINGS OF THE 2010 ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2010, : 357 - 368
  • [38] Timed regular expressions
    Asarin, E
    Caspi, P
    Maler, O
    JOURNAL OF THE ACM, 2002, 49 (02) : 172 - 206
  • [39] DERIVATIVES OF REGULAR EXPRESSIONS
    BRZOZOWSKI, JA
    JOURNAL OF THE ACM, 1964, 11 (04) : 481 - &
  • [40] Regular expressions of conditions
    Popa, Emil Marin
    WSEAS Transactions on Information Science and Applications, 2007, 4 (01): : 226 - 229