Dealing with compound checkpoints in EARL

Status of this document

This is VERY rough scribble by Charles McCathieNevile. It is currently likely to contain errors, and I might decide even I don't agree with it shortly. It's published in the interests of letting people read this stuff while it is fresh in my mind. At some stage I will try to turn this into a more easily readable form, that goes through the pieces bit by bit with nice explanations.

This was last modified $Date: 2004/09/15 16:27:59 $

Comments are very welcome and should be sent to the publicly archived mailing list w3c-wai-er-ig@w3.org which I read...

Declaring the equivalence

Saying that one test case can be assumed from two others. For example, We might declare that passing two tests http://example.org/#cp1T1 and http://example.org/#cp1T2 is equivalent to passing the test http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-identify-lang

We can write down the information about how the checkpoints are related as follows:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:owl="http://www.w3.org/2002/07/owl#">
  <owl:Ontology rdf:about="">
    <rdfs:comment>This bit of owl says that passing a couple of named tests is equivalent to passing
       another named test</rdfs:comment>
    <dc:creator>
      <foaf:Person>
        <foaf:mbox rdf:resource="mailto:charles@w3.org"/>
        <foaf:name>Charles McCathieNevile</foaf:name>
      </foaf:Person>
    </dc:creator> 
  <owl:Class>
    <owl:equivalentClass>

<!-- the checkpoint that is a combination -->
      <owl:intersectionOf rdf:parseType="Collection">
        <owl:Restriction>
          <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#result" />
          <owl:someValuesFrom rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#pass" />
        </owl:Restriction>
        <owl:Restriction>
          <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#testCase" />
          <owl:someValuesFrom rdf:resource="http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-identify-lang"/>
        </owl:Restriction>
      </owl:intersectionOf>

    </owl:equivalentClass>
    <owl:intersectionOf rdf:parseType="Collection">

<!-- first "sub" point -->
      <owl:intersectionOf rdf:parseType="Collection">
        <owl:Restriction>
          <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#result" />
          <owl:someValuesFrom rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#pass" />
        </owl:Restriction>
        <owl:Restriction>
          <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#testCase" />
          <owl:someValuesFrom rdf:resource="http://example.org/#cp1T1" />
          </owl:Restriction>
        </owl:intersectionOf>

<!-- second "sub" point -->
      <owl:intersectionOf rdf:parseType="Collection">
        <owl:Restriction>
          <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#result" />
          <owl:someValuesFrom rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#pass" />
        </owl:Restriction>
        <owl:Restriction>
          <owl:onProperty rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#testCase" />
          <owl:someValuesFrom rdf:resource="http://example.org/#cp1T2" />
          </owl:Restriction>
        </owl:intersectionOf>

<!-- add more here if you need them ... -->

      </owl:intersectionOf>
  </owl:Class>
</rdf:RDF>

(@@ should explain in more detail how this works somewhere - for example add an explanation of how to derive double-A conformance)

If we have an OWL reasoner, it will then figure this stuff out automatically (that's why we wrote it in owl, instead of using some special purpose properties that only EARL implementors will understand). If we don't have an OWL reasoner handy, we might want to work out how to apply these rules.

The basic principle is that if we declare the relationship between testcases above, we want to say that anything that passes http://example.org/#cp1T1 and http://example.org/#cp1T2 passes http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-identify-lang (and in addition, since it is an inferred results we should note that the mode is heuristic, and the Assertor is our little rule...)

soooo....

{ [ a earl:Assertion ; earl:testSubject ?subj ; earl:result earl:pass ; earl:testCase tests:cp1T1 ] . 
  [ a earl:Assertion ; earl:testSubject ?subj ; earl:result earl:pass ; earl:testCase tests:cp1T1 ]
 } 
=> {[ a earl:Assertion ; earl:testSubject ?subj ; earl:result earl:pass ;
        earl:testCase wcag:tech-identify-lang ; earl:mode earl:heuristic ; earl:assertor <foo> ] } .

(This rule is untested - I am just scribbling it for now.) Anyway, what we really want is a general rule that will look at these declarations, and make the specific rule they imply. So the first thing we need is to get the owl rules encoded in cwm (this stuff is built into Jena already).

@prefix owl <http://www.w3.org/2002/07/owl#>

# make if an equivalentClass is declared, anything in the first class is in the second Class
{ owl:Class owl:equivalentClass ?someClass ; ?equiv a owl:Class } 
=> { { ?something a ?equiv } => { ?something a ?someClass } . } .

# a rule for owl:Restriction with one restriction, one possible result
{ [ owl:Restriction owl:onProperty ?prop ; owl:someValues#From ?result ; a ?thisClass ] } =>
{ { ?athing ?prop ?result } => { ?athing a ?thisClass } . } .

# a rule for owl:intersectionOf
{  [owl:intersectionOf

I wonder how you could do owl:allValuesFrom

@@ do unionOf, intersectionOf

$Id: logic.html,v 1.5 2004/09/15 16:27:59 charles Exp $