Toward the Web of Functions: Interoperable Higher-Order Functions in SPARQL

  • Maurizio Atzori
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8797)


In this work we address the problem of using any third-party custom sparql function by only knowing its URI, allowing the computation to be executed on the remote endpoint that defines and implements such function. We present a standard-compliant solution that does not require changes to the current syntax or semantics of the language, based on the use of a call function. In contrast to the plain “Extensible Value Testing” described in the W3C Recommendations for the sparql Query Language, our approach is interoperable, that is, not dependent on the specific implementation of the endpoint being used for the query, relying instead on the implementation of the endpoint that declares and makes the function available, therefore reducing interoperability issues to one single case for which we provide an open source implementation. Further, the proposed solution for using custom functions within sparql queries is quite expressive, allowing for true higher-order functions, where functions can be assigned to variables and used as both inputs and outputs, enabling a generation of Web APIs for sparql that we call Web of Functions. The paper also shows different approaches on how our proposal can be applied to existing endpoints, including a SPARQL-to-SPARQL compiler that makes the use of call unnecessary, by exploiting non-normative sections in the Federated Query W3C Recommendations that are currently implemented on some popular sparql engines. We finally evaluate the effectiveness of our proposal reporting our experiments on two popular engines.


Link Data Call Function Sparql Query Custom Function Remote Procedure Call 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Williams, G.: Extensible SPARQL Functions with Embedded Javascript. In: ESWC 2007 Workshop on Scripting for the Semantic Web, SFSW 2007 (2007)Google Scholar
  2. 2.
    Hartig, O., Bizer, C., Freytag, J.-C.: Executing SPARQL Queries over the Web of Linked Data. In: Bernstein, A., Karger, D.R., Heath, T., Feigenbaum, L., Maynard, D., Motta, E., Thirunarayan, K. (eds.) ISWC 2009. LNCS, vol. 5823, pp. 293–309. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  3. 3.
    Hartig, O.: An Introduction to SPARQL and Queries over Linked Data. In: Brambilla, M., Tokuda, T., Tolksdorf, R. (eds.) ICWE 2012. LNCS, vol. 7387, pp. 506–507. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  4. 4.
    Hartig, O.: SPARQL for a Web of Linked Data: Semantics and Computability. In: Simperl, E., Cimiano, P., Polleres, A., Corcho, O., Presutti, V. (eds.) ESWC 2012. LNCS, vol. 7295, pp. 8–23. Springer, Heidelberg (2012)Google Scholar
  5. 5.
    Hartig, O.: SQUIN: a traversal based query execution system for the web of linked data. In: ACM SIGMOD Conference, pp. 1081–1084 (2013)Google Scholar
  6. 6.
    Arenas, M., Gutierrez, C., Miranker, D.P., Pérez, J., Sequeda, J.: Querying Semantic Data on the Web? SIGMOD Record 41(4), 6–17 (2012)CrossRefGoogle Scholar
  7. 7.
    Miranker, D.P., Depena, R.K., Jung, H., Sequeda, J.F., Reyna, C.: Diamond: A SPARQL Query Engine, for Linked Data Based on the Rete Match. In: Artificial Intelligence Meets the Web of Data Workshop, Co-located at ECAI 2012 (2012)Google Scholar
  8. 8.
    Angles, R., Gutierrez, C.: The Expressive Power of SPARQL. In: Sheth, A.P., Staab, S., Dean, M., Paolucci, M., Maynard, D., Finin, T., Thirunarayan, K. (eds.) ISWC 2008. LNCS, vol. 5318, pp. 114–129. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  9. 9.
    Atzori, M.: Computing Recursive SPARQL Queries. In: 8th IEEE International Conference on Semantic Computing, ICSC, pp. 258–259 (2014)Google Scholar
  10. 10.
    Lanthaler, M.: Creating 3rd generation web APIs with hydra. In: 22nd International World Wide Web Conference, WWW (Companion Volume), pp. 35–38 (2013)Google Scholar
  11. 11.
    Aranda, C.B., Arenas, M., Corcho, Ó., Polleres, A.: Federating queries in SPARQL 1.1: Syntax, semantics and evaluation. J. Web Sem. 18(1), 1–17 (2013)CrossRefGoogle Scholar
  12. 12.
    Atzori, M.: call: A Nucleus for a Web of Open Functions (submitted for publication)Google Scholar
  13. 13.
    Atzori, M., Zaniolo, C.: SWiPE: Searching Wikipedia by Example. In: 21st World Wide Web Conference, WWW (Companion Volume), pp. 309–312 (2012)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Maurizio Atzori
    • 1
  1. 1.Math/CS DepartmentUniversity of CagliariCagliariItaly

Personalised recommendations