The abstract execution model



next up previous
Next: The tool and Up: Elements of a Previous: Elements of a

The abstract execution model

  The central concepts in the abstract execution model are objects, messages and scenes. The class concept is also taken into account, but it is less central. The method concept is not part of the model. We will now describe each of the concepts of the model in greater details.

Objects: An object is a abstraction of part of the program state. The abstraction serves an as encapsulation of the state, and each object has its own identity which makes it unique in comparison with all other objects. This reflects the traditional understanding of objects in an OO model. The model is not explicit about fields in an object, but it is possible to declare how new objects are related to existing objects (global to, part of, associated with). In the model, object identity is handled by giving each object a unique name in a flat name space. Hereby each object can be easily referred. As an implication, reachability issues are ignored in the model. The class of each object is registered, but apart from this the class concept is not important in the model.

 

Objects are born through object provisions. Object provisions is a convenient mechanism which establish objects exactly when they are needed. An object provision declares/claims the existence of an object in addition to a certain relationship to other objects. The initial state of the object is described informally. If we need to access a part object P of an object Q, it can be done by `providing P and as a part of Q'. This compensates for the lack of field declarations in Q, and it allows us to introduce objects and object relations at the point in time, where they are needed in the dynamic course of the program. In an actual execution model it works the other way around: When Q is created we should be concerned with the creation of P too. An object provision may also be used to signal that the provided object P becomes interesting/necessary for our purposes at object provision time. In the actual execution model, P may have existed for a long time. The idea is here that an object provision is a somewhat magical introduction of an object ``onto the scene''. This is illustrated on figure 4.

Messages: Objects interact via message passing. In our current dynamic model only the message receiver is explicitly given. This corresponds to the static description of message passing, in which the sender object is given implicitly as `the current object'. However, it might be desirable if both the sender and the receiver could be given explicitly. The actual parameters of a message are also taken into account. Actual parameters may either be already provided object, new object provisions, or informally described values. Thus, expressions (here actual parameter expressions) have only limited power in our model.

 

We focus on ``vertical cuts'' of message passings in the model. I.e., we directly describe a chain of messages across the boundaries of abstraction barriers. This is shown in figure 5. The figure illustrates that a message M1 is sent from O1 to O2. Next O2 sends messages M2 and M3 to O3 and O4 respectively. Following that O4 sends a message M4 to O5. An additional structure, shown as rectangles on the figure, is introduced among the messages. All the messages in a rectangle belong to the same method. This is the only trace of methods in our model. Thus, when sending the message M1 from O1 to O2, a method is presumably located in O2 which sends messages M2, M3 and M2 (second time) to O3, O4 and O7 respectively.

Scenes: A scene is a pre-existing set of objects which we want to exist as the starting point for one or more scenarios. A scene can be characterized by a set of object-provisions. Object provisions which appear within a scenario add objects onto the scene.

As already mentioned, several aspects are described at an informal level in the dynamic model. Above we have seen that object states and more complicated expressions are not handled formally. Besides this, a number of informal aspects complements the formal aspects, in order to enhance intuitive understanding. Every message, object provision, and result of a message can be (and should be) described intuitively, in pure text. Such descriptions are called understandings. The understandings are in addition to the more formalized accounts, which are part of the dynamic model.



next up previous
Next: The tool and Up: Elements of a Previous: Elements of a



Kurt Noermark
Mon Feb 26 11:36:35 MET 1996