Options
Comprehending Object State via Dynamic Class Invariant Learning
Boockmann, Jan H.; Lüttgen, Gerald (2024): Comprehending Object State via Dynamic Class Invariant Learning, in: Dirk Beyer, Ana Cavalcanti, Dirk Beyer, u. a. (Hrsg.), Fundamental Approaches to Software Engineering : 27th International Conference, FASE 2024, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Luxembourg City, Luxembourg, April 6–11, 2024, Proceedings, Cham: Springer Nature Switzerland, S. 143–164, doi: 10.1007/978-3-031-57259-3_7.
Faculty/Chair:
Author:
Title of the compilation:
Fundamental Approaches to Software Engineering : 27th International Conference, FASE 2024, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Luxembourg City, Luxembourg, April 6–11, 2024, Proceedings
Editors:
Beyer, Dirk
Cavalcanti, Ana
Conference:
ETAPS 2024 ; Luxembourg
Publisher Information:
Year of publication:
2024
Pages:
ISBN:
978-3-031-57258-6
978-3-031-57259-3
Language:
English
Abstract:
Maintaining software is cumbersome when method argument constraints are undocumented. To reveal them, previous work learned preconditions from exemplary valid and invalid method arguments. In practice, it would be highly beneficial to know class invariants, too, because functionality added during software maintenance must not break them. Even more so than method preconditions, class invariants are rarely documented and often cannot completely be inferred automatically, especially for objects exhibiting complex state such as dynamic data structures.
This paper presents a novel dynamic approach to learning class invariants, thereby complementing related work on learning method preconditions. We automatically synthesize assertions from an adjustable assertion grammar to distinguish valid and invalid objects. While random walks generate valid objects, a combination of bounded-exhaustive testing techniques and behavioral oracles yield invalid objects. The utility of our approach for code comprehension and software maintenance is demonstrated by comparing our learned invariants to documented invariant validation methods found in real-world Java classes and to the invariants detected by the Daikon tool.
This paper presents a novel dynamic approach to learning class invariants, thereby complementing related work on learning method preconditions. We automatically synthesize assertions from an adjustable assertion grammar to distinguish valid and invalid objects. While random walks generate valid objects, a combination of bounded-exhaustive testing techniques and behavioral oracles yield invalid objects. The utility of our approach for code comprehension and software maintenance is demonstrated by comparing our learned invariants to documented invariant validation methods found in real-world Java classes and to the invariants detected by the Daikon tool.
Keywords:
Dynamic Class Invariant Learning
Type:
Conferenceobject
Activation date:
October 2, 2024
Versioning
Question on publication
Permalink
https://fis.uni-bamberg.de/handle/uniba/98466