Simple Example, How To Model It In RM

From: Neo <neo55592_at_hotmail.com>
Date: 29 Jun 2005 08:44:07 -0700
Message-ID: <1120059846.937064.161340_at_g49g2000cwa.googlegroups.com>



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 Received on Wed Jun 29 2005 - 17:44:07 CEST

Original text of this message