Skip to main content

A Rule-Based Procedure for Graph Query Solving

  • Conference paper
  • First Online:
Graph Transformation (ICGT 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13961))

Included in the following conference series:

  • 248 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://www.gqlstandards.org/.

References

  1. 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)

    Article  MATH  Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. Antoy, S., Echahed, R., Hanus, M.: A needed narrowing strategy. J. ACM 47(4), 776–822 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  5. Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press (1998)

    Google Scholar 

  6. 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

    Chapter  Google Scholar 

  7. 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

    Chapter  MATH  Google Scholar 

  8. Bork, D., Karagiannis, D., Pittl, B.: A survey of modeling language specification techniques. Inf. Syst. 87 (2020)

    Google Scholar 

  9. 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

    Chapter  Google Scholar 

  10. 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

    Chapter  MATH  Google Scholar 

  11. 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

    Chapter  Google Scholar 

  12. 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)

    Google Scholar 

  13. 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

    Chapter  MATH  Google Scholar 

  14. 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)

    Google Scholar 

  15. Date, C.J.: A guide to the SQL standard: a user’s guide to the standard relational language SQL (1987)

    Google Scholar 

  16. de la Tour, T.B., Echahed, R.: Parallel rewriting of attributed graphs. Theor. Comput. Sci. 848, 106–132 (2020)

    Article  MathSciNet  MATH  Google Scholar 

  17. 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)

    Google Scholar 

  18. Duval, D., Echahed, R., Prost, F.: All you need is CONSTRUCT. CoRR, abs/2010.00843 (2020)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Duval, D., Echahed, R., Prost, F. A rule-based operational semantics of graph query languages. CoRR, abs/2202.10142 (2022)

    Google Scholar 

  21. 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

    Chapter  Google Scholar 

  22. Francis, N., et al.: Formal semantics of the language cypher. CoRR, abs/1802.09984 (2018)

    Google Scholar 

  23. Francis, N., et al.: Cypher: An evolving query language for property graphs. In: SIGMOD Conference, pp. 1433–1445. ACM (2018)

    Google Scholar 

  24. Habel, A., Pennemann, K.: Correctness of high-level transformation systems relative to nested conditions. Math. Struct. Comput. Sci. 19(2), 245–296 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  25. 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

    Chapter  Google Scholar 

  26. Hanus, M.: Dynamic predicates in functional logic programs, vol. 2004. EAPLS (2004)

    Google Scholar 

  27. 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)

    Google Scholar 

  28. Kim, W.: On optimizing an SQL-like nested query. ACM Trans. Database Syst. 7(3), 443–469 (1982)

    Article  MATH  Google Scholar 

  29. 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)

    Google Scholar 

  30. Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987). https://doi.org/10.1007/978-3-642-96826-6

    Book  MATH  Google Scholar 

  31. Navarro, M., F. Orejas, E. Pino, and L. Lambers. A navigational logic for reasoning about graph properties. J. Log. Algebraic Methods Program. 118 (2021)

    Google Scholar 

  32. Pérez, J., Arenas, M., Gutiérrez, C.: Semantics and complexity of SPARQL. ACM Trans. Database Syst. 34(3), 16:1–16:45 (2009)

    Google Scholar 

  33. PGQL 1.5 Specification. https://pgql-lang.org/spec/1.5/, August 2022

  34. Rozenberg, G. (ed.) Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations. World Scientific (1997)

    Google Scholar 

  35. Sakr, S., et al.: The future is big graphs: a community view on graph processing systems. Commun. ACM 64(9), 62–71 (2021)

    Article  Google Scholar 

  36. 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

    Article  Google Scholar 

  37. SPARQL 1.1 Query Language. W3C Recommendation, March 2013

    Google Scholar 

  38. RDF 1.1 Concepts and Abstract Syntax. W3C Recommendation, February 2014

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rachid Echahed .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics