ASGs are used to provide a visual representation of the program units (packages, tasks and subprograms) in an Ada software system.
The structure of Ada software elements is essentially a hierarchy. ASGs allow the software structure to be shown by more than a single hierarchy, by using two forms of decomposition:
where both of these forms of decomposition have the common concept that a symbol contains the other symbols, and the containment is shown graphically by one level of diagram, or several.
Both of these forms of decomposition can be used in a model. Both forms of decomposition can be used for the same Ada program elements in the same model. This means that there can be several symbols all referring to the same piece of Ada software structure.
ASGs only appear in the Implementation Domain.
The identities of ASGs (their diagram numbers) can contain alphanumeric characters. Also, they are not forced to be uppercase.
The decomposition of symbols is indicated by a . between their identities, so if C is part of B which is part of A, then the complete Number attribute of C will be A.B.C and is termed the fully qualified form of its identity. The identity of C is shown in ASGs as either C or A.B.C depending on the situation. The fully qualified identity is the true identity of a symbol and its corresponding description.
As an example of the two forms of decomposition, consider:
In this example:
but there is also an alternative route to the lowest-level ASG A.B.C:
So this means that there will be opportunities for many references to the same entity in an Ada program structure, as in the above example where:
These principles extend to the descriptions of diagram symbols, such as the package specification items that are one of the forms of description of the Package symbol (the other being an ASG). Extending the above example to include these package specifications produces:
The comments from the previous example apply here also, together with:
The Context ASG will contain the top-level packages in the system, each of which will have their identity in their Number attribute, such as:
Any of the packages in the Context ASG may contain other packages or tasks, where only the final part of their fully qualified identity will be shown in their symbols:
If any of these symbols are expanded into their own ASG, the Number attribute of the new ASG will be set to the fully qualified identity of the originating symbols and the new ASG will have a copy of the originating symbol which will be shown with its fully qualified identity, e.g.:
The above may be summarised as the following rules for the numbering of ASG symbols and diagrams:
So the Number attribute of an ASG will not be used as the basis for:
You can control whether the full Number attribute values are shown in ASGs in the same way that this is controlled for other notations:
but the defaults for ASG symbols will be as indicated in this section and its example figures.
An example ASG is:
The symbols available in ASGs are:
Symbol | Name | Description | Definition | Expansion |
---|---|---|---|---|
Comment | Makes a note anywhere in the diagram. Are always surrounded by * characters. Note: If you do not want Cradle to automatically add an * go to the Graphics Settings section of Project Setup and turn off the Automatically add asterisks to diagram's comment symbols option. | None | None | |
Boundary Point | A connection point for the initial transition to enter the initial state. | None | None | |
Picture | Allows you to choose the location of a GIF or JPEG image to be displayed as a diagram symbol or to be embedded in an existing diagram symbol. | None | None | |
Package | Representation of an Ada package specification or body. There is a class/object symbol in the Software Architecture Diagram (SAD) notation that is similar, but the characteristics of this Package symbol are unique to ASGs. | Package specification | ASG | |
Generic Package | Representation of an Ada generic package's specification or body. | Package specification | ASG | |
Foreign Package | Representation of an Ada program unit that is not elaborated in this model. | None | None | |
Task | Representation of an Ada task specification or body. There is a process/task symbol in the SAD notation that is similar, but the characteristics of this Task symbol are unique to ASGs. | Task specification | ASG | |
Task Type | Representation of an Ada task type specification or body. | Task specification | ASG | |
Subprogram | Representation of an Ada routine (procedure or function), There is a class/object routine symbol in the SAD notation that is similar, but the characteristics of this Subprogram symbol are unique to ASGs. | Subprogram specification | ASG | |
Generic Subprogram | Representation of an Ada generic routine. | Subprogram specification | ASG | |
Generic Subprogram Parameter | Representation of a generic formal subprogram to an Ada generic package. | Subprogram specification | none | |
Foreign Subprogram | Representation of a routine that is not elaborated in this model. | none | none | |
Data Object | Representation of an Ada data object, such as may be declared in a package or task specification or body. | Data object data definition | none | |
Data Type | Representation of a generic Ada data object, such as may be instantiation in a package or task specification or body. | Data object data definition | none | |
Task Entry | Representation of an entry that can be called in an Ada task. There is a process/task entry symbol in the SAD notation that is similar, but the characteristics of this Entry symbol are unique to ASGs. | none | none | |
Guarded Task Entry | Representation of an entry which has a conditional guard. | none | none | |
Selective Wait | Representation of a selective wait construct that provides a timeout for a collection of one or more entries in an Ada task. | none | none | |
Cloud | A representation of a program unit who type has not yet been defined. | none | none | |
Off Page Connector | A connector that can be used to link ASGs together. | none | ASG STC | |
Generic Connector | Similar to the Off Page Connector but used as to connect an instantiation of a generic package or task to the ASG containing the details of the generic package or task. | none | ASG | |
With from Spec | The inclusion of another Package or Task by the specification of a Package or Task, which allows the use of the public declarations of the referencing program unit. | none | none | |
With from Body | The inclusion of another Package or Task by the body of a package or task, which allows the use of the public declarations of the referenced program unit in the internal (private) declarations of the referencing program unit. | none | none | |
Call | Representation of a call by a part of one program unit to another program unit, such as between subprograms, or to task entries. There is a data link symbol in the SAD notation that is similar, but the characteristics of this Entry symbol will be unique to ASGs. | none | none | |
Conditional Call | Representation of a conditional call to a task entry. | none | none | |
Timeout Call | Representation of a call to a task entry that has a timeout. | none | none | |
Instantiation | Representation of the instantiation of a generic package, task type, data type or generic subprogram into an actual, package task, data object or subprogram. | none | none | |
Exception | A representation of an error condition that has occurred in a subprogram or task and which is received by a higher-level subprogram or task. | none | none | |
Data Couple | A piece of data that is passed in one direction in a Call, Conditional Call, Timeout Call or Instantiation, either from the caller or to the caller. | Couple data definition | none | |
Dialogue Couple | A piece of data that is passed in one direction in a Call, Conditional Call, Timeout Call or Instantiation and is returned in a possibly updated state to the caller. | Couple data definition | none | |
Item | Represents a requirement or system note in the diagram. | None | None | |
Context Item | Represents a requirement or system note in a diagram and is a container within which other object symbols can be drawn or attached. | None | None | |
Cross Reference Link | Represents a cross reference that exists between a pair of system notes/requirements. It can also represent a cross reference between a system note/requirement and a specification or data definition or system that describes the objects symbols that it connects. | None | None |
The Off-Page Connector and Generic Connector symbols provide convenient navigation links between ASGs, so that an Off-Page Connector and Generic Connector symbol can be expanded into the ASG whose identity is the same as the connector. Therefore, Off-Page Connector and Generic Connector symbols will always have a fully qualified identity in their Number attributes and will always display this complete fully qualified identity in the symbol shown in the ASG.