Assurance (software technology)

from Wikipedia, the free encyclopedia

A software assurance is an expression used in OOAD diagrams (Object Oriented Analysis and Design) to define restrictions that affect the possible states or behavior of objects . The semantics of an association can also be restricted with an assurance.

An assurance is a possibility of stipulating rules in a design diagram that otherwise cannot be represented with the conventional means of OOAD, such as multiplicities. Assurances basically serve as agreements with the programmer .

Representation with the UML

With the UML, assurances are formulated within curly brackets. An Object Constraint Language (OCL) expression can also be used to record an assurance . If a dependency relationship between model elements is to be guaranteed, a dashed line with an arrow is used for the representation. The arrow points from the dependent to the independent element. If an assurance cannot be clearly assigned to a model element or concerns a relationship between more than two model elements involved, it can be formulated in a note.

Application examples

Subset Assurance

A subset assertion concerns the dependency relationship between two associations. It is used when a class has two associations and it is to be assured that the set of associated objects within one relationship is a subset of the set of associated objects within the other relationship.

Consistency assurance

It is possible to model redundant associations in a UML diagram . This means that there are several navigation options between two objects. In this case, the correct associated object must be found using all navigation routes. Otherwise there would be an inconsistency. Such an inconsistency can be prevented with the help of an assurance.

Order assurance

In the case of an association with a maximum multiplicity of greater than one on the one hand, an assurance can be used to determine that objects associated with an object must be ordered in a certain way. For example, with the help of an assurance it can be determined that in the case of a relationship between a class “company” and a class “employee” the references within the quantitative reference attribute of a company object are stored in the order that this results in the order, employees sorted by the surname, results.

Assertions for attributes and operations

The structure ( attributes ) and behavior ( operations ) of objects can be restricted with the help of assertions . An assurance is also necessary in order to define the calculation rule for derived attributes. As in programming languages and in databases , an assurance can also be used in OOAD to limit the range of values of attributes.

See also

literature

  • Bernd Oestereich : Object-oriented software development - analysis and design with the Unified Modeling Language 4th edition Oldenbourg Munich, Vienna 1998 pp. 245–249