[topicmapmail] AsTMa! as TMCL

Robert Barta rho@bigpond.net.au
Tue, 17 Dec 2002 11:31:34 +1000


On Mon, Dec 16, 2002 at 09:17:54AM +0000, Kal Ahmed wrote:
> > then you simply use a "quantified quantifier" (I like that one):
> >
> > exists{11} [ (is-player-in)
> >              team   : flying-kangaroos
> >              player : * ]
> > and
> > exists{2}  [ (is-sub-in)
> >              team   : flying-kangaroos
> >              player : * ]
> >
> 
> OK. I think that addresses a number of use cases that I had in mind.But I 
> would still prefer to see an extension of the "quantified quantifier" syntax 
> to allow it to be applied to individual association roles.

If I remember it correctly you wanted to specify "a child has exactly two parents"
in relationship

   (are-parents-of)
   parent : diana charles
   child  : william

No association with less than 2 or more than 2 such players like in

   (are-parents-of)
   parent : diana dianas-lover12 charles charles-lover13
   child  : william

should occur?

Since the first is equivalent (hopefully :-) with

   (are-parents-of)
   parent : diana
   parent : charles
   child  : william

we could write already

   forall $a [ (are-parents-of) ]
      => exists $a ] (are-parents-of)
                     parent : *
                     parent : *
                     child  : * [ is-reified-by child-has-two-parents

The ][ brackets (anyone with a better symbol?) indicate "that way and 
nothing more". If you want a special syntax, we could extend

   forall $a [ (are-parents-of) ]
      => exists $a ] (are-parents-of)
                     parent{2} : *
                     child     : * [

to be equivalent with child-has-two-parents.

I'll think it through.

\rho