Re: Simple Example, How To Model It In RM
Date: Thu, 30 Jun 2005 10:41:23 +0100
Message-ID: <42c3bebb$0$23688$db0fefd9_at_news.zen.co.uk>
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
>
John Received on Thu Jun 30 2005 - 11:41:23 CEST