[PRL] may be

David H. Lorenz lorenz at ccs.neu.edu
Wed Nov 5 22:25:12 EST 2003


There are actually 3 kinds of relationships:

R1: C1 must-be-contained-in C2
R2: C1 may-acquire-from C2
R3: C1 is-possibly-contained-in C2

R1 and R3 are derived from the class graph, which includes
direct-subclass-of edges, is-a-part-of edges, and an
additional annotation of root classes.  Root classes are classes
whose instances can exist as "stand-alone" objects.  Instances
of all other non-root classes can only exist as components of
other objects (i.e., can never exist as "stand-alone" objects).

R1 means that an instance of C1 must be contained in an instance of C2,
and can therefore safely acquire features from C2.
R3 means that an instance of C1 may be contained in an instance of C2,
but the language designer provides a more conservative relationship
R2,  R1 \subseteq R2 \subseteq R3,  which specifies when an instance
of C1 is permitted to acquire, with a guard, features from C2.

For (C1,C2) \in R1: C1 can safely acquire (without a guard) from C2.
If (C1,C2) \not\in R3, then acquisition in not possible at all.
If (C1,C2) \in R3 but \not\in R2, acquisition is possible but disallowed.
For (C1,C2) \in R2: C1 may and is permitted to acquire, with
a guard, from C2.

The definition of R2 is the paper is one reasonable example,
and the discussion is independent for what the precise definition is.

-- David


On Wed, 5 Nov 2003, William D Clinger wrote:

WDC> To add to what Mitch said:  Karl's concise definition may coincide
WDC> with the definition in Section 4.2 of the paper, but David said
WDC> that definition was just one example of a "may" relation that the
WDC> language designer might use to specify the semantics of environmental
WDC> acquisition.  In other words, section 4.2 was intended to give an
WDC> exemplary definition, not a prescriptive definition.
WDC>
WDC> Will
WDC> _______________________________________________
WDC> PRL mailing list
WDC> PRL at lists.ccs.neu.edu
WDC> https://lists.ccs.neu.edu/bin/listinfo/prl
WDC>

-- 
David H. Lorenz, Assistant Professor           (617) 373-2076 FAX 5121
College of Computer and Information Science,        lorenz at ccs.neu.edu
Northeastern University, Boston MA 02115   www.ccs.neu.edu/home/lorenz


More information about the PRL mailing list