- From: Axel Polleres <axel.polleres@deri.org>
- Date: Thu, 06 Dec 2007 23:57:25 +0000
- To: "Public-Rif-Wg (E-mail)" <public-rif-wg@w3.org>
Hi all,
I was asked to make a use case for what is called higher-order built-ins.
In order to recap, let me repeat a generic definition of the term
"built-in" from one of my previous mails (see
http://lists.w3.org/Archives/Public/public-rif-wg/2007Nov/0011.html):
"[...] evaluable predicates, unlike usual definitions of built-ins in
logic programming, can not only take constant parameters but also
(extensions of) predicates as input. Inputs can not only be terms, but
also predicate names (in which case the *extension* of the respective
predicate is the input.)"
Here some example:
1) Aggregate functions, for instance count seem to be a necessary
prerequisite for aggregating not only database data, but also web data:
In this example, we assume we have a builtin &count with binding pattern
&count( Input, Output)
available that counts the extension of the predicate 'Input'. With such
a predicate, I could count the number of foaf:knows links defined in my
foaf file more or less like this:
myfriends(?X) :- :me[foaf:knows->?X].
friendscount(Count) :- &count( myfriends, Count ).
Such builtins ar implemented in the dlvhex system [1,2]. We used this
generic mechanism for instance to implement an extension by aggregate
functions for SPARQL, details see [3,4]. In that paper we have more
complex agregates where we can also define the parameters of a certain
predicate we want to agregate over.
2) Another example is interoperability of rules and ontologies by
dedicated DL query predicates, see also [1].
1. 1. T. Eiter, G. Ianni, R. Schindlauer, H. Tompits. A Uniform
Integration of Higher-Order Rea-
soning and External Evaluations in Answer Set Programming. In
International Joint Con-
ference on Artificial Intelligence (IJCAI) 2005, pp. 90–96, Edinburgh,
UK, Aug. 2005.
2. http://www.kr.tuwien.ac.at/research/dlvhex
3. A. Polleres, F. Scharffe, and R. Schindlauer. SPARQL++ for mapping
between RDF vocabularies. In OTM 2007, Part I : Proceedings of the 6th
International Conference on Ontologies, DataBases, and Applications of
Semantics (ODBASE 2007), volume 4803 of Lecture Notes in Computer
Science, pages 878-896, Vilamoura, Algarve, Portugal, November 2007.
Springer.
http://www.polleres.net/publications/poll-etal-2007.pdf
4. http://www.polleres.net/presentations/20071127-SPARQL++ODBASE2007.pdf
--
Dr. Axel Polleres
email: axel@polleres.net url: http://www.polleres.net/
Received on Thursday, 6 December 2007 23:57:50 UTC