Modeling Temporal Behavior at the Conceptual Level

Chiyaba Njovu and Ted W. Lawson
Department of Computer Science,
University of Wales, Cardiff,
PO Box 916,
Cardiff,
CF2 3XF,
UK
e-mail: C.Njovu@cs.cf.ac.uk, Ted.W.Lawson@cs.cf.ac.uk

Abstract

Object-oriented design methods such as OMT[8], Syntropy[3, 7], etc.view the modeling task from two perspectives namely the Structural and the Dynamic perspectives. While these models are adequate for representing current states of a situation, they are inadequate for representing situations where there is need to record not only the present state but also the evolution of such states over an object type's time[4, 9]. For these situations, there is need to explicitly represent temporal relationships. However, temporal relationships, though vital in world situations, have proved to be difficult to represent in models in an easily comprehensible way.
In this paper, we consider modeling temporal relationships explicitly using the constructs proposed in [6] as a way of resolving the inadequacies identified in both the structural and dynamic models of world situations. Specifically, we consider extensions to both the structural and dynamic aspects of the Syntropy object-oriented models to include constructs for temporal relationships, memories of event occurrences and object histories.

1 Introduction

Most Object-oriented design methods such as OMT [8], Syntropy [3], etc. view the modeling task from two perspectives namely the structural and the dynamic perspectives. The structural model describes the static structure of objects and their relationships to each other at a single moment in time [8] while the dynamic model represents the behavioral, "control", aspects of a situation at a particular moment in time [8, 3].

In the Syntropy method, for instance, the structural and dynamic models are combined into one model perspective, the essential model, which describes states of world situations in terms of object configurations, state changing events and the possible sequences of events [3]. While these models are adequate for representing the states of a situation at any one time, they are inadequate for representing situations where there is need to record not only the present state of a situation but also the evolution of such states with time [4, 9]. Such situations are inherently temporal in nature. A conceptual model of such situations would need to define the evolution of not only object types but also relationships with time.

In this paper, we consider temporal aspects of models of situations in which not only the present state is of interest but also past and future states. The concepts of event memories and behavioral histories of objects have been used as a way of resolving some of the inadequacies identified in both type views and statecharts.

2 Time Concepts and their Aggregates

At the conceptual level, there are three main time concepts namely time points, durations and intervals[1]. All other time concepts may be defined using a combination of these types. For modeling purposes, the three time types may either be used independently or as elements of a common temporal aggregate known as a timeline[5].

In temporal models, a distinction is often made between 'valid time' and 'transaction time[1, 9]. Valid times are associated with events that occur in the real domain of interest that the model portrays. Transaction time events are associated with the database activity that ensures that event occurrences in the real world are recorded by the system[2, 9]. Since essential models are models of situations in the real world, they are ideally independent of any system or software considerations. Therefore, all time notions in an essential model refer to valid times and not transaction times which are closely associated with models of software implementations.

3 Modeling Dynamics

3.1 Motivation

Temporal relationships have proved to be difficult to model[8]. The subject of dynamic modeling, which also includes temporal behavior, remains a subject of research concern. In this section, we outline some of the problems associated with temporal relationships, events and states. We illustrate our argument by considering a very simplified version of a loan administration system.

Consider a Loan Agency that administers loans to Clients by recording all loan applications received, processing all such applications and issuing loans to all those Clients whose applications have been approved. Furthermore, once the loans have been issued, the loans may have different repayment terms and the realization of each loan may also be different from its initial plans. For example, Clients' actual repayment times may either be earlier or later than planned.

From the loan system scenario described above, we identify Loan-Agency and Client as object types which may be linked by a product relationship such as 'borrows' or 'lends'. The product association called Loan between a Loan-Agency and its Clients may have several properties associated with it. Consequently, we choose to model the Loan association as an object type. (see Figure 1).

   Figure 1

Click here to zoom in.
Figure 1. Type View of a Loan System

Though incomplete, figure 1 is a type view representation of a loan system scenario showing object types,relationships and state types. The symbols and constructs used in figure 1 all follow the Syntropy Essential Model notation.

Figure 1 as it stands is not a precise model of our perceived reality, mainly because it fails to represent among other things the following facts:

In the same way that an object type in a type view is a generic description of all objects conforming to a type, so a statechart for an object type is a generic view of the behavior of all objects conforming to the type[3]. In order to represent the dynamic aspects of the Loan object type explicitly, there is need to identify events and their associated states over the entire lifetime of the object. If we consider the Loan relationship as being a product of the request event, then a loan may be associated with states such as Application, Just-Approved, In-Disbursement, etc. The changes from one state to the other are triggered by events. For example, an Approve event takes the loan object from its Application state to the Just-Approved state. A statechart for the loan object type as described above may be represented in Syntropy as given in figure 2.

   Figure 2

Figure 2. Statechart Instance of a Loan Object type

While a statechart as given in figure 2 resolves some of the problems identified in figure 1 such as the description of event consequences ( postconditions) and constraints on the validity of events(preconditions) [8, 3], it too fails to represent the following facts :

In particular, it fails to represent the fact that a Loan should have a memory of the events that it has undergone and the states that it has been in. i.e. a Loan is really a timeline object with states as shown in figure 3.

   Figure 3

Click here to zoom in.
Figure 3. A timeline representation of a loan object's temporal behavioral

We outline some of our proposals for resolving the temporal inadequacies in both the type views and statecharts. Full details of the proposed notation may be obtained in [6].

3.2 Representing Temporal Relationships

In order to represent relationships between objects and their states at different times, we need to explicitly qualify the associations linking object types to states types. This may be realized by combining association classes with a temporal qualification, an explicit notion of the lifetime of objects and a set of constraints which connect the lifetime, the qualifier attribute and the association interval. Using the proposed temporal extensions to the Syntropy essential model notation [6], part of the loan object type view diagram may be represented as shown in figure 4.

   Figure 4
Figure 4. Temporal Extensions to a Typical Type View diagram

4 Discussion

A good number of issues related to behavioral modeling and in particular, modeling temporal aspects of object behavior remain unresolved. Some of the issues for further investigations being:

References

[1] James Clifford and Thomas Isakowitz, "On the Semantics of Transaction Time and Valid Time in Bitemporal Databases", International Workshop on an Infrastructure for Temporal Databases, June 1993.

[2] James Clifford and Alexander Tuzhilin, editors, Recent Advances in temporal Databases, Springer Verlag, 1995.

[3] Steve Cook and John Daniels, Designing Object Systems: Object-Oriented with Syntropy, Prentice Hall, 1994.

[4] Christian S. Jensen, Richard T. Snodgrass and Michael D. Soo, "The TSQL2 Data Model", International workshop on an Infrastructure of Temporal Databases, 1994.

[5] Christian S. Jensen and Richard T. Snodgrass, "Semantics of Time Varying Information", University of Arizona Dept. of Computer Science Report TR 96-02, 1996.

[6] Ted Lawson and Chiyaba Njovu, "Explicitly Depicting Temporal Associations in Type View Models", (To appear).

[7] Guus J. Ramackers and Alexander A. Verrijn-Stuart, "Object Oriented Approach in Information Systems", In F. Van Assche, B. Moulin and C. Rolland, editors, Integrating Information System Perspectives with Objects, October 1991.

[8] J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, and W. Lorensen, Object Oriented Modeling and Design, Prentice Hall, 1991.

[9] R.T. Snodgrass, "Temporal Object-oriented Databases: A critical comparison", In Won Kim, editor, The Object Model, Interoperability and Beyond, Chapter 19, pp. 386-408, Addison Wesley, 1995.


Copyright © 1997, ER'97, Chiyaba Njovu, and Ted W. Lawson. All rights reserved.