Authors:
Yoonsik Cheon
1
;
Bozhen Liu
2
and
Carlos Rubio-Medrano
2
Affiliations:
1
Department of Computer Science, The University of Texas at El Paso, El Paso, Texas, U.S.A.
;
2
Department of Computer Science, Texas A&M University – Corpus Christi, Corpus Christi, Texas, U.S.A.
Keyword(s):
Abstraction Function, Assertion, Frame Axiom, Runtime Check, Side Effect.
Abstract:
Frame axioms and properties are crucial for ensuring the correctness of operations by defining which parts of a program’s state may change during operation execution. Despite their significance, there has been no known method for asserting frame properties of operations for runtime checks. This paper introduces a practical approach that utilizes abstract models and executable assertions to effectively check frame properties at runtime. By defining abstract models that capture relevant state variables and their relationships, programmers can specify abstractly the parts of an object’s state that may change during operation execution. These frame properties, specified in terms of abstract models and embedded as executable assertions within the code, enforce behavioral constraints and improve the readability, maintainability, and reusability of the assertion code. Additionally, the approach supports the concept of observable side effects.