Skip to main content

Declarative Debugging of XML Queries

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12548))

Included in the following conference series:

Abstract

In this paper we present the elements of an algorithmic debugger for XQuery. Given a XQuery program/query, a debugging tree is built in which the root is the query and the answer, and non-root nodes contain the results of function calls and XPath expressions computed from the query. Using the higher-order capabilities of XQuery several navigation strategies can be defined, enabling the adaptation of the debugging to the program/query and the user needs. Debugging trees and concepts as (partially) incomplete and incorrect answers are formally defined for queries in terms of XQuery semantics. A Web tool has been developed allowing the visualization of the debugging tree and the debugging of a XQuery program/query with the selected navigation strategy.

This work was supported by UAL/CECEU/FEDER under grant UAL18-TIC-A002-B1 and the State Research Agency (AEI) of the Spanish Ministry of Science and Innovation under grant PID2019-104735RB-C42 (SAFER).

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

Notes

  1. 1.

    http://minerva.ual.es:8090/debxquery/.

  2. 2.

    https://www.oxygenxml.com/xml_editor/xquery_debugger.html.

  3. 3.

    http://www.stylusstudio.com/xquery-debugger.html.

  4. 4.

    https://www.liquid-technologies.com/xquery-debugger.

  5. 5.

    https://developer.marklogic.com/code/xqdebug/.

  6. 6.

    https://www.altova.com/xmlspy-xml-editor#xquery_debug.

  7. 7.

    http://cf.zorba-xquery.com.s3.amazonaws.com/doc/zorba-1.0.0/zorba/html/debugger.html.

  8. 8.

    It could be happen that some of them returns a non empty but incorrect result but it does not arise here.

  9. 9.

    We have restricted ourselves to the most known XQuery constructors.

  10. 10.

    http://minerva.ual.es:8090/debxquery/.

References

  1. Almendros-Jiménez, J.M., Becerra-Terón, A.: Automatic validation of XQuery programs. In: The 17th International Conference on Information Integration and Web-based Applications & Services, pp. 603–607. ACM Press (2015)

    Google Scholar 

  2. Almendros-Jiménez, J.M., Becerra-Terón, A.: XQuery testing from XML schema based random test cases. In: Chen, Q., Hameurlain, A., Toumani, F., Wagner, R., Decker, H. (eds.) DEXA 2015. LNCS, vol. 9262, pp. 268–282. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-22852-5_23

    Chapter  Google Scholar 

  3. Almendros-Jiménez, J.M., Becerra-Terón, A.: Automatic property-based testing and path validation of XQuery programs. Softw. Test. Verif. Reliab. 27(1–2), e1625 (2017)

    Article  Google Scholar 

  4. Binks, D.: Declarative debugging in godel. Ph.D. thesis, University of Bristol (1995)

    Google Scholar 

  5. Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: A theoretical framework for the declarative debugging of datalog programs. In: Schewe, K.-D., Thalheim, B. (eds.) SDKB 2008. LNCS, vol. 4925, pp. 143–159. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-88594-8_8

    Chapter  Google Scholar 

  6. Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: Algorithmic debugging of SQL views. In: Clarke, E., Virbitskaite, I., Voronkov, A. (eds.) PSI 2011. LNCS, vol. 7162, pp. 77–85. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-29709-0_9

    Chapter  MATH  Google Scholar 

  7. Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: Declarative debugging of concurrent Erlang programs. J. Log. Algebraic Methods Program. 101, 22–41 (2018)

    Article  MathSciNet  Google Scholar 

  8. Caballero, R., Riesco, A., Silva, J.: A survey of algorithmic debugging. ACM Comput. Surv. (CSUR) 50(4), 1–35 (2017)

    Article  Google Scholar 

  9. Davie, T., Chitil, O.: Hat-delta: one right does make a wrong. In: Seventh Symposium on Trends in Functional Programming, TFP 2006, pp. 1–9. Intellect (2006)

    Google Scholar 

  10. Faddegon, M., Chitil, O.: Algorithmic debugging of real-world haskell programs: deriving dependencies from the cost centre stack. ACM SIGPLAN Not. 50(6), 33–42 (2015)

    Article  Google Scholar 

  11. Groppe, J., Groppe, S.: Filtering unsatisfiable XPath queries. Data Knowl. Eng. 64(1), 134–169 (2008)

    Article  Google Scholar 

  12. Grün, C.: BaseX. The XML Database (2020). http://basex.org

  13. Grust, T., Rittinger, J., Teubner, J.: Data-intensive XQuery debugging with instant replay. In: Proceedings of the 4th International Workshop on XQuery Implementation, Experience and Perspectives, pp. 1–6 (2007)

    Google Scholar 

  14. Insa, D., Silva, J.: An algorithmic debugger for Java. In: 2010 IEEE International Conference on Software Maintenance, pp. 1–6. IEEE (2010)

    Google Scholar 

  15. Nilsson, H.: How to look busy while being as lazy as ever: the implementation of a lazy functional debugger. J. Funct. Program. 11(6), 629–671 (2001)

    Article  Google Scholar 

  16. Petrovay, G.: XQuery (scripting) debugging: IDE and engine support. Master’s thesis, ETH, Swiss Federal Institute of Technology Zurich, Department of CS (2008)

    Google Scholar 

  17. Riesco, A., Verdejo, A., Martí-Oliet, N., Caballero, R.: Declarative debugging of rewriting logic specifications. J. Log. Algebraic Program. 81(7–8), 851–897 (2012)

    Article  MathSciNet  Google Scholar 

  18. Robie, J., Chamberlin, D., Dyck, M., Snelson, J.: XQuery 3.0: an XML query language. W3C Proposed Recommendation (2014)

    Google Scholar 

  19. Shapiro, E.Y.: Algorithmic program diagnosis. In: Proceedings of the 9th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 299–308 (1982)

    Google Scholar 

  20. Silva, J.: A survey on algorithmic debugging strategies. Adv. Eng. Softw. 42(11), 976–991 (2011)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jesús M. Almendros-Jiménez .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Almendros-Jiménez, J.M., Becerra-Terón, A. (2021). Declarative Debugging of XML Queries. In: Morales, J.F., Orchard, D. (eds) Practical Aspects of Declarative Languages. PADL 2021. Lecture Notes in Computer Science(), vol 12548. Springer, Cham. https://doi.org/10.1007/978-3-030-67438-0_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-67438-0_10

  • Published:

  • Publisher Name: Springer, Cham

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

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics