[N3] witch test case

~/euler52 --prolog --test
http://www.w3.org/2000/10/swap/test/reason/witch.n3 --filter
http://www.w3.org/2000/10/swap/test/reason/witch-goal.n3

is still happy with 2000/10/swap/check.py
i.e. euler52 (http://josderoo.googlepages.com/euler52)
produces

#Processed by Id: EulerLibrary.java 1591 2007-10-25 13:20:13Z josd

@prefix str: <http://www.w3.org/2000/10/swap/string#>.
@prefix var: <http://localhost/var#>.
@prefix q: <http://www.w3.org/2004/ql#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>.
@prefix fn: <http://www.w3.org/2006/xpath-functions#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix : <http://www.w3.org/2000/10/swap/test/reason/witch#>.
@prefix time: <http://www.w3.org/2000/10/swap/time#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix n3: <http://www.w3.org/2004/06/rei#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix r: <http://www.w3.org/2000/10/swap/reason#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

[ a r:Proof, r:Conjunction;
      r:component [ a r:Inference; r:gives {:GIRL rdf:type :WITCH};
r:evidence (
            [ a r:Extraction; r:gives {:GIRL rdf:type :WITCH}; r:because [
a r:Inference; r:gives {:GIRL rdf:type :WITCH}; r:evidence (
                  [ a r:Extraction; r:gives {:GIRL rdf:type :BURNS};
r:because [ a r:Inference; r:gives {:GIRL rdf:type :BURNS}; r:evidence (
                        [ a r:Extraction; r:gives {:GIRL rdf:type
:ISMADEOFWOOD}; r:because [ a r:Inference; r:gives {:GIRL rdf:type
:ISMADEOFWOOD}; r:evidence (
                              [ a r:Extraction; r:gives {:GIRL rdf:type
:FLOATS}; r:because [ a r:Inference; r:gives {:GIRL rdf:type :FLOATS};
r:evidence (
                                    [ a r:Extraction; r:gives {:DUCK
rdf:type :FLOATS}; r:because [ a r:Parsing; r:source
<http://www.w3.org/2000/10/swap/test/reason/witch.n3>]]
                                    [ a r:Extraction; r:gives {:DUCK
:SAMEWEIGHT :GIRL}; r:because [ a r:Parsing; r:source
<http://www.w3.org/2000/10/swap/test/reason/witch.n3>]]);
                                    r:binding [ r:variable [ n3:uri
"http://localhost/var#x"]; r:boundTo [ n3:uri
"http://www.w3.org/2000/10/swap/test/reason/witch#DUCK"]];
                                    r:binding [ r:variable [ n3:uri
"http://localhost/var#y"]; r:boundTo [ n3:uri
"http://www.w3.org/2000/10/swap/test/reason/witch#GIRL"]];
                                    r:rule [ a r:Extraction; r:gives
{@forAll var:x,var:y. {var:x a :FLOATS. var:x :SAMEWEIGHT var:y} => {var:y
a :FLOATS}. }; r:because [ a r:Parsing; r:source
<http://www.w3.org/2000/10/swap/test/reason/witch.n3>]]]]);
                              r:binding [ r:variable [ n3:uri
"http://localhost/var#x"]; r:boundTo [ n3:uri
"http://www.w3.org/2000/10/swap/test/reason/witch#GIRL"]];
                              r:rule [ a r:Extraction; r:gives {@forAll
var:x. {var:x a :FLOATS} => {var:x a :ISMADEOFWOOD}. }; r:because [ a
r:Parsing; r:source
<http://www.w3.org/2000/10/swap/test/reason/witch.n3>]]]]);
                        r:binding [ r:variable [ n3:uri
"http://localhost/var#x"]; r:boundTo [ n3:uri
"http://www.w3.org/2000/10/swap/test/reason/witch#GIRL"]];
                        r:rule [ a r:Extraction; r:gives {@forAll var:x.
{var:x a :ISMADEOFWOOD} => {var:x a :BURNS}. }; r:because [ a r:Parsing;
r:source <http://www.w3.org/2000/10/swap/test/reason/witch.n3>]]]]
                  [ a r:Extraction; r:gives {:GIRL rdf:type :WOMAN};
r:because [ a r:Parsing; r:source
<http://www.w3.org/2000/10/swap/test/reason/witch.n3>]]);
                  r:binding [ r:variable [ n3:uri
"http://localhost/var#x"]; r:boundTo [ n3:uri
"http://www.w3.org/2000/10/swap/test/reason/witch#GIRL"]];
                  r:rule [ a r:Extraction; r:gives {@forAll var:x. {var:x a
:BURNS. var:x a :WOMAN} => {var:x a :WITCH}. }; r:because [ a r:Parsing;
r:source <http://www.w3.org/2000/10/swap/test/reason/witch.n3>]]]]);
            r:rule [ a r:Extraction; r:gives {{:GIRL a :WITCH} => {:GIRL a
:WITCH}. }; r:because [ a r:Parsing; r:source
<http://www.w3.org/2000/10/swap/test/reason/witch-goal.n3>]]];
      r:gives {
            :GIRL rdf:type :WITCH.}].

#ENDS 183 msec.


and check.py'ing that tells

1: ...
 [by parsing <witch.n3>]

2: :DUCK a :FLOATS .
 [by erasure from step 1]

3: ...
 [by parsing <witch.n3>]

4: :DUCK :SAMEWEIGHT :GIRL .
 [by erasure from step 3]

5: ...
 [by parsing <witch.n3>]

6: @forAll :x, :y . { :x a witch:FLOATS; witch:SAMEWEIGHT :y . }
log:implies {:y a witch:FLOATS . } .
 [by erasure from step 5]

7: :GIRL a :FLOATS .
 [by rule from step 6 applied to steps [2, 4]
  with bindings {'y':
u'<http://www.w3.org/2000/10/swap/test/reason/witch#GIRL>', 'x':
u'<http://www.w3.org/2000/10/swap/test/reason/witch#DUCK>'}]

8: :GIRL a :FLOATS .
 [by erasure from step 7]

9: ...
 [by parsing <witch.n3>]

10: @forAll :x . { :x a witch:FLOATS . } log:implies {:x a
witch:ISMADEOFWOOD . } .
 [by erasure from step 9]

11: :GIRL a :ISMADEOFWOOD .
 [by rule from step 10 applied to steps [8]
  with bindings {'x':
u'<http://www.w3.org/2000/10/swap/test/reason/witch#GIRL>'}]

12: :GIRL a :ISMADEOFWOOD .
 [by erasure from step 11]

13: ...
 [by parsing <witch.n3>]

14: @forAll :x . { :x a witch:ISMADEOFWOOD . } log:implies {:x a
witch:BURNS . } .
 [by erasure from step 13]

15: :GIRL a :BURNS .
 [by rule from step 14 applied to steps [12]
  with bindings {'x':
u'<http://www.w3.org/2000/10/swap/test/reason/witch#GIRL>'}]

16: :GIRL a :BURNS .
 [by erasure from step 15]

17: ...
 [by parsing <witch.n3>]

18: :GIRL a :WOMAN .
 [by erasure from step 17]

19: ...
 [by parsing <witch.n3>]

20: @forAll :x . { :x a witch:BURNS, witch:WOMAN . } log:implies {:x a
witch:WITCH . } .
 [by erasure from step 19]

21: :GIRL a :WITCH .
 [by rule from step 20 applied to steps [16, 18]
  with bindings {'x':
u'<http://www.w3.org/2000/10/swap/test/reason/witch#GIRL>'}]

22: :GIRL a :WITCH .
 [by erasure from step 21]

23: ...
 [by parsing <witch-goal.n3>]

24: { :GIRL a :WITCH . } log:implies {:GIRL a :WITCH . } .
 [by erasure from step 23]

25: :GIRL a :WITCH .
 [by rule from step 24 applied to steps [22]
  with bindings {}]

26: :GIRL a :WITCH .
 [by conjoining steps [25]]

     @prefix : <http://www.w3.org/2000/10/swap/test/reason/witch#> .

    :GIRL     a :WITCH .


Current snapshot of other results is at
http://eulersharp.svn.sourceforge.net/viewvc/eulersharp/trunk/2006/02swap/etc5a.ref?revision=1592

Received on Thursday, 25 October 2007 22:29:34 UTC