euler.py test result

http://eulersharp.sourceforge.net/2005/11swap/euler.py
  $Id: euler.py,v 1.3 2005/11/12 15:50:07 josd Exp $
  http://eulersharp.sourceforge.net/2005/11swap/README
test result

=======================================================================
testing euler.py http://eulersharp.sourceforge.net/2005/11swap/graph.n3
=======================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/graph#>.

:Angers :path :Nantes .
:Paris :path :Nantes .
:Chartres :path :Nantes .
:Lemans :path :Nantes .

============================================================================
testing euler.py -why 
http://eulersharp.sourceforge.net/2005/11swap/graph.n3
============================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/graph#>.

{:Angers :oneway :Nantes} => {:Angers :path :Nantes} .
{{:Paris :oneway :Chartres} => {:Paris :path :Chartres}. {{:Chartres 
:oneway :Lemans} => {:Chartres :path :Lemans}. {{:Lemans :oneway :Angers} 
=> {:Lemans :path :Angers}. {:Angers :oneway :Nantes} => {:Angers :path 
:Nantes}} => {:Lemans :path :Nantes}} => {:Chartres :path :Nantes}} => 
{:Paris :path :Nantes} .
{{:Chartres :oneway :Lemans} => {:Chartres :path :Lemans}. {{:Lemans 
:oneway :Angers} => {:Lemans :path :Angers}. {:Angers :oneway :Nantes} => 
{:Angers :path :Nantes}} => {:Lemans :path :Nantes}} => {:Chartres :path 
:Nantes} .
{{:Lemans :oneway :Angers} => {:Lemans :path :Angers}. {:Angers :oneway 
:Nantes} => {:Angers :path :Nantes}} => {:Lemans :path :Nantes} .

======================================================================
testing euler.py http://eulersharp.sourceforge.net/2005/11swap/list.n3
======================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/list#>.

a list:in (a b c d e f g) .
b list:in (a b c d e f g) .
c list:in (a b c d e f g) .
d list:in (a b c d e f g) .
e list:in (a b c d e f g) .
f list:in (a b c d e f g) .
g list:in (a b c d e f g) .

(a b c d e f g) :length 7 .

===========================================================================
testing euler.py -why 
http://eulersharp.sourceforge.net/2005/11swap/list.n3
===========================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/list#>.

{(a b c d e f g) rdf:first a} => {a list:in (a b c d e f g)} .
{(a b c d e f g) rdf:rest (b c d e f g). {(b c d e f g) rdf:first b} => {b 
list:in (b c d e f g)}} => {b list:in (a b c d e f g)} .
{(a b c d e f g) rdf:rest (b c d e f g). {(b c d e f g) rdf:rest (c d e f 
g). {(c d e f g) rdf:first c} => {c list:in (c d e f g)}} => {c list:in (b 
c d e f g)}} => {c list:in (a b c d e f g)} .
{(a b c d e f g) rdf:rest (b c d e f g). {(b c d e f g) rdf:rest (c d e f 
g). {(c d e f g) rdf:rest (d e f g). {(d e f g) rdf:first d} => {d list:in 
(d e f g)}} => {d list:in (c d e f g)}} => {d list:in (b c d e f g)}} => 
{d list:in (a b c d e f g)} .
{(a b c d e f g) rdf:rest (b c d e f g). {(b c d e f g) rdf:rest (c d e f 
g). {(c d e f g) rdf:rest (d e f g). {(d e f g) rdf:rest (e f g). {(e f g) 
rdf:first e} => {e list:in (e f g)}} => {e list:in (d e f g)}} => {e 
list:in (c d e f g)}} => {e list:in (b c d e f g)}} => {e list:in (a b c d 
e f g)} .
{(a b c d e f g) rdf:rest (b c d e f g). {(b c d e f g) rdf:rest (c d e f 
g). {(c d e f g) rdf:rest (d e f g). {(d e f g) rdf:rest (e f g). {(e f g) 
rdf:rest (f g). {(f g) rdf:first f} => {f list:in (f g)}} => {f list:in (e 
f g)}} => {f list:in (d e f g)}} => {f list:in (c d e f g)}} => {f list:in 
(b c d e f g)}} => {f list:in (a b c d e f g)} .
{(a b c d e f g) rdf:rest (b c d e f g). {(b c d e f g) rdf:rest (c d e f 
g). {(c d e f g) rdf:rest (d e f g). {(d e f g) rdf:rest (e f g). {(e f g) 
rdf:rest (f g). {(f g) rdf:rest (g). {(g) rdf:first g} => {g list:in (g)}} 
=> {g list:in (f g)}} => {g list:in (e f g)}} => {g list:in (d e f g)}} => 
{g list:in (c d e f g)}} => {g list:in (b c d e f g)}} => {g list:in (a b 
c d e f g)} .

{(a b c d e f g) rdf:first a. (a b c d e f g) rdf:rest (b c d e f g). {(b 
c d e f g) rdf:first b. (b c d e f g) rdf:rest (c d e f g). {(c d e f g) 
rdf:first c. (c d e f g) rdf:rest (d e f g). {(d e f g) rdf:first d. (d e 
f g) rdf:rest (e f g). {(e f g) rdf:first e. (e f g) rdf:rest (f g). {(f 
g) rdf:first f. (f g) rdf:rest (g). {(g) rdf:first g. (g) rdf:rest (). () 
:length 0. (0 1) math:sum 1} => {(g) :length 1}. (1 1) math:sum 2} => {(f 
g) :length 2}. (2 1) math:sum 3} => {(e f g) :length 3}. (3 1) math:sum 4} 
=> {(d e f g) :length 4}. (4 1) math:sum 5} => {(c d e f g) :length 5}. (5 
1) math:sum 6} => {(b c d e f g) :length 6}. (6 1) math:sum 7} => {(a b c 
d e f g) :length 7} .

==========================================================================
testing euler.py http://eulersharp.sourceforge.net/2005/11swap/socrates.n3
==========================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/socrates#>.

:Socrates a :Mortal .
:Tim a :Mortal .

===============================================================================
testing euler.py -why 
http://eulersharp.sourceforge.net/2005/11swap/socrates.n3
===============================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/socrates#>.

{:Socrates a :Man} => {:Socrates a :Mortal} .
{:Tim a :Man} => {:Tim a :Mortal} .

======================================================================
testing euler.py http://eulersharp.sourceforge.net/2005/11swap/tree.n3
======================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/tree#>.

:Frans :ancestor :Jos .
:Frans :ancestor :Goedele .
:Frans :ancestor :Veerle .
:Frans :ancestor :Nele .
:Frans :ancestor :Karel .

:Veerle :descendant :Jos .
:Veerle :descendant :Maaike .
:Veerle :descendant :Frans .
:Veerle :descendant :Maria .

===========================================================================
testing euler.py -why 
http://eulersharp.sourceforge.net/2005/11swap/tree.n3
===========================================================================
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix : <http://eulersharp.sourceforge.net/2005/11swap/tree#>.

{{:Frans :father :Jos} => {:Frans :parent :Jos}} => {:Frans :ancestor 
:Jos} .
{{:Frans :father :Jos} => {:Frans :parent :Jos}. {{:Jos :father :Goedele} 
=> {:Jos :parent :Goedele}} => {:Jos :ancestor :Goedele}} => {:Frans 
:ancestor :Goedele} .
{{:Frans :father :Jos} => {:Frans :parent :Jos}. {{:Jos :father :Veerle} 
=> {:Jos :parent :Veerle}} => {:Jos :ancestor :Veerle}} => {:Frans 
:ancestor :Veerle} .
{{:Frans :father :Jos} => {:Frans :parent :Jos}. {{:Jos :father :Nele} => 
{:Jos :parent :Nele}} => {:Jos :ancestor :Nele}} => {:Frans :ancestor 
:Nele} .
{{:Frans :father :Jos} => {:Frans :parent :Jos}. {{:Jos :father :Karel} => 
{:Jos :parent :Karel}} => {:Jos :ancestor :Karel}} => {:Frans :ancestor 
:Karel} .

{{{:Jos :father :Veerle} => {:Jos :parent :Veerle}} => {:Jos :ancestor 
:Veerle}} => {:Veerle :descendant :Jos} .
{{{:Maaike :mother :Veerle} => {:Maaike :parent :Veerle}} => {:Maaike 
:ancestor :Veerle}} => {:Veerle :descendant :Maaike} .
{{{:Frans :father :Jos} => {:Frans :parent :Jos}. {{:Jos :father :Veerle} 
=> {:Jos :parent :Veerle}} => {:Jos :ancestor :Veerle}} => {:Frans 
:ancestor :Veerle}} => {:Veerle :descendant :Frans} .
{{{:Maria :mother :Jos} => {:Maria :parent :Jos}. {{:Jos :father :Veerle} 
=> {:Jos :parent :Veerle}} => {:Jos :ancestor :Veerle}} => {:Maria 
:ancestor :Veerle}} => {:Veerle :descendant :Maria} .


-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Saturday, 12 November 2005 17:35:36 UTC