Author:
Yoonsik Cheon
Affiliation:
Department of Computer Science, The University of Texas at El Paso, El Paso, Texas, U.S.A.
Keyword(s):
Abstraction Function, Assertion, Assertion Library, Assertion State, Constructive Assertion, Dart, Object Constraint Language.
Abstract:
An assertion is a statement that specifies a condition that must be true at a particular point during program execution. It serves as a tool to ensure the program functions as intended, reducing the risk of introducing subtle errors. Usually expressed algebraically, an assertion utilizes Boolean expressions to specify permissible relationships among program variables. In complex scenarios, calculating the expected value of a program variable often proves more effective than specifying the constraints it must adhere to. In this paper, we present an approach to formulating assertions using abstract models in a constructive manner, which complements the traditional algebraic style. Constructive assertions empower programmers to articulate comprehensive assertions, including pre and postconditions, in a succinct, comprehensible, reusable, and maintainable manner.