Abstract
This paper addresses the problem of integrating a fragment of XQuery, a language for querying XML documents, into the functional-logic language \(\mathcal{TOY}\). The queries are evaluated by an interpreter, and the declarative nature of the proposal allows us to prove correctness and completeness with respect to the semantics of the subset of XQuery considered. The different fragments of XML that can be produced by XQuery expressions are obtained using the non-deterministic features of functional-logic languages. As an application of this proposal we show how the typical generate and test techniques of logic languages can be used for generating test-cases for XQuery expressions.
Work partially supported by the Spanish projects STAMP TIN2008-06622-C03-01, DECLARAWEB TIN2008-06622-C03-03, Prometidos-CM S2009TIC-1465 and GPD UCM-BSCH-GR58/08-910502.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Almendros-Jiménez, J.M.: An Encoding of XQuery in Prolog. In: Bellahsène, Z., Hunt, E., Rys, M., Unland, R. (eds.) XSym 2009. LNCS, vol. 5679, pp. 145–155. Springer, Heidelberg (2009)
Almendros-Jiménez, J., Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: A Declarative Embedding of XQuery in a Functional-Logic Language. Technical Report SIC-04/11, Facultad de Informática, Universidad Complutense de Madrid (2011), http://gpd.sip.ucm.es/rafa/xquery/
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press (1999)
Benedikt, M., Koch, C.: From XQuery to relational logics. ACM Trans. Database Syst. 34, 25:1–25:48 (2009)
Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: Integrating XPath with the Functional-Logic Language Toy. In: Rocha, R., Launchbury, J. (eds.) PADL 2011. LNCS, vol. 6539, pp. 145–159. Springer, Heidelberg (2011)
Fegaras, L.: Propagating updates through XML views using lineage tracing. In: IEEE 26th International Conference on Data Engineering (ICDE), pp. 309–320 (March 2010)
González-Moreno, J., Hortalá-González, M., López-Fraguas, F., Rodríguez-Artalejo, M.: A Rewriting Logic for Declarative Programming. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 156–172. Springer, Heidelberg (1996)
Hanus, M.: Curry: An Integrated Functional Logic Language (version 0.8.2 March 28, 2006) (2003), http://www.informatik.uni-kiel.de/~mh/curry/
Hanus, M.: Declarative processing of semistructured web data. Technical report 1103, Christian-Albrechts-Universität Kiel (2011)
Hanus, M., Steiner, F.: Controlling Search in Declarative Programs. In: Palamidessi, C., Meinke, K., Glaser, H. (eds.) ALP 1998 and PLILP 1998. LNCS, vol. 1490, pp. 374–390. Springer, Heidelberg (1998)
Fraguas, F.J.L., Hernández, J.S.: \(\mathcal{TOY}\): A Multiparadigm Declarative System. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999)
Olteanu, D., Meuss, H., Furche, T., Bry, F.: XPath: Looking Forward. In: Chaudhri, A.B., Unland, R., Djeraba, C., Lindner, W. (eds.) EDBT 2002. LNCS, vol. 2490, pp. 109–127. Springer, Heidelberg (2002)
Seipel, D., Baumeister, J., Hopfner, M.: Declaratively Querying and Visualizing Knowledge Bases in Xml. In: Seipel, D., Hanus, M., Geske, U., Bartenstein, O. (eds.) INAP/WLP 2004. LNCS (LNAI), vol. 3392, pp. 16–31. Springer, Heidelberg (2005)
Shapiro, E.: Algorithmic Program Debugging. ACM Distiguished Dissertation. MIT Press (1982)
W3C. Extensible Markup Language (XML) (2007)
W3C. XML Path Language (XPath) 2.0 (2007)
W3C. XML Query Use Cases (2007), http://www.w3.org/TR/xquery-use-cases/
W3C. XQuery 1.0: An XML Query Language (2007)
W3C. XQuery 1.0 and XPath 2.0 Formal Semantics, 2nd edn. (2010), http://www.w3.org/TR/xquery-semantics/
Walmsley, P.: XQuery. O’Reilly Media, Inc. (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Almendros-Jiménez, J.M., Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F. (2012). A Declarative Embedding of XQuery in a Functional-Logic Language. In: Vidal, G. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2011. Lecture Notes in Computer Science, vol 7225. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32211-2_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-32211-2_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32210-5
Online ISBN: 978-3-642-32211-2
eBook Packages: Computer ScienceComputer Science (R0)