W3C home > Mailing lists > Public > public-rif-wg@w3.org > November 2007

[RIF] Action-361, update the Test Cases wiki page to give us a more concrete proposal with example(s)

From: Stella Mitchell <cleo@us.ibm.com>
Date: Thu, 1 Nov 2007 14:54:13 -0400
To: public-rif-wg@w3.org
Message-ID: <OF606C4BDC.4E69BA79-ON85257386.00625850-85257386.0067D7E1@us.ibm.com>
I can't currently get edit access to the wiki pages,  but I would add the 
following to the end of
of the discussion section of this page:  
http://www.w3.org/2005/rules/wg/wiki/Arch/Test_Cases

Stella
___________

 
For the purpose of developing a set of test cases and test documentation 
for RIF-BLD "which reflect
 issue resolution and which aid in conformance evaluation,"  RIF could 
follow the general example of the 
RDF (http://www.w3.org/TR/rdf-testcases/) and OWL (
http://www.w3.org/TR/owl-test/) test suites.

Here are four sample test cases in this style, one in each of the 
following categories.

      PostitiveParser    - The given RIF document must be recognized as 
syntactically valid
      NegativeParser   - The given RIF document must be recognized as 
syntactically invalid
      Entailment              - The given conclusion must be entailed by 
the given ruleset
      Non-entailment     - The given conclusion must not be entailed by 
the given ruleset

 
[examples here - I won't attach the files to this note,  but the contents 
of the files for one
of  the directories is shown at the end of the note]

Notes:
     --  This style of test case is like a specification  rather than 
runnable tests.  The task of asking
          the rule engine for its entailments in some system-dependent 
manner and checking that the
          results are correct is left to the testers.

    --   In the telecons there was some discussion of writing the 
entailment tests using prints or queries,
         which would make the tests closer to a directly usable form.  I 
didn't  include examples in these forms
         because there wasn't  support for the print method (for BLD) and 
I don't fully understand the query method.

                --In the print style, there would be a rule whose body is 
the conclusion that should be entailed,
                  and whose head invokes a print builtin function to print 
out a message that the test passed. 

               --The BLD document says that the condition language is 
usable as a query language, and
                   the charter says that  "The Working Group must not 
specify a query interface (language, protocol,
                  or API) as part of the Phase 1 specifications, although 
it is expected to make use of some 
                  interfaces as part of the test suite..."

     --   The official versions of the test cases would be in RIF XML, but 
(as with the OWL tests) additional
           copies in alternative syntaxes could also be provided (examples 
above are in the presentation syntax).

     --    The syntax validity tests are intended to be things that cannot 
be checked with schema validation.

     --    Round tripping tests may also be needed.   As mentioned in the 
preceding dicsussion section,
            this could be tested by having a translator perform  D --> L 
--> D and providing a specification or tool
            for determining equivalence of the two D documents. or a 
translator could perform D --> L --> D --> L
           and check that the results of entailment tests are the same for 
the two L documents.


Questions:
     -- How will levels (dialects/features) be associated with test cases 
and results?
          (the non-entailment case above would be an entailment case for a
           BLD plus nonmonotonicInheritance extension (per the email 
referenced with that case))

     -- What additional categories of test cases are needed?

     -- Should the manifest files be in RDF/XML?


____________

Here are the files for one of the examples:

testcases\entailment_example\Manifest001.rdf:
<!--
  Copyright World Wide Web Consortium, (Massachusetts Institute of
  Technology, European Research Consortium for Informatics and
  Mathematics, Keio University).

  All Rights Reserved.

  Please see the full Copyright clause at
  <http://www.w3.org/Consortium/Legal/copyright-software.html>

-->

<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
 xmlns:rtest='http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#'
      xmlns:dc='http://purl.org/dc/elements/1.0/'
>

<rtest:PositiveEntailmentTest rdf:about="
http://www.w3.org/2007/10/rif-tests/bld/entailment_example/Manifest001.rdf
">

   <rtest:status>PROPOSED</rtest:status>
   <!--rtest:approval rdf:resource="
http://www.w3.org/2005/rules/wg/wiki/SWC"/-->
   <dc:creator>rifwg</dc:creator> 
   <rtest:description>Example from RIF RDF and OWL Compatibility 
doc</rtest:description>

   <rtest:premiseDocument>
      <rtest:RDF-NT-Document 
rdf:about="www.w3.org/2007/10/rif-tests/bld/entailment_example/premises001.nt"/>
   </rtest:premiseDocument>

   <rtest:premiseDocument>
      <rtest:RIF-XML-Document 
rdf:about="www.w3.org/2007/10/rif-tests/bld/entailment_example/premises001.xml"/>
   </rtest:premiseDocument>

   <rtest:conclusionDocument>
      <rtest:RIF-XML-Document 
rdf:about="www.w3.org/2007/10/rif-tests/bld/entailment_example/conclusions001.xml"/>
   </rtest:conclusionDocument>

</rtest:PositiveEntailmentTest>

</rdf:RDF>


testcases\entailment_example\premises001.hrif
#
# Copyright World Wide Web Consortium, (Massachusetts Institute of
# Technology, European Research Consortium for Informatics and
# Mathematics, Keio University).
#
# All Rights Reserved.
#
# Please see the full Copyright clause at
# <http://www.w3.org/Consortium/Legal/copyright-software.html>
#
# Author: rifwg
#
# Description: 
#
# 
#

Forall ?x ?y ( ?x[rdf:type --> "nameBearer"^^rif:iri]  :- 
?x["hasName"^^rif:iri --> ?y] )



testcases\entailment_example\premises001.nt
#
# Copyright World Wide Web Consortium, (Massachusetts Institute of
# Technology, European Research Consortium for Informatics and
# Mathematics, Keio University).
#
# All Rights Reserved.
#
# Please see the full Copyright clause at
# <http://www.w3.org/Consortium/Legal/copyright-software.html>
#
# Author: rifwg
#
# Description: 
#
# 
#

_:x  hasName "a"^^xsd:integer .


testcases\entailment_example\conclusions001.hrif
#
# Copyright World Wide Web Consortium, (Massachusetts Institute of
# Technology, European Research Consortium for Informatics and
# Mathematics, Keio University).
#
# All Rights Reserved.
#
# Please see the full Copyright clause at
# <http://www.w3.org/Consortium/Legal/copyright-software.html>
#
# Author: rifwg
#
# Description: 
#
# 
#

Exists ?z ( ?z[rdf:type --> "nameBearer"^^rif:iri] )
Received on Thursday, 1 November 2007 18:54:45 GMT

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