Specification Slicing for VDM-SL

Tomohiro Oda,Han-Myung Chang
2024-10-04
Abstract:The executable specification is one of the powerful tools in lightweight formal software development. VDM-SL allows the explicit and executable definition of operations that reference and update internal state through imperative statements. While the extensive executable subset of VDM-SL enables validation and testing in the specification phase, it also brings difficulties in reading and debugging as in imperative programming. In this paper, we define specification slicing for VDM-SL based on program slicing, a technique used for debugging and maintaining program source code in implementation languages. We then present and discuss its applications. The slicer for VDM-SL is implemented on ViennaTalk and can be used on browsers and debuggers describing the VDM-SL specification.
Software Engineering
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: when using VDM - SL (Vienna Development Method - Specification Language) for formal software development, due to the introduction of its executable subset, it has led to complexity problems in reading and debugging. Specifically: 1. **Complexity Caused by Executable Specifications**: Although the extensive executable subset of VDM - SL enables verification and testing during the specification stage, it also brings complexity similar to that in imperative programming. Since the execution of each statement is affected by previous variable assignments, control structures, and other operation calls, it is difficult to determine the specific contribution of a certain statement to the operation effect. 2. **Difficulties in Debugging and Understanding**: The existence of imperative statements makes it more difficult to understand and debug VDM - SL specifications. Traditional debugging methods and tools are not applicable in this case because they are mainly for implementation languages, not formal specification languages. To solve these problems, the author proposes the **Specification Slicing** technique. This technique is based on Program Slicing and aims to extract relevant specification parts from a given slicing criterion, thereby helping users better understand and debug VDM - SL specifications. Specifically, specification slicing can help: - **Locate Errors**: By extracting code fragments related to specific assertions or post - conditions, quickly locate statements that may cause problems. - **Simplify Understanding**: Decompose complex specifications into smaller, more understandable parts for easy maintenance and refactoring. In summary, the main objective of this paper is to improve the readability and maintainability of VDM - SL specifications by introducing the specification slicing technique, especially to provide support in debugging and understanding complex imperative statements.