Re: Simple Example, How To Model It In RM

From: Tony Andrews <andrewst_at_onetel.com>
Date: 29 Jun 2005 09:56:31 -0700
Message-ID: <1120064191.617967.251970_at_g14g2000cwa.googlegroups.com>


Neo wrote:
> Could some post a RM script equivalent to the following xrdb script?
>
> // Create type person and make it an item of main directory.
> // Note: "inst" is short for instance.
> (CREATE type inst *person & dir item it)
>
> // Create persons john, mary and sue.
> (CREATE person inst *john)
> (CREATE person inst *mary)
> (CREATE person inst *sue)
>
> // Create verb to relate things.
> (CREATE verb inst *friend)
> (CREATE verb inst *like)
> (CREATE verb inst *because)
>
> // Create relationships between persons, etc.
> (CREATE john friend mary)
> (CREATE mary friend john)
> (CREATE sue like john because (mary friend john))
>
> // Why does Sue like John?
> // Returns (mary friend john).
> (SELECT sue like john because *)
>
> // What is the relationship between john and mary?
> // Returns friend.
> (SELECT john * mary)
>
>
> To implement above, copy and paste into xrdb's input box and press
> submit button. To view the data, expand tree node labeled "person". For
> more info, see www.xrdb.com/example

I don't think this design makes sense. "Because" is not a verb, it is a conjunction. You cannot (should not be able to) say "Sue because John", nor can you say "(Sue like John) friend (Sue like Mary)".

So you now have 5 "types":

Do you agree? There is no point in trying to replicate a flawed design in RM!

Also, do you expect to be able to handle more complex statements like "((Sue likes John) and (Sue likes Mary)) because (Mary isFriendOf John)"? Received on Wed Jun 29 2005 - 18:56:31 CEST

Original text of this message