Skip to main content

Explaining Results of Path Queries on Graphs

Single-Path Results for Context-Free Path Queries

  • Conference paper
  • First Online:
Software Foundations for Data Interoperability and Large Scale Graph Data Analytics (SFDI 2020, LSGDA 2020)

Abstract

Many graph query languages use, at their core, path queries that yield node pairs that are connected by a path of interest. For the end-user, such node pairs only give limited insight as to why this query result is obtained, as the pair does not directly identify the underlying path of interest. To address this limitation of path queries, we propose the single-path semantics, which evaluates path queries to, for each node pair (mn), a single path from m to n satisfying the conditions of the query. To put our proposal in practice, we provide an efficient algorithm for evaluating context-free path queries, a particular powerful type of path queries, using the single-path semantics. Additionally, we perform a short evaluation of our techniques that shows that the single-path semantics is practically feasible, even when query results grow large.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

References

  1. Alon, U.: An Introduction to Systems Biology: Design Principles of Biological Circuits. Chapman and Hall/CRC, Boca Raton (2006)

    MATH  Google Scholar 

  2. Angles, R., Arenas, M., Barceló, P., Hogan, A., Reutter, J., Vrgoč, D.: Foundations of modern query languages for graph databases. ACM Comput. Surv. 50(5), 68:1–68:40 (2017)

    Article  Google Scholar 

  3. Arenas, M., Conca, S., Pérez, J.: Counting beyond a yottabyte, or how SPARQL 1.1 property paths will prevent adoption of the standard. In: Proceedings of the 21st International Conference on World Wide Web, pp. 629–638. ACM (2012)

    Google Scholar 

  4. Bar-Hillel, Y., Perles, M.A., Shamir, E.: On formal properties of simple phrase structure grammars. Zeitschrift für Phonetik, Sprachwissenschaft und Kommunikationsforschung 14, 143–172 (1961)

    MathSciNet  MATH  Google Scholar 

  5. Barceló, P.: Querying graph databases. In: Proceedings of the 32nd Symposium on Principles of Database Systems, pp. 175–188. ACM (2013)

    Google Scholar 

  6. Barceló, P., Libkin, L., Lin, A.W., Wood, P.T.: Expressive languages for path queries over graph-structured data. ACM Trans. Database Syst. 37(4), 31:1–31:46 (2012)

    Article  Google Scholar 

  7. Barrett, C., Jacob, R., Marathe, M.: Formal-language-constrained path problems. SIAM J. Comput. 30(3), 809–837 (2000)

    Article  MathSciNet  Google Scholar 

  8. Berglund, A., et al.: XML path language (XPath) 2.0 (2nd edn). Technical report, W3C (2010). http://www.w3.org/TR/2010/REC-xpath20-20101214/

  9. Bray, T., Paoli, J., Sperberg-McQueen, C.M., Maler, E., Yergeau, F., Cowan, J.: Extensible markup language (XML) 1.1 (2nd edn). Technical report, W3C (2006). http://www.w3.org/TR/2006/REC-xml11-20060816

  10. Cheney, J., Chiticariu, L., Tan, W.C.: Provenance in databases: why, how, and where. Found. Trends Databases 1(4), 379–474 (2009)

    Article  Google Scholar 

  11. Clark, J., DeRose, S.: XML path language (XPath) version 1.0. Technical report, W3C (1999). http://www.w3.org/TR/1999/REC-xpath-19991116/

  12. Clarke, E.M., Grumberg, O., Peled, D.: Model Checking. The MIT Press, Cambridge (1999)

    MATH  Google Scholar 

  13. Dömösi, P.: Unusual algorithms for lexicographical enumeration. Acta Cybern. 14(3), 461–468 (2000)

    MathSciNet  MATH  Google Scholar 

  14. Dong, Y.: Linear algorithm for lexicographic enumeration of CFG parse trees. Sci. China Ser. F: Inf. Sci. 52(7), 1177–1202 (2009). https://doi.org/10.1007/s11432-009-0132-7

    Article  MathSciNet  MATH  Google Scholar 

  15. Florêncio, C.C., Daenen, J., Ramon, J., den Bussche, J.V., Dyck, D.V.: Naive infinite enumeration of context-free languages in incremental polynomial time. J. Univ. Comput. Sci. 21(7), 891–911 (2015)

    MathSciNet  Google Scholar 

  16. Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)

    Article  MathSciNet  Google Scholar 

  17. Grune, D., Jacobs, C.J.: Parsing Techniques: A Practical Guide, 2nd edn. Springer, New York (2008). https://doi.org/10.1007/978-0-387-68954-8

    Book  MATH  Google Scholar 

  18. Harel, D., Pnueli, A., Stavi, J.: Propositional dynamic logic of nonregular programs. J. Comput. Syst. Sci. 26(2), 222–243 (1983)

    Article  MathSciNet  Google Scholar 

  19. Harris, S., Seaborne, A.: SPARQL 1.1 query language. Technical report, W3C (2013). http://www.w3.org/TR/2013/REC-sparql11-query-20130321

  20. Hellings, J.: Conjunctive context-free path queries. In: Proceedings of the 17th International Conference on Database Theory (ICDT 2014), pp. 119–130 (2014)

    Google Scholar 

  21. Hofman, P., Martens, W.: Separability by short subsequences and subwords. In: 18th International Conference on Database Theory. Leibniz International Proceedings in Informatics (LIPIcs), vol. 31, pp. 230–246. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2015)

    Google Scholar 

  22. Kozen, D.: Kleene algebra with tests. ACM Trans. Program. Lang. Syst. 19(3), 427–443 (1997)

    Article  MathSciNet  Google Scholar 

  23. Lange, M.: Model checking propositional dynamic logic with all extras. J. Appl. Log. 4(1), 39–49 (2006)

    Article  MathSciNet  Google Scholar 

  24. Libkin, L., Martens, W., Vrgoč, D.: Querying graph databases with XPath. In: Proceedings of the 16th International Conference on Database Theory, pp. 129–140. ACM (2013)

    Google Scholar 

  25. Losemann, K., Martens, W.: The complexity of evaluating path expressions in SPARQL. In: Proceedings of the 31st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, pp. 101–112. ACM (2012)

    Google Scholar 

  26. Mäkinen, E.: On lexicographic enumeration of regular and context-free languages. Acta Cybern. 13(1), 55–61 (1997)

    MathSciNet  MATH  Google Scholar 

  27. Mclean, M.J., Johnston, D.B.: An algorithm for finding the shortest terminal strings which can be produced from non-terminals in context-free grammars. In: Street, A.P., Wallis, W.D. (eds.) Combinatorial Mathematics III. LNM, vol. 452, pp. 180–196. Springer, Heidelberg (1975). https://doi.org/10.1007/BFb0069557

    Chapter  Google Scholar 

  28. Robinson, I., Webber, J., Eifrem, E.: Graph Databases: New Opportunities for Connected Data, 2nd edn. O’Reilly Media Inc., Boston (2015)

    Google Scholar 

  29. Rodriguez, M.A.: The gremlin graph traversal machine and language (invited talk). In: Proceedings of the 15th Symposium on Database Programming Languages, pp. 1–10. ACM, New York (2015)

    Google Scholar 

  30. Schreiber, G., Raimond, Y.: RDF 1.1 primer. Technical report, W3C (2014). http://www.w3.org/TR/2014/NOTE-rdf11-primer-20140624

  31. Sevon, P., Eronen, L.: Subgraph queries by context-free grammars. J. Integr. Bioinform. 5(2), 157–172 (2008)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jelle Hellings .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hellings, J. (2020). Explaining Results of Path Queries on Graphs. In: Qin, L., et al. Software Foundations for Data Interoperability and Large Scale Graph Data Analytics. SFDI LSGDA 2020 2020. Communications in Computer and Information Science, vol 1281. Springer, Cham. https://doi.org/10.1007/978-3-030-61133-0_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-61133-0_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-61132-3

  • Online ISBN: 978-3-030-61133-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics