Inferring Semantic Interfaces of Data Structures

In this paper, we show how to fully automatically infer semantic interfaces of data structures on the basis of systematic testing. Our semantic interfaces are a generalized form of Register Automata (RA), comprising parameterized input and output, allowing to model control- and data-flow in component interfaces concisely. Algorithmic key to the automated synthesis of these semantic interfaces is the extension of an active learning algorithm for Register Automata to explicitly deal with output. We evaluated our algorithm on a complex data structure, a "stack of stacks", the largest of which we could learn in merely 20 seconds with less than 4000 membership queries, resulting in a model with rougly 800 nodes. In contrast, even when restricting the data domain to just four values, the corresponding plain Mealy machine would have more than 109 states and presumably require billions of membership queries.

[1]  Tiziana Margaria,et al.  Knowledge-based relevance filtering for efficient system-level test-based model generation , 2005, Innovations in Systems and Software Engineering.

[2]  Valérie Issarny,et al.  Formal Methods for Eternal Networked Software Systems , 2011, Lecture Notes in Computer Science.

[3]  Andreas Zeller,et al.  Mining object behavior with ADABU , 2006, WODA '06.

[4]  Eran Yahav,et al.  Static Specification Mining Using Automata-Based Abstractions , 2008, IEEE Trans. Software Eng..

[5]  Bengt Jonsson,et al.  A Succinct Canonical Register Automaton Model , 2011, ATVA.

[6]  Thomas A. Henzinger,et al.  Permissive interfaces , 2005, ESEC/FSE-13.

[7]  Bernhard Steffen,et al.  Introduction to Active Automata Learning from a Practical Perspective , 2011, SFM.

[8]  James R. Larus,et al.  Mining specifications , 2002, POPL '02.

[9]  Jerome A. Feldman,et al.  On the Synthesis of Finite-State Machines from Samples of Their Behavior , 1972, IEEE Transactions on Computers.

[10]  Dana Angluin,et al.  Learning Regular Sets from Queries and Counterexamples , 1987, Inf. Comput..

[11]  Bengt Jonsson,et al.  Inferring Canonical Register Automata , 2012, VMCAI.

[12]  Bengt Jonsson,et al.  On the Correspondence Between Conformance Testing and Regular Inference , 2005, FASE.

[13]  Pavol Cerný,et al.  Synthesis of interface specifications for Java classes , 2005, POPL '05.

[14]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[15]  Mohamed Nassim Seghir,et al.  A Lightweight Approach for Loop Summarization , 2011, ATVA.

[16]  Leonardo Mariani,et al.  Automatic generation of software behavioral models , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[17]  Perdita Stevens,et al.  Modelling Recursive Calls with UML State Diagrams , 2003, FASE.

[18]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[19]  Tiziana Margaria,et al.  LearnLib: a framework for extrapolating behavioral models , 2009, International Journal on Software Tools for Technology Transfer.

[20]  Carlo Ghezzi,et al.  Synthesizing intensional behavior models by graph transformation , 2009, 2009 IEEE 31st International Conference on Software Engineering.