W3C home > Mailing lists > Public > public-rif-wg@w3.org > May 2008

Re: question about frames

From: Michael Kifer <kifer@cs.sunysb.edu>
Date: Wed, 07 May 2008 20:02:02 -0400
To: Gary Hallmark <gary.hallmark@oracle.com>
Cc: RIF WG <public-rif-wg@w3.org>
Message-ID: <27009.1210204922@cs.sunysb.edu>


> 
> I'm wondering how to write some simple rules using frames because frames 
> map to the Java beans that Oracle Business Rules uses as its facts 
> better than relations.  Or so I hoped.  The problem I seem to be having 
> is with frame OIDs.  I don't want to have to specify them in a rule 
> conclusion.  For example, consider the simple rule using relations p and q:
> 
> forall(?x) Q(?x) :- P(?x)
> 
> How do I do this using frames instead of relations?  I think I want
> 
> forall(?x, ?p) and(exists(?q) ?q#Q[x->?x]) :- ?p#P[x->?x]
> 
> Unfortunately this is illegal in BLD because heads cannot be formulas, 
> only atomic.  How can I conclude (assert) that frame a instance exists 
> without giving its OID?  Or do we need some kind of gensym builtin for 
> this?

What you want to do is not possible *in principle* in a Horn-based language
like BLD. The best you can do is to approximate this with a function symbol:

forall ?x ?p and(f(?p)#Q  f(?p)[x->?x]) :- and(?p#P ?p[x->?x])

or (depends on what you are up to)

forall ?x ?p and(f(?x ?p)#Q  f(?p)[x->?x]) :- and(?p#P ?p[x->?x])


What you want to do is possible in FLD, however. (More precisely, in an
FLD-based extension of BLD.)


	--michael  
Received on Thursday, 8 May 2008 00:02:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:48 GMT