- From: Sean B. Palmer <sean+cwm@infomesh.net>
- Date: Sat, 16 Oct 2004 19:31:34 +0100
- To: david.h.jones@boeing.com
- CC: public-cwm-talk@w3.org
> Can I use owl/n3 rules to derive a field 'coursesMissing' [...] Yes, using the following rules file: [[[ $ cat courses.n3 @prefix : <#> . @prefix log: <http://www.w3.org/2000/10/swap/log#> . @prefix per: <http://www.nr.mil/2004/10/personnel#> . # @@ "requiredCourse" would be a better propname, &c. @forAll :s, :c . { :s a per:Student; per:major [ per:coursesRequired :c ] } => { :s :mustTake :c } . { :s :mustTake :c } => { { <requiredCourse.n3>.log:semantics log:notIncludes { :s per:coursesTaken :c } } => { :s per:coursesMissing :c } } . # EOF ]]] And command line: $ cwm requiredCourse.n3 courses.n3 --think Output quote: [[[ m:Dave a :Student; cou:mustTake m:c1, m:c2, m:c3; :coursesMissing m:c3; :coursesTaken m:c1, m:c2; :major m:m1 . ]]] Using CWM 0.8 [1]. Cheers, [1] http://www.w3.org/2000/10/swap/cwm-0.8.tar.gz -- Sean B. Palmer, http://inamidst.com/sbp/
Received on Saturday, 16 October 2004 18:32:07 UTC