- From: Axel Polleres <axel.polleres@deri.org>
- Date: Sat, 02 Jun 2007 12:12:19 +0200
- To: "Public-Rif-Wg (E-mail)" <public-rif-wg@w3.org>
Axel Polleres wrote:
>
> Here some strawman thoughts for the issues around external vs logical
> functions:
>
>
> In the current RIF, there is not way to disambiguate between external
> and logical functions.
>
> Here, we have to consider several issues:
>
> a) external functions
> b) external predicates and binding patterns
> c) what is the "input" to an external function/predicates
>
> c) is probably a phase 2 issue.
>
>
> ad a) we currently do not distinguish between logical and external
> functions. external functions are distinct since they fix the
> interpretation for a function term to a particular element of the domain.
>
> The strawaman proposal here is to distinguish between
>
> op and exop in UNITERMS
>
> ie.
>
>
> subclass Uniterm
> property op: Const
> | property exop: Const
p.s.: maybe, the following version eould stick rarther with asn?
subclass Uniterm
subclass LOGUNITERM
property op: Const
subclass EXTUNITERM
property exop: Const
> In the concrete syntax, I would replace:
>
> Uniterm ::= Const '(' TERM* ')'
> with
> Uniterm ::= '&'? Const '(' TERM* ')'
>
> where '&' denotes an external function/predicate.
>
> So, I am not sure whether or how such a disjunction (op | expo) would
> be expressible in asn07. Anyway, let's assume we have fixed a), now for
>
> ad b):
>
> In many rule languages, e.g. Prolog, dlvhex, (I think also) FLORA,
> there are not only external function terms but also external predicates.
> These define possible binding patterns, ie. which parameters are input
> and output values of the respective predicate,That is, certain 'input'
> terms appearing in an external predicate term, have to be either ground
> or have to appear positively elsewehere in the condition, e.g.
>
> e.g. let us assume we have a predicate &Add(X,Y,Z).
>
> allowing the following binding patterns:
>
> &Add(+X,+Y,Z).
>
> &Add(X,+Y,+Z).
>
> &Add(+X,Y,+Z).
>
> ie. at least 2 of the parameters have to be bound.
>
> We need to clarify whether we want to support and enable exchange of
> such binding patterns. One possiblity is that for external
> predicates, one doesn't only declare a boolean sort in RIF core, ie.
> for instance
>
> :- signature &Add xs:long * xs:long * xs:long
>
> but along with this also a set of allowed binding patterns, e.g.
>
> :- bindingPattern &Add fbb,bfb,bbf,bbb
>
>
> add c)
>
> Yet other languages might have more powerful external
> functions/predicates which take the *interpretation* of a predicate as
> input, ie. you handle not only individuals and comnstants, but might
> want to hand over the whole *extension* of a predicate, one such
> language are HEX-predicate, by Eiter et al. [1]. Such external functions
> predicates can e.g. emulate aggregates like count/min/max, e.g.
> an external function:
>
> &count(answer)
>
> returning the number of tuples in the predicate answer which are true.
> I think though, such general external predicates are rather a phase 2
> issue/requirement than phase one
>
> best,
> axel
>
>
>
> [1] A Uniform Integration of Higher-Order Reasoning and External
> Evaluations in Answer Set Programming
>
> Thomas Eiter, Giovambattista Ianni, Roman Schindlauer, Hans Tompits
> Proceedings of the 19th International Joint Conference on Artificial
> Intelligence (IJCAI-05), pages 90-96. Professional Book Center, 2005.
> http://www.kr.tuwien.ac.at/staff/eiter/et-archive/ijcai05-hex_asp.pdf
>
>
>
>
>
>
--
Dr. Axel Polleres
email: axel@polleres.net url: http://www.polleres.net/
Received on Saturday, 2 June 2007 10:12:27 UTC