Re: plays role

Pedro Szekely ([email protected])
Thu, 18 May 1995 16:08:28 PDT

Hi,

It would be interesting to give this test to Pablo and Ewald also, and see who
gets the highest score :)

> Once again we've run into the infamous is_like/plays_role distinction.
> In order to better understand the two mechanisms, we've put together
> a few questions. The only example of plays_role that we have seen is the
> guides attribute in object Presentation. Could someone from ISI please
> answer the following questions in the context of that example? Thanks.
>
> Given:
> MM_Object* pres = model_server->create("Presentation",
> Presentation);
> MM_Object* p1 = model_server->instantiate("Presentation",
> pres);
> MM_Object* p2 = model_server->instantiate("Presentation",
> p1);
>
> p1->set_object(Guides, ...);
>
> After this sequence of statements, which of the following are true:
>
> a) is-like(p1,pres)
> b) is-like(p2,pres)
> c) is-like(p2,p1)
> d) plays-role(p1,pres)
> e) plays-role(p2,pres)
> f) plays-role(p2,p1)
>
The following are true:
a) and c) by definition of instantiation.
b) good question. Maybe the answer should be TRUE here, and there should be
another method, called say is_like_direct, for which the answer should be
false.

Not true: d) e) and f).

> We took the existence of plays-role to mean that we could change the
> guides attribute of a presentation and still be "is-like" a
> presentation.
>
Not sure I understand this. You can change the is-like of a guide to point to
any other guide, and not lose track of the plays role pointer if one is
defined.

> Now say that we did the following:
>
> p1->set_object(x_origin, ...)
>
> Assuming that in the def of Presentation there is the line:
>
> is_like inherits(x_origin)
>
> which of the following are true:
>
> a) is-like(p1,pres)
> b) is-like(p2,pres)
> c) is-like(p2,p1)
> d) plays-role(p1,pres)
> e) plays-role(p2,pres)
> f) plays-role(p2,p1)
>
This sounds like a trick question, because the anwers don't have anything to
do with the question. Say you did p1->set_object(x_origin, O)

a) p1.x_origin = O
b) p2.x_origin = O

If x_origin was a part attribute then b) would be false.

Pedro Szekely
USC/ISI, 4676 Admiralty Way, Marina del Rey, CA 90292
Phone: 310/822-1511, Fax: 310/823-6714
URL: http://www.isi.edu/isd/szekely.html