Modeling capsule-based models

To develop a system, you should first create a model of the system. Models represent the system at an abstract level and can hide unnecessary details. They describe the composition and operation of the system and are the basis for the implementation. A model either contains or generates all the implementation detail that the system requires to run. Using the Unified Modeling Language (UML), you can capture and communicate software designs with a common set of notations.

Before you begin

Rational Software Architect RealTime Edition technical support

UML uses visual notations to describe various views of an object model. Classes are the fundamental building block of this object model. When you model a system by using capsules, active objects, which are known as capsules, represent the components of the system. Capsules are objects that encapsulate data, behavior, and the thread of execution.

Capsule-based systems work by passing messages between capsules. Each capsule has several states, and messages that pass between the capsules can trigger a transition from one state to another. An advantage of the message-based interfaces is that a capsule has no knowledge of the environment outside of these interfaces, which makes a capsule more distributable, reusable, and robust than regular objects.

You can design and model an application by using diagrams that describe the abstract structure, behavior, and configuration of the system. The diagrams show how the system works and how the components work together to produce the final application. The system provides the functionality to transform the model with your added behavioral snippets into generated source code. You typically use the following diagrams to model capsule-based systems:
  • Class diagrams, which describe the capsules in the system, and also used for detailing the passive classes (data classes) and protocols
  • Capsule-based structure diagrams, which specify the interface and internal structure of the capsules
  • Capsule-based state diagrams, which describe the high-level behavior of the capsules
  • Capsule-based sequence diagrams, which show the interaction among the objects at run time, clarify the roles of objects in a flow, and provide basic input for determining class responsibilities and interfaces

By using capsules and the formal semantics of the capsule structure, you can create executable models by generating and compiling the corresponding code, and running a complete implementation based on the model that contains the capsules.


Feedback