Re: Restricted inverse relations

From: Dan Connolly (
Date: 10/09/00

[Is there some particular reason why this comment
isn't shared with the public?]

Alexander Maedche wrote:
> Hi,
> DAML supports only expressing inverse relation at the
> global property level (
> <rdfs:Property rdf:ID="child">
>  <daml:inverseOf rdf:resource="#parent"/>
> </rdfsProperty>
> That's nice, however, in realistic application scenarios
> expressing inverse relations has to be restricted to specific domain /
> ranges
> of relations, as for example it is possible in F-Logic:
> FORALL Org1, Proj1
>  Proj1:Project[financedBy ->> Org1] <->
>   Org1:Organization[finances ->> Proj1].
> How is this reflected by DAML?

I can think of a few ways to approach this.

It's not one of the idioms directly specified in this
(v 1.1 2000/10/07 03:21:17) draft of daml-ont.daml,
but we can make up our own RDF idiom for it...

Start ala

<Property ID="financedBy"/>
<Property ID="finances"/>
<Class ID="Project"/>
<Class ID="Organization"/>

Then perhaps define subProperties that are inverses of each other:

<Property ID="projectFinancedByOrganization">
  <subPropertyOf resource="financedBy"/>
  <domain resource="#Project"/>
  <range resource="#Organization"/>
  <inverse resource="#organizationFinancesProject"/>

<Property ID="organizationFinancesProject">
  <subPropertyOf resource="finances"/>
  <range resource="#Project"/>
  <domain resource="#Organization"/>
  <inverse resource="projectFinancedByOrganization"/>

But this doesn't get us very far; it allows us
to go from
	projectFinancedByOrganization(?p, ?o)
	organizationFinancesProject(?o, ?p)
and to
	financedBy(?p, ?o)
and to
	finances(?o, ?p)

but there's nothing that allows us to go from
	financedBy(?p, ?o)
	type(?p, Project)
	type(?o, Organization)
	projectFinancedByOrganization(?p, ?o)

So let's make up a construct that allows us to do that:

<Property ID="financedBy">
      <ama:ifSubjectInDomain resource="#Project"/>
      <ama:ifObjectInDomain resource="#Organization"/>
      <ama:thenSpecializeTo resource="#projectFinancedByOrganization"/>

and similarly for finances.

Then bind the ama: prefix to a namespace that you make up,
specified ala...

  <Property ID="ifSubjectInClass">

  <Property ID="ifObjectInClass">

  <Property ID="thenSpecializeTo">
    <comment>if type(?gen, daml:Property)
	and qualifiedBy(?gen, ?qual)
	and ifSubjectInClass(?qual, ?domain)
	and ifObjectInClass(?qual, ?range)
	and thenSpecializeTo(?qual, ?specl)

	and ?gen(?subj, ?obj)
	and rdf:type(?subj, ?domain)
	and rdf:type(?obj, ?range)

	then ?specl(?subj, ?obj)

If that idiom becomes useful/popular, it could be
included in a future revision of DAML.

Another approach altogether is to add a general
rules facility ala SHOE to DAML. My earlier attempt[1]
to do this was too contorted, but maybe there's
a less contorted way to go about it.

[1] Transforming SHOE to RDF

Dan Connolly, W3C

This archive was generated by hypermail 2.1.4 : 03/26/02 EST