Cradle from 3SL, the complete Model Based Systems Engineering Toolsuite, specialising in requirements management, requirements capture, model based systems engineering and for systems engineering software, support and consultancy, the logical choice: Cradle from 3SL.
login Register forgot password or username?
Search:         

Welcome to 3SL Reference Section

ADA Structure Graph Ada Structure Graph (ASG)

Ada Structure Graph (ASG)

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:

  • Multiple ASGs, where some ASG symbols can be expanded into ASGs at lower and lower levels, the successive ASG levels showing more detailed view of progressively smaller parts of the system
  • Nesting symbols inside each other within ASG diagrams

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.

Numbering of ASGs

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:

Example of ASG decomposition

In this example:

  1. ASG A contains a single package A, so the value of its Number attribute will be A
  2. Package A in ASG A contains a package B, so the value of this symbol's Number attribute will be the fully qualified identity A.B
  3. Package B inside package A in ASG A can be decomposed into an ASG, so the value of the ASG's Number attribute will be the fully qualified identity A.B
  4. Package B inside package A in ASG A contains a package C, so the value of this symbol's Number attribute will be the fully qualified identity A.B.C
  5. Package C inside package B inside package A in ASG A can be decomposed into an ASG, so the value of the ASG's Number attribute will be the fully qualified identity A.B.C

but there is also an alternative route to the lowest-level ASG A.B.C:

  1. ASG A.B contains a single package A.B and so the value of its Number attribute will be A.B
  2. Package A.B in ASG A.B contains a package C, so the value of this symbol's Number attribute will be the fully qualified identity A.B.C
  3. Package C inside package A.B in ASG A.B can be decomposed into an ASG, so the value of the ASG's Number attribute will be the fully qualified identity 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:

  1. Package A appears as:
  • An ASG A
  • A symbol A in ASG A
  1. Package A.B appears as:
  • A symbol B inside a symbol A in ASG A
  • An ASG A.B
  • A symbol A.B in ASG A.B
  1. Package A.B.C appears as:
  • A symbol C inside a symbol B inside a symbol A in ASG A
  • A symbol C inside a symbol A.B in ASG A.B
  • An ASG A.B.C
  • A symbol A.B.C in ASG A.B.C

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:

ASG including Package specifications

The comments from the previous example apply here also, together with:

  1. Package A in ASG A contains a package B, so the value of this symbol's Number attribute will be the fully qualified identity A.B and the Number attribute of its package specification will also be A.B
  1. The package A.B also exists as the symbol A.B in the ASG A.B and so the same package specification A.B can also be accessed from this symbol A.B
  2. Package B inside package A in ASG A contains a package C, so the value of this symbol’s Number attribute will be the fully qualified identity A.B.C and the Number attribute of its package specification will also be A.B.C
  3. The package A.B.C also exists as the symbol C inside the symbol A.B in the ASG A.B and so the same package specification A.B.C can also be accessed from this symbol C
  4. The package A.B.C also exists as the symbol A.B.C in the ASG A.B.C and so the same package specification A.B.C can also be accessed from this symbol A.B.C

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:

Example Context ASG

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:

Example Context ASG Diagram

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.:

ASG when expanding symbols

The above may be summarised as the following rules for the numbering of ASG symbols and diagrams:

  1. The fully qualified identity of a symbol is the dot separated concatenation of:
  • The fully qualified identity of the symbol containing the symbol and
  • The identity of the symbol itself
  1. The Number attribute of a symbol is always equal to its fully qualified identity
  2. Symbols that are not contained in other symbols always display their fully qualified identity
  3. Symbols that are contained in another symbol only show the last part of their fully qualified identity
  4. The top-level ASG has a fully qualified identity: C
  5. The fully qualified identity of an ASG is the same as the fully qualified identity of its originating symbol
  6. The Number attribute of a diagram is always equal to its fully qualified identity
  7. ASGs always show their fully qualified identity
  8. The fully qualified identity of the specification for an ASG symbol is the same as the fully qualified identity of its originating symbol
  9. The Number attribute of a specification is always equal to its fully qualified identity
  10. A specification may appear as:
  • One symbol in one ASG
  • Multiple symbols in one ASG
  • One symbol in multiple ASGs
  • Multiple symbols in multiple ASGs
  1. An ASG may be referenced by:
  • One symbol in one ASG
  • Multiple symbols in one ASG
  • One symbol in multiple ASGs
  • Multiple symbols in multiple ASGs

So the Number attribute of an ASG will not be used as the basis for:

  1. The Number attributes of any symbols in the ASG
  2. The Number attributes of any child ASGs of symbols in that ASG
  3. The Number attribute of any specification items associated with any of the symbols in the ASG

You can control whether the full Number attribute values are shown in ASGs in the same way that this is controlled for other notations:

  1. The Always show full symbol numbers checkbox in Edit > Preferences > UI Control > Diagrams
  2. The Show full symbol number checkbox in the symbol graphics properties shown in the Control sidebar when a diagram is being edited

but the defaults for ASG symbols will be as indicated in this section and its example figures.

Symbols

An example ASG is:

Example ASG

The symbols available in ASGs are:

Symbol Name Description Definition Expansion
Comment Comment Makes a note anywhere in the diagram. Are always surrounded by * characters. None None
Boundary Point Boundary Point A connection point for the initial transition to enter the initial state. None None
Picture 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 button 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 Button Generic Package Representation of an Ada generic package's specification or body. Package specification ASG
Foreign Package Button Foreign Package Representation of an Ada program unit that is not elaborated in this model. None None
Task button 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 button Task Type Representation of an Ada task type specification or body. Task specification ASG
Subprogram button 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 button Generic Subprogram Representation of an Ada generic routine. Subprogram specification ASG
Generic Subprogram Parameter button Generic Subprogram Parameter Representation of a generic formal subprogram to an Ada generic package. Subprogram specification none
Foreign Subprogram button Foreign Subprogram Representation of a routine that is not elaborated in this model. none none
Data Object button 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 button 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 button 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 button Guarded Task Entry Representation of an entry which has a conditional guard. none none
Selective Wait button 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
Off Page Connector button Off Page Connector A connector that can be used to link ASGs together. none ASG
STC
Generic Connector button 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. none ASG
With from Spec button 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 button 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 button 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 button Conditional Call Representation of a conditional call to a task entry. none none
Timeout Call button Timeout Call Representation of a call to a task entry that has a timeout. none none
Instantiation button 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
Data Couple button 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 button 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
Exception button 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
Cloud button Cloud A representation of a program unit who type has not yet been defined. 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.