ACM SIGSOFT Software Engineering Notes · 2002 · 46 citations · 0 references
ComputingComputer EngineeringComputer ScienceDesign AutomationFormal MethodsSystems ModelingExecutable System ModelsFinite State Machine ModelingModel CheckingModel-driven Software EngineeringSoftware ModelingStatic AnalysisComponent InterfacesExecutable State-based ModelsFinite State Machine ExtractionState Models
Component‑based software design is a popular and effective approach to designing large systems, yet sequencing information about call order is often not formally specified. This paper proposes using multiple finite state machine submodels to model a class’s interface. The authors design a system that uses FSM submodels, where each state‑modifying method is a state and transitions encode allowable consecutive calls, and they employ static analyses, dynamic instrumentation, and a dynamic model checker to deduce illegal call sequences and enforce conformance. The extracted FSM models document interfaces, enforce constraints via static checking, aid developers in detecting unexpected behavior, and assess test suite completeness; experiments on large code bases such as the joeq VM and Java EE libraries show the approach yields useful information.
Component-based software design is a popular and effective approach to designing large systems. While components typically have well-defined interfaces, sequencing information---which calls must come in which order---is often not formally specified.This paper proposes using multiple finite statemachine (FSM) submodels to model the interface of a class. A submodel includes a subset of methods that, for example, implement a Java interface, or access some particular field. Each state-modifying method is represented as a state in the FSM, and transitions of the FSMs represent allow able pairs of consecutive methods. In addition, state-preserving methods are constrained to execute only under certain states.We have designed and implemented a system that includes static analyses to deduce illegal call sequences in a program, dynamic instrumentation techniques to extract models from execution runs, and a dynamic model checker that ensures that the code conforms to the model. Extracted models can serve as documentation; they can serve as constraints to be enforced by a static checker; they can be studied directly by developers to determine if the program is exhibiting unexpected behavior; or they can be used to determine the completeness of a test suite.Our system has been run on several large code bases, including the joeq virtual machine, the basic Java libraries, and the Java 2 Enterprise Edition library code. Our experience suggests that this approach yields useful information.