W3C home > Mailing lists > Public > public-cwm-talk@w3.org > July to September 2005

Re: use of constraints

From: <jos.deroo@agfa.com>
Date: Thu, 18 Aug 2005 23:08:21 +0200
To: jos.deroo@agfa.com
Cc: public-cwm-talk@w3.org
Message-ID: <OF44F390EB.3604D4D2-ONC1257061.007395E4-C1257061.00741997@agfa.com>

dunno what I did wrong in test sequnce, but now cwm is happy with
the => direction as well when using @forAll :X.

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




Jos De_Roo/AMDUS/MOR/Agfa-NV/BE/BAYER@AGFA
Sent by: public-cwm-talk-request@w3.org
18/08/2005 22:49

 
        To:     public-cwm-talk@w3.org
        cc:     (bcc: Jos De_Roo/AMDUS/MOR/Agfa-NV/BE/BAYER)
        Subject:        use of constraints



assume one calls
  {set-of-triples} => {}.
a constraint.
 
I found constraints quite useful
to write rules to detect inconsistencies
e.g.
  {?Y owl:disjointWith ?Z. ?X a ?Y, ?Z} => {}.

and to use single triple constraints as rule premise
e.g.
  {?X :cp :hipInjury. {?X :fracture :femur} => {}}
   => {?X :contusion :hip}.
so that given
  :Ann :cp :hipInjury.
  {:Ann :fracture :femur} => {}.
one could derive
  :Ann :contusion :hip.
and if it would somehow be the case that
  :Ann :fracture :femur.
then one can clearly detect that inconsistency.

cwm doesn't seem to be happy with that..


ah-ha! cwm seems to be happy when given
  @forAll :X.
  {:X :cp :hipInjury. {} <= {:X :fracture :femur}}
   => {:X :contusion :hip}.

  :Ann :cp :hipInjury.
  {} <= {:Ann :fracture :femur}.

to answer
    :Ann     :contusion :hip .

for query
  []
  q:select {?P :contusion ?G};
  q:where  {?P :contusion ?G}.

and I'm wondering about that..


-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/
Received on Thursday, 18 August 2005 21:08:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:02 GMT