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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
It could be happen that some of them returns a non empty but incorrect result but it does not arise here.
- 9.
We have restricted ourselves to the most known XQuery constructors.
- 10.
References
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)
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
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)
Binks, D.: Declarative debugging in godel. Ph.D. thesis, University of Bristol (1995)
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
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
Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: Declarative debugging of concurrent Erlang programs. J. Log. Algebraic Methods Program. 101, 22–41 (2018)
Caballero, R., Riesco, A., Silva, J.: A survey of algorithmic debugging. ACM Comput. Surv. (CSUR) 50(4), 1–35 (2017)
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)
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)
Groppe, J., Groppe, S.: Filtering unsatisfiable XPath queries. Data Knowl. Eng. 64(1), 134–169 (2008)
Grün, C.: BaseX. The XML Database (2020). http://basex.org
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)
Insa, D., Silva, J.: An algorithmic debugger for Java. In: 2010 IEEE International Conference on Software Maintenance, pp. 1–6. IEEE (2010)
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)
Petrovay, G.: XQuery (scripting) debugging: IDE and engine support. Master’s thesis, ETH, Swiss Federal Institute of Technology Zurich, Department of CS (2008)
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)
Robie, J., Chamberlin, D., Dyck, M., Snelson, J.: XQuery 3.0: an XML query language. W3C Proposed Recommendation (2014)
Shapiro, E.Y.: Algorithmic program diagnosis. In: Proceedings of the 9th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 299–308 (1982)
Silva, J.: A survey on algorithmic debugging strategies. Adv. Eng. Softw. 42(11), 976–991 (2011)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
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)