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 条
  • [41] INTERSECTION OF -ω-REGULAR EXPRESSIONS
    Chebotarev, A. N.
    CYBERNETICS AND SYSTEMS ANALYSIS, 2021, 57 (05) : 676 - 684
  • [42] Refactoring With Regular Expressions
    Spinellis, Diomidis
    IEEE SOFTWARE, 2024, 41 (06) : 29 - 33
  • [43] Explanations for Regular Expressions
    Erwig, Martin
    Gopinath, Rahul
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, FASE 2012, 2012, 7212 : 394 - 408
  • [44] Hybrid regular expressions
    Li, XD
    Zheng, T
    Hou, JM
    Zhao, JH
    Zheng, GL
    HYBRID SYSTEMS: COMPUTATION AND CONTROL, 1998, 1386 : 384 - 399
  • [45] Implication of regular expressions
    Thomo, Alex
    APPLIED MATHEMATICS LETTERS, 2012, 25 (10) : 1394 - 1398
  • [46] Synchronized regular expressions
    Giuseppe Della Penna
    Benedetto Intrigila
    Enrico Tronci
    Marisa Venturini Zilli
    Acta Informatica, 2003, 39 : 31 - 70
  • [47] Memoized Regular Expressions
    Van der Merwe, Brink
    Mouton, Jacobie
    Van Litsenborgh, Steyn
    Berglund, Martin
    IMPLEMENTATION AND APPLICATION OF AUTOMATA (CIAA 2021), 2021, 12803 : 39 - 52
  • [48] Intersection of -ω-Regular Expressions
    A. N. Chebotarev
    Cybernetics and Systems Analysis, 2021, 57 : 676 - 684
  • [49] On a generalization of regular expressions
    Gomozov, AL
    Stanevichene, LI
    PROGRAMMING AND COMPUTER SOFTWARE, 2000, 26 (05) : 258 - 267
  • [50] On Extended Regular Expressions
    Carle, Benjamin
    Narendran, Paliath
    LANGUAGE AND AUTOMATA THEORY AND APPLICATIONS, 2009, 5457 : 279 - 289