Abstract
Context-free path queries (CFPQ) extend the regular path queries (RPQ) by allowing context-free grammars to be used as constraints for paths. Algorithms for CFPQ are actively developed, but J. Kuijpers et al. have recently concluded, that existing algorithms are not performant enough to be used in real-world applications. Thus the development of new algorithms for CFPQ is justified. In this paper, we provide a new CFPQ algorithm which is based on such linear algebra operations as Kronecker product and transitive closure and handles grammars presented as recursive state machines. Thus, the proposed algorithm can be implemented by using high-performance libraries and modern parallel hardware. Moreover, it avoids grammar growth which provides the possibility for queries optimization.
The research was supported by the Russian Science Foundation, grant â„–18-11-00100.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
SuteSparse is a sparse matrix software which incudes GraphBLAS API implementation. Project web page: http://faculty.cse.tamu.edu/davis/suitesparse.html. Access date: 12.03.2020.
References
Alur, R., Etessami, K., Yannakakis, M.: Analysis of recursive state machines. In: Berry, G., Comon, H., Finkel, A. (eds.) CAV 2001. LNCS, vol. 2102, pp. 207–220. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-44585-4_18
Azimov, R., Grigorev, S.: Context-free path querying by matrix multiplication. In: Proceedings of the 1st ACM SIGMOD Joint International Workshop on Graph Data Management Experiences & Systems (GRADES) and Network Data Analytics (NDA), GRADES-NDA 2018, pp. 5:1–5:10. ACM, New York (2018). http://doi.acm.org/10.1145/3210259.3210264
Barrett, C., Jacob, R., Marathe, M.: Formal-language-constrained path problems. SIAM J. Comput. 30(3), 809–837 (2000). https://doi.org/10.1137/S0097539798337716
Davis, T.A.: Algorithm 9xx: SuiteSparse: GraphBLAS: graph algorithms in the language of sparse linear algebra (2018)
Hellings, J.: Querying for paths in graphs using context-free path queries. arXiv preprint arXiv:1502.02242 (2015)
Hemerik, K.: Towards a taxonomy for ECFG and RRPG parsing. In: Dediu, A.H., Ionescu, A.M., MartĂn-Vide, C. (eds.) LATA 2009. LNCS, vol. 5457, pp. 410–421. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00982-2_35
Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 3rd edn. Addison-Wesley Longman Publishing Co., Inc., Boston (2006)
Kepner, J., et al.: Mathematical foundations of the GraphBLAS. In: 2016 IEEE High Performance Extreme Computing Conference (HPEC), pp. 1–9, September 2016. https://doi.org/10.1109/HPEC.2016.7761646
Kuijpers, J., Fletcher, G., Yakovets, N., Lindaaker, T.: An experimental study of context-free path query evaluation methods. In: Proceedings of the 31st International Conference on Scientific and Statistical Database Management, SSDBM 2019, pp. 121–132. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3335783.3335791
Medeiros, C.M., Musicante, M.A., Costa, U.S.: Efficient evaluation of context-free path queries for graph databases. In: Proceedings of the 33rd Annual ACM Symposium on Applied Computing, SAC 2018, pp. 1230–1237. ACM, New York (2018). https://doi.org/10.1145/3167132.3167265. http://doi.acm.org/10.1145/3167132.3167265
Mishin, N., et al.: Evaluation of the context-free path querying algorithm based on matrix multiplication. In: Proceedings of the 2nd Joint International Workshop on Graph Data Management Experiences & Systems (GRADES) and Network Data Analytics (NDA), GRADES-NDA 2019. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3327964.3328503
Sevon, P., Eronen, L.: Subgraph queries by context-free grammars. J. Integr. Bioinform. 5(2), 100 (2008)
Yannakakis, M.: Graph-theoretic methods in database theory. In: Proceedings of the Ninth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, PODS 1990, pp. 230–242. ACM, New York (1990). http://doi.acm.org/10.1145/298514.298576
Zhang, X., Feng, Z., Wang, X., Rao, G., Wu, W.: Context-free path queries on RDF graphs. In: Groth, P., et al. (eds.) ISWC 2016. LNCS, vol. 9981, pp. 632–648. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46523-4_38
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Orachev, E., Epelbaum, I., Azimov, R., Grigorev, S. (2020). Context-Free Path Querying by Kronecker Product. In: Darmont, J., Novikov, B., Wrembel, R. (eds) Advances in Databases and Information Systems. ADBIS 2020. Lecture Notes in Computer Science(), vol 12245. Springer, Cham. https://doi.org/10.1007/978-3-030-54832-2_6
Download citation
DOI: https://doi.org/10.1007/978-3-030-54832-2_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-54831-5
Online ISBN: 978-3-030-54832-2
eBook Packages: Computer ScienceComputer Science (R0)