Object-oriented analysis and design with applications (2nd ed.)
Object-oriented analysis and design with applications (2nd ed.)
The object constraint language: precise modeling with UML
The object constraint language: precise modeling with UML
Efficient incremental algorithms for dynamic detection of likely invariants
Proceedings of the 12th ACM SIGSOFT twelfth international symposium on Foundations of software engineering
Extending Dynamic Constraint Detection with Polymorphic Analysis
WODA '07 Proceedings of the 5th International Workshop on Dynamic Analysis
Hi-index | 0.00 |
Dynamic invariant detection, the automatic recovery of partial program specifications by inferring likely constraints from program executions, has been successful in the context of procedural programs. The implementation for dynamic invariant detection examines only the declared type of a variable, lacking many details in the context of object-oriented programs. This paper shows how this technique can be extended to detect invariants of object-oriented programs in the presence of polymorphism by examining the runtime type of a polymorphic variable, which may have different declared and runtime types. We demonstrate the improved accuracy of the dynamically detected specification on two real-world examples: the Money example from the JUnit testing framework tutorial, and a database query engine model example, which we adopted from a commercial database application. Polymorphic constraints in both cases are shown to reveal the specification of the runtime behavior of the systems.