This is an old revision of the document!
Communication diagrams
Agents
There are two kinds of agents in Alvis. Active agents perform some activities and are similar to tasks in Ada programming language. Each of them can be treated as a thread of control in a concurrent or distributed system. On the other hand, passive agents do not perform any individual activity, and are similar to protected objects (shared variables). Passive agents provide mechanism for the mutual exclusion and data synchronisation.
A communication diagram is a hierarchical graph whose nodes may represent both agents (active or passive) and parts of the model from the lower level. They are the only way in the Alvis modelling language, to point out agents that communicate one with another. Moreover, the diagrams allow programmers to combine sets of agents into modules that are also represented as agents (called hierarchical agents).
Fig. 1. From left: active agent, passive agent, hierarchical agent
Active agents are drawn as rounded boxes while passive ones as rectangles. An agent's identifier (name) is placed inside the corresponding shape. The first character of the identifier must be an upper-case letter. Other characters (if any) must be alphabetic characters, either upper-case or lower-case, digits, or an underscore. Alvis identifiers are case sensitive. Moreover, the Alvis keywords cannot be used as identifiers. Names of agents that are initially activated (represent running processes) are underlined.