Re: mappings between SWRL and Boley proposal

On Wed, Mai 17, 2006, "Peter F. Patel-Schneider" <pfps@inf.unibz.it>
wrote:

> Here are two complete mappings between the proposal syntax and SWRL
> syntax.  I claim that, based on the proposal, that they are as good as any
> other.

What does this mean, "as good as any other"? Some of your 
suggestions are (I guess, deliberately) pretty strange. 
 
> Mapping from SWRL to Proposal Syntax
> 
> M[Antecedent( atom1 ... atomn )]  = Or ( M[atom1] ... M[atomn] )

Why do you map the conjunctive SWRL-Antecedent to a disjunction?
Is this intended to be a provocation? Of what?
Obviously, your mapping does not preserve satisfaction,
which is a requirement in the proposal.

Let me suggest another mapping based on an extended version of
the proposal syntax with optional typing. I'm using a restricted
concept of "desciption" including only classID, but it is
clear that we can also treat 'unionOf' and 'intersectionOf'
with the help of 'Or' and 'And'. Since we don't want to include
negation ('complementOf') for the purpose of this discussion, we 
cannot have a complete but only a partial mapping anyway.

Here is the extended proposal syntax with optional typing, where 
'G' stands for 'generic', 'D' for 'data' and 'O' for 'object':

Data     ::= value
Ind      ::= object
Var      ::= GVar | DVar |OVar 
GVar     ::= '?' name
DVar     ::= 'D-variable(' '?' name ')'
OVar     ::= 'O-variable(' '?' name ')'
TERM     ::= GTERM | DTERM | OTERM
GTERM    ::= Data | Ind | GVar | GExpr
DTERM    ::= Data | DVar | DExpr
OTERM    ::= Ind | OVar | OExpr
GExpr    ::= GFun '(' GTERM* ')'
DExpr    ::= DFun '(' TERM* ')'
OExpr    ::= OFun '(' TERM* ')'

Atom     ::= GAtom | DClassificationAtom | OClassificationAtom | 
             DPropertyAtom | OPropertyAtom | GEqualityAtom |
             OEqualityAtom | DatatypeAtom
             
GAtom    ::= genericRelID '(' GTERM* ')' 
GEqualityAtom ::= GTERM '=' GTERM
DClassificationAtom ::= datatypeID '(' DTERM ')'
OClassificationAtom ::= classID '(' OTERM ')'
OPropertyAtom ::= oPropertyID '(' OTERM OTERM ')'
DPropertyAtom ::= dPropertyID '(' OTERM DTERM ')'
OEqualityAtom ::= OTERM '=' OTERM
DatatypeAtom  ::= datatypePelID '(' DTERM* ')'

LITFORM  ::= Atom
QUANTIF  ::= 'Exists' Var+ '(' CONDIT ')'
CONJ     ::= 'And' '(' CONDIT* ')'
DISJ     ::= 'Or' '(' CONDIT* ')'
CONDIT   ::= LITFORM | QUANTIF | CONJ | DISJ
 
Then,

M[Antecedent( atom1 ... atomn )]  = And ( M[atom1] ... M[atomn] )
M[classID( i-object )]= classID ( M[i-object] )
M[datatypeID ( d-object )] = datatypeID ( M[d-object] )
M[individualvaluedPropertyID ( i-object1 i-object2 )] = 
individualvaluedPropertyID ( M[i-object1] M[i-object2] )
M[datavaluedPropertyID ( i-object d-object )] = datavaluedPropertyID (
M[i-object] M[d-object] )
M[sameAs ( i-object1 i-object2 )] = M[i-object1] = M[i-object2]
M[builtIn ( builtinID  d-object1 ... d-objectn )] = builtinID (
M[d-object1] ... M[d-objectn] )
M[individualID]	= individualID
M[dataLiteral]	= dataLiteral
M[I-variable( URIreference )] = URIreference
M[D-variable( URIreference )] = URIreference
M[classID] = classID
M[datatypeID] = datatypeID 

This pretty much preserves your mapping, but is more meaningful 
with respect to antecedent (and to the allowed forms of 
'descrioption', 'unionOf' and 'intersectionOf').

The extended proposal syntax with optional typing also
allows a faithful inverse mapping of typed atoms to SWRL.

-Gerd 


> To make this more self-contained, here are the two syntaxes:
> 
> Proposal Syntax:
> 
> Data     ::= value
> Ind      ::= object
> Var      ::= '?' name
> TERM     ::= Data | Ind | Var | Expr
> Expr     ::= Fun '(' TERM* ')'
> Atom     ::= Rel '(' TERM* ')' | TERM '=' TERM
> LITFORM  ::= Atom
> QUANTIF  ::= 'Exists' Var+ '(' CONDIT ')'
> CONJ     ::= 'And' '(' CONDIT* ')'
> DISJ     ::= 'Or' '(' CONDIT* ')'
> CONDIT   ::= LITFORM | QUANTIF | CONJ | DISJ
> 
> SWRL Syntax:
> 
> antecedent  ::= 'Antecedent(' atom* ')'
> atom        ::= description '(' i-object ')'
> 	      | dataRange '(' d-object ')'
> 	      | individualvaluedPropertyID '(' i-object i-object ')'
> 	      | datavaluedPropertyID '(' i-object d-object ')'
> 	      | sameAs '(' i-object i-object ')'
> 	      | differentFrom '(' i-object i-object ')'
> 	      | builtIn '(' builtinID  d-object * ')'
> i-object    ::= i-variable | individualID
> d-object    ::= d-variable | dataLiteral
> i-variable  ::= 'I-variable(' URIreference ')'
> d-variable  ::= 'D-variable(' URIreference ')'
> builtinID   ::= URIreference
> dataRange   ::= datatypeID | 'rdfs:Literal'
> description ::= classID
>               | restriction
>               | 'unionOf(' description* ')'
>               | 'intersectionOf(' description* ')'
>               | 'complementOf(' description ')'
>               | 'oneOf(' { individualID } ')'
> 
> OWL DL restrictions don't play a part in the mapping, and so are not
> included here.
> 
> SWRL also has
> 
> rule       ::= 'Implies(' [URIreference]  annotation* antecedent consequent ')'
> consequent ::= 'Consequent(' atom* ')'
> 
> but they don't play a part here.
> 

Received on Wednesday, 17 May 2006 11:32:24 UTC