PROCEEDINGS OF THE 2024 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING, SANER 2024(2024)
Software Technologies Research Group
被引用0|浏览2
摘要
Understanding complex software components is crucial for software evolution and maintenance. While documentation on software behavior is often available and sufficient for software reusability, maintenance requires additional information such as internal state constraints. While, these constraints, typically encoded as class invariants in object-oriented programming, are rarely documented, dynamic class invariant learning approaches can be used to extract candidate invariants from concrete object states. Recent approaches leverage negative training data to assess invariant completeness; however, a diverse set of invalid object states is particularly challenging to obtain. This paper proposes a novel approach for the automatic creation of invalid objects by combining program mutation with object state space exploration, thereby reaching invalid objects that cannot be constructed using the original class definition. Evaluating our approach on data structures, including those from the java.util package, revealed that it achieves a high object state space coverage. This demonstrates its potential for generating a diverse set of invalid objects suitable for class invariant learning.