Integrating XPath with the Functional-Logic Language Toy

  • Rafael Caballero
  • Yolanda García-Ruiz
  • Fernando Sáenz-Pérez
Conference paper

DOI: 10.1007/978-3-642-18378-2_13

Volume 6539 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Caballero R., García-Ruiz Y., Sáenz-Pérez F. (2011) Integrating XPath with the Functional-Logic Language Toy. In: Rocha R., Launchbury J. (eds) Practical Aspects of Declarative Languages. PADL 2011. Lecture Notes in Computer Science, vol 6539. Springer, Berlin, Heidelberg

Abstract

This paper presents a programming framework for incorporating XPath queries into the functional-logic language \(\mathcal{TOY}\). The proposal exploits the language characteristics, including non-determinism, logic variables, and higher-order functions and patterns. Our setting covers a wide range of standard XPath axes and tests. In particular reverse axes are implemented thanks to the double nature of XPath queries, which are both higher-order functions and data terms in our setting. The combination of these two different worlds, the functional-logic paradigm and the XML query language XPath, is very enriching for both of them. From the point of view of functional-logic programming, the language is now able to deal with XML documents in a very simple way. From the point of view of XPath, our approach presents several nice properties as the generation of XML test-cases for XPath queries, which can be useful for finding bugs in erroneous queries.

Keywords

Functional-Logic Programming Non-Deterministic Functions XPath Queries Higher-Order Patterns 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Rafael Caballero
    • 1
  • Yolanda García-Ruiz
    • 1
  • Fernando Sáenz-Pérez
    • 2
  1. 1.Departamento de Sistemas Informáticos y ComputaciónUniversidad Complutense de MadridSpain
  2. 2.Departamento de Ingeniería del Software e Inteligencia ArtificialUniversidad Complutense de MadridSpain