Integrating XPath with the functional-logic language toy

  • Authors:
  • Rafael Caballero;Yolanda García-Ruiz;Fernando Sáenz-Pérez

  • Affiliations:
  • Departamento de Sistemas Informáticos y Computación, Universidad Complutense de Madrid, Spain;Departamento de Sistemas Informáticos y Computación, Universidad Complutense de Madrid, Spain;Departamento de Ingeniería del Software e Inteligencia Artificial, Universidad Complutense de Madrid, Spain

  • Venue:
  • PADL'11 Proceedings of the 13th international conference on Practical aspects of declarative languages
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents a programming framework for incorporating XPath queries into the functional-logic language 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.