Skip to main content

A Declarative Embedding of XQuery in a Functional-Logic Language

  • Conference paper
Logic-Based Program Synthesis and Transformation (LOPSTR 2011)

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.

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 PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

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

    Chapter  Google Scholar 

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

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

    Google Scholar 

  4. Benedikt, M., Koch, C.: From XQuery to relational logics. ACM Trans. Database Syst. 34, 25:1–25:48 (2009)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

  6. Fegaras, L.: Propagating updates through XML views using lineage tracing. In: IEEE 26th International Conference on Data Engineering (ICDE), pp. 309–320 (March 2010)

    Google Scholar 

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

    Chapter  Google Scholar 

  8. Hanus, M.: Curry: An Integrated Functional Logic Language (version 0.8.2 March 28, 2006) (2003), http://www.informatik.uni-kiel.de/~mh/curry/

  9. Hanus, M.: Declarative processing of semistructured web data. Technical report 1103, Christian-Albrechts-Universität Kiel (2011)

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  14. Shapiro, E.: Algorithmic Program Debugging. ACM Distiguished Dissertation. MIT Press (1982)

    Google Scholar 

  15. W3C. Extensible Markup Language (XML) (2007)

    Google Scholar 

  16. W3C. XML Path Language (XPath) 2.0 (2007)

    Google Scholar 

  17. W3C. XML Query Use Cases (2007), http://www.w3.org/TR/xquery-use-cases/

  18. W3C. XQuery 1.0: An XML Query Language (2007)

    Google Scholar 

  19. W3C. XQuery 1.0 and XPath 2.0 Formal Semantics, 2nd edn. (2010), http://www.w3.org/TR/xquery-semantics/

  20. Walmsley, P.: XQuery. O’Reilly Media, Inc. (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics