UL++ is an object oriented language to model real time system with timed automata. In our model, we use processes which have states. To model a system in UL++ , one has to derive the primitives classes ConcurrentProcess, Process and SuperState. The idea is as following :
Then, as we use objects, we need to connect them together and we need to instanciate them. The scope of variables is always local and private, so that we use a data interface to instanciate the composite objects, which is a simplified version of constructors. To connect the composite objects (how to make a transition to a superstate for example), we use control interfaces which are mainly entries and exits on superstates.
Here is how it looks like :
The principle is to give interfaces to independant objects and them
to develop them and connect them in a modular way.
Composition rules
We summarize and complete what we have said above
in the following table :
class | initial state | entries/exits | State objects | Process objects |
ConcurrentProcess | yes | |||
Process | yes | yes | ||
SuperState | yes | yes |
Then we have rules for the data as well, saying
what kind of data is allowed in which class :
class | clock | channel | static data object |
ConcurrentProcess | yes | yes | yes |
Process | yes | yes | |
SuperState | yes |
A static data object is one of : Integer, BoundedInteger,
Boolean, Array.
In the data interface (which appears in VisualUL)
the user will find int which is an integer constant, a parameter
to initialize the classes.