...
首页> 外文期刊>ACM transactions on database systems >The Complexity of Regular Expressions and Property Paths in SPARQL
【24h】

The Complexity of Regular Expressions and Property Paths in SPARQL

机译:SPARQL中正则表达式和属性路径的复杂性

获取原文
获取原文并翻译 | 示例
           

摘要

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.
机译:万维网联盟(W3C)最近在SPARQL 1.1(一种RDF数据查询语言)中引入了属性路径。通过属性路径,SPARQL查询可以评估图结构数据上的正则表达式。但是,它们在几个显着方面与标准正则表达式不同。例如,它们具有有限的否定形式,具有作为语法糖的数字出现指示符,并且它们在图上的语义是以非标准的方式定义的。我们将属性路径的W3C语义形式化,并研究图上的各种查询评估问题。更具体地说,令x和y为边缘标记图中的两个节点,r为表达式。我们研究了以下复杂性:(1)确定是否存在从x到y的与r匹配的路径;(2)计算从x到y的与r匹配的路径数量。我们的主要结果表明,与图上正则表达式的替代语义相比,W3C语义下的(1)和(2)的复杂性明显更高。对于较大的表达式片段,替代语义保留在多项式时间内,而W3C语义使问题(1)和(2)几乎立即变得棘手。作为附带结果,我们证明了带有数字出现指示符和求反的正则表达式的隶属度问题处于多项式时间内。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号