On the Functional Specification of Queries in OCL

Autor: Piotr Kosiuczenko
Rok vydání: 2018
Předmět:
Zdroj: Advances in Intelligent Systems and Computing ISBN: 9783319996165
KKIO Software Engineering Conference
DOI: 10.1007/978-3-319-99617-2_4
Popis: Query operations are used to evaluate constraints such as invariants, pre- and post-conditions. The UML standard requires that a query is pure; i.e. it must not change the global system state. However, operations used for checking validity of conditions quite often have side effects. As a result, the global system state changes, the problem is that the validity of constraints should not be changed. Purity is a subject of intensive research; unfortunately this notion was not properly investigated in the case of OCL. This paper investigates how the very restrictive notion of purity can be relaxed in order to be applicable in the case of state changing operations. It is shown how to define queries in functional terms relatively to views. Relative queries are classified into rigid- and non-rigid ones. It is shown that non-rigid queries preserve pre- and post-conditions; whereas rigid queries preserve also invariants.
Databáze: OpenAIRE