Path Querying with Conjunctive Grammars by Matrix Multiplication

Problems in many areas can be reduced to one of the formal-languages-constrained path problems. Conjunctive grammars are more expressive than context-free grammars and are used, for example, in static analysis to describe an interleaved matched-parentheses language, which is not context-free. Path querying with conjunctive grammars is known to be undecidable. There is an algorithm for path querying with linear conjunctive grammars which provides an over-approximation of the result, but there is no algorithm for arbitrary conjunctive grammars. We propose the first algorithm for path querying with arbitrary conjunctive grammars. The proposed algorithm is matrix-based and allows us to efficiently apply GPGPU (General-Purpose computing on Graphics Processing Units) computing techniques and other optimizations for matrix operations.

[1]  Dick Grune,et al.  Parsing Techniques (Monographs in Computer Science) , 2006 .

[2]  Manu Sridharan,et al.  Scaling CFL-Reachability-Based Points-To Analysis Using Context-Sensitive Must-Not-Alias Analysis , 2009, ECOOP.

[3]  Thomas W. Reps,et al.  Program analysis via graph reachability , 1997, Inf. Softw. Technol..

[4]  Adrian Johnstone,et al.  GLL Parsing , 2010, LDTA.

[5]  Jianzhong Li,et al.  Adding regular expressions to graph reachability and pattern queries , 2011, ICDE 2011.

[6]  Serge Abiteboul,et al.  Regular path queries with constraints , 1997, PODS '97.

[7]  Petteri Sevon,et al.  Subgraph Queries by Context-free Grammars , 2008, J. Integr. Bioinform..

[8]  Jelle Hellings,et al.  Conjunctive Context-Free Path Queries , 2014, ICDT.

[9]  Daniel H. Younger,et al.  Recognition and Parsing of Context-Free Languages in Time n^3 , 1967, Inf. Control..

[10]  Semyon Grigorev,et al.  Context-free path querying by matrix multiplication , 2017, GRADES/NDA@SIGMOD/PODS.

[11]  Moshe Y. Vardi,et al.  Regular Queries on Graph Databases , 2015, ICDT.

[12]  Jelle Hellings,et al.  Querying for Paths in Graphs using Context-Free Path Queries , 2015 .

[13]  Alexander Okhotin,et al.  Conjunctive and Boolean grammars: The true general case of the context-free grammars , 2013, Comput. Sci. Rev..

[14]  Madhav V. Marathe,et al.  Formal Language Constrained Path Problems , 1998, SWAT.

[15]  Jingling Xue,et al.  Accelerating inclusion-based pointer analysis on heterogeneous CPU-GPU systems , 2013, 20th Annual International Conference on High Performance Computing.

[16]  Semyon Grigorev,et al.  Context-free path querying with structural representation of result , 2016, ArXiv.

[17]  Keshav Pingali,et al.  A GPU implementation of inclusion-based points-to analysis , 2012, PPoPP '12.

[18]  Alexander Aiken,et al.  Specification Inference Using Context-Free Language Reachability , 2015, POPL.

[19]  Xiangke Liao,et al.  An Efficient GPU Implementation of Inclusion-Based Pointer Analysis , 2016, IEEE Transactions on Parallel and Distributed Systems.

[20]  Alexander Okhotin,et al.  Conjunctive Grammars , 2001, J. Autom. Lang. Comb..

[21]  Xin Wang,et al.  Context-Free Path Queries on RDF Graphs , 2015, SEMWEB.

[22]  Carlo Sartiani,et al.  Regular Path Queries on Massive Graphs , 2016, SSDBM.

[23]  Zhendong Su,et al.  Context-sensitive data-dependence analysis via linear conjunctive language reachability , 2017, POPL.

[24]  Tadao Kasami,et al.  An Efficient Recognition and Syntax-Analysis Algorithm for Context-Free Languages , 1965 .