Corese Log - 21/02/2007

Olivier CORBY

21/02/2007

Corese Log

Corese and OWL

Created : 2007-02-21

Corese process subset of OWL Lite, but  equivalentProperty and sameAs.
Statements processed by Corese are given by the abstract syntax grammar below (start rule is STAT).
A class cannot be, at the same time, an intersection and an union.

STAT ::=
	transitive | symmetric | inverse | 
	class name unionOf list class name | 	// only class name with union
	class name equivalentClass DEF2 |	// no class name with equivalentClass
	property name (rdfs:domain | rdfs:range ) 
		(unionOf | intersectionOf) list class name |
	DEF
DEF ::=
	class name
	DEF2
DEF2 ::=
	class subClassOf DEF |
	class intersectionOf list DEF |
	restriction onProperty P REST
REST ::=
	allValuesFrom DEF |
	someValuesFrom DEF |
	hasValue VALUE |
	cardinality VALUE |
	minCardinality VALUE |
	maxCardinality VALUE

OWL statements are compiled into Corese RDF Rules


allValuesFrom

class Human
  subClassOf
    Restriction
      onProperty parent
      allValuesFrom Human

compiled into :

{
  ?x rdf:type c:Human
  ?x c:parent ?y
  filter (! (?y <=: c:Human))
}
=>
{
  ?y rdf:type c:Human
}

someValuesFrom

someValuesFrom is checked by a rule and generates an error if not true :

class Human
  subClassOf
    Restriction
      onProperty parent
      someValuesFrom Woman

compiled into :

{
  ?x rdf:type c:Human
  optional {
    ?x c:parent ?y
    ?y rdf:type c:Woman
}
  filter (! (bound(?y)))
}
=>
{
  ?x rdf:type cos:Error       
  // this generates a warning (a message) but ?x is not really typed to cos:Error
}

Recursive definitions

Recursive definitions are processed :

class Human 
  subClassOf
    Restriction
      onProperty parent
      allValuesFrom
        class
	  intersectionOf 

	    Restriction

	      onProperty pp
	      someValuesFrom cc

	    Restriction

	      onProperty qq
	      allValuesFrom tt
rule #1

{
  ?x rdf:type Human
  ?x c:parent ?y
  optional {
    ?y c:pp ?z
    ?z rdf:type cc
}
  filter (!(bound(?z)))
}
=>
{
  ?x rdf:type cos:Error
}
rule #2

{
  ?x rdf:type Human
  ?x c:parent ?y
  ?y c:qq ?z
  filter (! (?z <=: tt))
}
=>
{
  ?z rdf:type tt
}

other owl:Restriction

cardinality are processed in check mode, i,e, generate an error if not true for an instance (like someValuesFrom)

hasValue generates the value if it is missing on an instance (also in allValuesFrom) or generate an error if value is missing (in someValuesFrom)


equivalentClass

Generate an equivalence between the class and it's definition :

class equivalentClass restrictions :

In this case, Corese generates both rules (1 and 2)


domain range

class name
  rdfs:domain
    unionOf list C1 C2
  rdfs:range
    unionOf list C3 C4

Transitive closure

Transitive closure takes subPropertyOf hierarchy into account, but  along only one subProperty path :

Transitive P
  P1 subPropertyOf P
  P2 sunPropertyOf P

P1, P2 and P generate P by transitivity

Transitive P
Transitive Q
  P1 subPropertyOf P
  P1 subPropertyOf Q
  P2 subPropertyOf P
  P2 subPropertyOf Q

P1, P2 and P generate P by transitivity but not Q (single inheritance of transitivity)
This case should be handled by a rule if needed.