- From: <jos.deroo.jd@belgium.agfa.com>
- Date: Tue, 23 Apr 2002 12:09:03 +0200
- To: phayes@ai.uwf.edu
- Cc: connolly@w3.org, las@olin.edu, w3c-rdfcore-wg@w3.org
[...] >[To Jos:] >Shouldnt there be slashes in all these examples, eg shouldnt rule 11b be: > >{ :rule11b . ( ?a / ?b ) :append ?c } log:implies { ( ( ?x / ?a ) >/?b ) :append ( ?x / ?c ) } . > >(If not, please explain the syntax a bit more.) ( :a :b ) is shorthand for _:x rdf:type owl:List . _:x owl:first :a . _:x owl:rest _:y . _:y rdf:type owl:List . _:y owl:first :b . _:y owl:rest owl:nil . ( :a / :b ) is shorthand for _:x rdf:type owl:List . _:x owl:first :a . _:x owl:rest :b . so in { :rule11b . ( ?a ?b ) :append ?c } log:implies { ( ( ?x / ?a ) ?b ) :append ( ?x / ?c ) } . the subject of :append is a list of 2 lists and the object is (the appended) list >I don't follow what kind of assertion append: is supposed to be >making here. (I thought append was a function...maybe I'm stuck in >LISP, or something?) well ( :a / :b ) is like LISP's ( cons :a :b ) or PROLOG's [ :a | :b ] and we've kind of (mis)used the verb :append as a binary relation >( ( ?x / ?a ) ?b ) is a list whose first is (another) list, is that right?? that's right Pat >>{ :rule12a } log:implies { ( ?a ( ?a / ?c ) ) :remove ?c } . >>{ :rule12b . ( ?a ?b ) :remove ?c } log:implies { ( ?a ( ?x / ?b ) ) >>:remove ( ?x / ?c ) } . > >?? How does that 'remove' work, exactly?? the subject of :remove is a list of an item-to-be-removed and a list, the object is the list-with-item-removed it only removes the first occurrence of the item in the list it is supporting the declaration of :sameBagAs e.g. to find out that ( :a :a :b ) :sameBagAs ( :b :a :a ) { <http://www.agfa.com/w3c/euler/owl-rules#rule13b> . { <http://www.agfa.com/w3c/euler/owl-rules#rule12b> . { <http://www.agfa.com/w3c/euler/owl-rules#rule12a> } log:implies {( :a ( :a :a)) :remove ( :a)}} log:implies {( :a ( :b :a :a)) :remove ( :b :a)}. { <http://www.agfa.com/w3c/euler/owl-rules#rule13b> . { <http://www.agfa.com/w3c/euler/owl-rules#rule12b> . { <http://www.agfa.com/w3c/euler/owl-rules#rule12a> } log:implies {( :a ( :a)) :remove ( )}} log:implies {( :a ( :b :a)) :remove ( :b)}. { <http://www.agfa.com/w3c/euler/owl-rules#rule13b> . { <http://www.agfa.com/w3c/euler/owl-rules#rule12a> } log:implies {( :b ( :b)) :remove ( )}. { <http://www.agfa.com/w3c/euler/owl-rules#rule13a> } log:implies {( ) :sameBagAs ( )}} log:implies {( :b) :sameBagAs ( :b)}} log:implies {( :a :b) :sameBagAs ( :b :a)}} log:implies {( :a :a :b) :sameBagAs ( :b :a :a)}. -- Jos
Received on Tuesday, 23 April 2002 06:09:59 UTC