Abstract
We consider a core language for graph queries. These queries, which may transform graphs to graphs, are seen as formulas to be solved with respect to graph databases. For this purpose, we first define a graph query algebra where some operations over graphs and sets of graph homomorphisms are specified. Then, the notion of pattern is introduced to represent a kind of recursively defined formula over graphs. The syntax and formal semantics of patterns are provided. Afterwards, we propose a new sound and complete procedure to solve patterns. This procedure, which is based on a set of rewriting rules, is terminating and develops only one needed derivation per pattern to be solved. Our procedure is generic in the sense that it can be adapted to different kinds of graph queries provided that the notions of graph and graph homomorphism are well defined.
This work has been partly funded by the project VERIGRAPH : ANR-21-CE48-0015.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
References
Almendros-Jiménez, J.M., Becerra-Terón, A.: A safe relational calculus for functional logic deductive databases. Electron. Notes Theor. Comput. Sci. 86(3), 168–204 (2003)
Angles, R., et al.: G-CORE: A core for future graph query languages. In: Das, G., Jermaine, C.M., Bernstein, P.A. (eds.), Proceedings of the 2018 International Conference on Management of Data, SIGMOD Conference 2018, Houston, TX, USA, June 10–15, 2018, pp. 1421–1432. ACM (2018)
Angles, R., Arenas, M., Barceló, P., Hogan, A., Reutter, J.L., Vrgoc, D.: Foundations of modern query languages for graph databases. ACM Comput. Surv. 50(5), 68:1–68:40 (2017)
Antoy, S., Echahed, R., Hanus, M.: A needed narrowing strategy. J. ACM 47(4), 776–822 (2000)
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press (1998)
Balbiani, P., Echahed, R., Herzig, A.: A dynamic logic for termgraph rewriting. In: Ehrig, H., Rensink, A., Rozenberg, G., Schürr, A. (eds.) ICGT 2010. LNCS, vol. 6372, pp. 59–74. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15928-2_5
Beyhl, T., Blouin, D., Giese, H., Lambers, L.: On the operationalization of graph queries with generalized discrimination networks. In: Echahed, R., Minas, M. (eds.) ICGT 2016. LNCS, vol. 9761, pp. 170–186. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-40530-8_11
Bork, D., Karagiannis, D., Pittl, B.: A survey of modeling language specification techniques. Inf. Syst. 87 (2020)
Braßel, B., Hanus, M., Müller, M.: High-level database programming in curry. In: Hudak, P., Warren, D.S. (eds.) PADL 2008. LNCS, vol. 4902, pp. 316–332. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-77442-6_21
Brenas, J.H., Echahed, R., Strecker, M.: Verifying graph transformation systems with description logics. In: Lambers, L., Weber, J. (eds.) ICGT 2018. LNCS, vol. 10887, pp. 155–170. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-92991-0_10
Brenas, J.H., Echahed, R., Strecker, M.: Reasoning formally about database queries and updates. In: ter Beek, M.H., McIver, A., Oliveira, J.N. (eds.) FM 2019. LNCS, vol. 11800, pp. 556–572. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30942-8_33
Chamberlin, D.D., Boyce, R.F.: SEQUEL: a structured English query language. In: Rustin, R. (ed.) FIDET 1974: Data models: data-structure-set versus relational: Workshop on Data Description, Access, and Control, May 1–3, 1974, pp. 249–264. Michigan, Ann Arbor (1974)
Corradini, A., Duval, D., Echahed, R., Prost, F., Ribeiro, L.: AGREE – algebraic graph rewriting with controlled embedding. In: Parisi-Presicce, F., Westfechtel, B. (eds.) ICGT 2015. LNCS, vol. 9151, pp. 35–51. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21145-9_3
Corradini, A., Montanari, U., Rossi, F., Ehrig, H., Heckel, R., Löwe, M.: Algebraic approaches to graph transformation - part I: basic concepts and double pushout approach. In: Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations, pp. 163–246 (1997)
Date, C.J.: A guide to the SQL standard: a user’s guide to the standard relational language SQL (1987)
de la Tour, T.B., Echahed, R.: Parallel rewriting of attributed graphs. Theor. Comput. Sci. 848, 106–132 (2020)
Duval, D., Echahed, R., Prost, F.: An algebraic graph transformation approach for RDF and SPARQL. In: Hoffmann, B., Minas, M. (eds.) Proceedings of the Eleventh International Workshop on Graph Computation Models, Online-Workshop, 24th June 2020, vol. 330. EPTCS, pp. 55–70 (2020)
Duval, D., Echahed, R., Prost, F.: All you need is CONSTRUCT. CoRR, abs/2010.00843 (2020)
Duval, D., Echahed, R., Prost, F.: Querying RDF databases with sub-constructs. In: Kutsia, T. (ed.), Proceedings of the 9th International Symposium on Symbolic Computation in Software Science, SCSS 2021, Hagenberg, Austria, September 8–10, 2021, vol. 342, EPTCS, pp. 49–64 (2021)
Duval, D., Echahed, R., Prost, F. A rule-based operational semantics of graph query languages. CoRR, abs/2202.10142 (2022)
Ehrig, H., Ehrig, K., Habel, A., Pennemann, K.-H.: Constraints and application conditions: from graphs to high-level structures. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 287–303. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30203-2_21
Francis, N., et al.: Formal semantics of the language cypher. CoRR, abs/1802.09984 (2018)
Francis, N., et al.: Cypher: An evolving query language for property graphs. In: SIGMOD Conference, pp. 1433–1445. ACM (2018)
Habel, A., Pennemann, K.: Correctness of high-level transformation systems relative to nested conditions. Math. Struct. Comput. Sci. 19(2), 245–296 (2009)
Habel, A., Plump, D.: Complete strategies for term graph narrowing. In: Fiadeiro, J.L. (ed.) WADT 1998. LNCS, vol. 1589, pp. 152–167. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48483-3_11
Hanus, M.: Dynamic predicates in functional logic programs, vol. 2004. EAPLS (2004)
Huang, S.S., Green, T.J., Loo, B.T.: Datalog and emerging applications: an interactive tutorial. In: Sellis, T.K., Miller, R.J., Kementsietsidis, A., Velegrakis, Y. (eds.) Proceedings of the ACM SIGMOD International Conference on Management of Data, SIGMOD 2011, Athens, Greece, June 12–16, 2011, pp. 1213–1216. ACM (2011)
Kim, W.: On optimizing an SQL-like nested query. ACM Trans. Database Syst. 7(3), 443–469 (1982)
Lambers, L., Schneider, S., Weisgut, M.: Model-based testing of read only graph queries. In: 13th IEEE International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2020, Porto, Portugal, October 24–28, 2020, pp. 24–34. IEEE (2020)
Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987). https://doi.org/10.1007/978-3-642-96826-6
Navarro, M., F. Orejas, E. Pino, and L. Lambers. A navigational logic for reasoning about graph properties. J. Log. Algebraic Methods Program. 118 (2021)
Pérez, J., Arenas, M., Gutiérrez, C.: Semantics and complexity of SPARQL. ACM Trans. Database Syst. 34(3), 16:1–16:45 (2009)
PGQL 1.5 Specification. https://pgql-lang.org/spec/1.5/, August 2022
Rozenberg, G. (ed.) Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations. World Scientific (1997)
Sakr, S., et al.: The future is big graphs: a community view on graph processing systems. Commun. ACM 64(9), 62–71 (2021)
Schneider, S., Lambers, L., Orejas, F.: Automated reasoning for attributed graph properties. Int. J. Softw. Tools Technol. Transfer 20(6), 705–737 (2018). https://doi.org/10.1007/s10009-018-0496-3
SPARQL 1.1 Query Language. W3C Recommendation, March 2013
RDF 1.1 Concepts and Abstract Syntax. W3C Recommendation, February 2014
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Duval, D., Echahed, R., Prost, F. (2023). A Rule-Based Procedure for Graph Query Solving. In: Fernández, M., Poskitt, C.M. (eds) Graph Transformation. ICGT 2023. Lecture Notes in Computer Science, vol 13961. Springer, Cham. https://doi.org/10.1007/978-3-031-36709-0_9
Download citation
DOI: https://doi.org/10.1007/978-3-031-36709-0_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-36708-3
Online ISBN: 978-3-031-36709-0
eBook Packages: Computer ScienceComputer Science (R0)