Re: unambiguousProperty

"McBride, Brian" wrote:
> 
> Is there a way in DAML to express the fact that a set of
> properties identify a resource, e.g.  that the combination
> of number, street name, address line 2, address line 3, city
> state and country uniquely identify an address.  A concept of
> a compound property might do it, but I couldn't find anything
> like that.

Hmm... lemme try...

It's straightforward to do with a horn-clause style rule:

 (forall (?a1 ?a2
          ?n ?sn ?al2 ?al3 ?ci ?st ?co)
   (implies
     (and (rdf:type ?a1 brian:Address)
          (rdf:type ?a2 brian:Address)

          (brian:number ?a1 ?n) (brian:number ?a2 ?n)
          (brian:streetName ?a1 ?sn) (brian:streetName ?a2 ?sn)
          (brian:addressLine2 ?a1 ?al2) (brian:addressLine2 ?a2 ?al2)
          (brian:addressLine3 ?a1 ?al3) (brian:addressLine3 ?a2 ?al3)
          (brian:city ?a1 ?ci) (brian:city ?a2 ?ci)
          (brian:state ?a1 ?st) (brian:state ?a2 ?st)
          (brian:country ?a1 ?ci) (brian:country ?a2 ?ci)
          )
      (daml:equivalentTo ?a1 ?a2)
  )

But this is probably worth an idiomatic form...

  <daml:UnambiguousProperty id="addressStruct">
    <daml-bis:structPropertyOver parseType="daml:collection">
      <daml:Property resource="...number"/>
      <daml:Property resource="...streetName"/>
      ...
    </daml-bis:structPropertyOver>
  </daml:Property>

where the semantics of structPropertyOver entail the
rule above.

an aside... I'm starting to think we should have
domain-specific forms of the algebraic properties
(transitive, unique, unambiguous, ...).
So in stead of (or perhaps: in addition to)
  <daml:UnambiguousProperty ID="addressStruct"/>
we'd use
  <rdf:Property ID="addressStruct">
    <daml-bis:unambiguousOver resource="...Address"/>
  </rdf:Property>

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Thursday, 30 November 2000 11:06:39 UTC