B model slicing and predicate abstraction to generate tests

In a model-based testing approach as well as for the verification of properties, B models provide an interesting modeling solution. However, for industrial applications, the size of their state space often makes them hard to handle. To reduce the amount of states, an abstraction function can be used. The abstraction is often a domain abstraction of the state variables that requires many proof obligations to be discharged, which can be very time-consuming for real applications. This paper presents a contribution to this problem that complements an approach based on domain abstraction for test generation, by adding a preliminary syntactic abstraction phase, based on variable elimination. We define a syntactic transformation that suppresses some variables from a B event model, in addition to three methods that choose relevant variables according to a test purpose. In this way, we propose a method that computes an abstraction of a source model $${\mathsf{M}}$$ according to a set of selected relevant variables. Depending on the method used, the abstraction can be computed as a simulation or as a bisimulation of $${\mathsf{M}}$$. With this approach, the abstraction process produces a finite state system. We apply this abstraction computation to a model-based testing process. We evaluate experimentally the impact of the model simplification by variables' elimination on the size of the models, on the number of proof obligations to discharge, on the precision of the abstraction and on the coverage achieved by the test generation.

[1]  Jacques Julliand,et al.  Generating security tests in addition to functional tests , 2008, AST '08.

[2]  David Notkin,et al.  Combining Constraint Solving and Symbolic Model Checking for a Class of a Systems with Non-linear Constraints , 1997, CAV.

[3]  Fabrice Bouquet,et al.  CLPS–B – A constraint solver to animate a B specification , 2004, International Journal on Software Tools for Technology Transfer.

[4]  Todd Millstein,et al.  Automatic predicate abstraction of C programs , 2001, PLDI '01.

[5]  Kedar S. Namjoshi,et al.  Syntactic Program Transformations for Automatic Abstraction , 2000, CAV.

[6]  Fabrice Bouquet,et al.  Instantiation of Parameterized Data Structures for Model-Based Testing , 2007, B.

[7]  Jeremy Dick,et al.  Automating the Generation and Sequencing of Test Cases from Model-Based Specifications , 1993, FME.

[8]  Tomás E. Uribe,et al.  Generating Finite-State Abstractions of Reactive Systems Using Decision Procedures , 1998, CAV.

[9]  Mats Per Erik Heimdahl,et al.  Reduction and slicing of hierarchical state machines , 1997, ESEC '97/FSE-5.

[10]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[11]  Matthew B. Dwyer,et al.  Evaluating the Effectiveness of Slicing for Model Reduction of Concurrent Object-Oriented Programs , 2006, TACAS.

[12]  Henny B. Sipma,et al.  Deductive Model Checking , 1996, Formal Methods Syst. Des..

[13]  Edmund M. Clarke,et al.  Model checking and abstraction , 1994, TOPL.

[14]  Heike Wehrheim,et al.  Slicing an Integrated Formal Method for Verification , 2005, ICFEM.

[15]  Fabrice Bouquet,et al.  Test Generation Based on Abstraction and Test Purposes to Complement Structural Tests , 2010, 2010 Third International Conference on Software Testing, Verification, and Validation Workshops.

[16]  Hassen Saïdi,et al.  Construction of Abstract State Graphs with PVS , 1997, CAV.

[17]  Françoise Bellegarde,et al.  Ready-Simulation Is Not Ready to Express a Modular Refinement Relation , 2000, FASE.

[18]  Michael J. Butler,et al.  ProB: an automated analysis toolset for the B method , 2008, International Journal on Software Tools for Technology Transfer.

[19]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[20]  Marc Pouzet,et al.  Slicing Communicating Automata Specifications for Efficient Model Reduction , 2007, 2007 Australian Software Engineering Conference (ASWEC'07).

[21]  Marie-Laure Potet,et al.  GeneSyst: A Tool to Reason About Behavioral Aspects of B Event Specifications. Application to Security Properties , 2005, ZB.

[22]  Jacques Julliand,et al.  Syntactic Abstraction of B Models to Generate Tests , 2010, TAP@TOOLS.

[23]  Lauretta O. Osho,et al.  Axiomatic Basis for Computer Programming , 2013 .

[24]  Jean-Raymond Abrial,et al.  The B-book - assigning programs to meanings , 1996 .

[25]  Patrick Cousot,et al.  Abstract Interpretation Frameworks , 1992, J. Log. Comput..

[26]  T. Kanade Model-Based Testing of Reactive Systems , 2005 .

[27]  Alan Hartman,et al.  Projected state machine coverage for software testing , 2002, ISSTA '02.

[28]  Edmund M. Clarke,et al.  Model Checking , 1999, Handbook of Automated Reasoning.

[29]  Harold W. Thimbleby,et al.  The directed Chinese Postman Problem , 2003, Softw. Pract. Exp..

[30]  Yassine Lakhnech,et al.  Computing Abstractions of Infinite State Systems Compositionally and Automatically , 1998, CAV.

[31]  Manfred Broy,et al.  Model-Based Testing of Reactive Systems, Advanced Lectures [The volume is the outcome of a research seminar that was held in Schloss Dagstuhl in January 2004] , 2005, Model-Based Testing of Reactive Systems.

[32]  Thomas Ball,et al.  A Theory of Predicate-Complete Test Coverage and Generation , 2004, FMCO.

[33]  Jacques Julliand,et al.  Refinement Preserves PLTL Properties , 2003, ZB.

[34]  Manfred Broy,et al.  Model-Based Testing of Reactive Systems: Advanced Lectures (Lecture Notes in Computer Science) , 2005 .

[35]  Jean-Raymond Abrial,et al.  Modeling in event-b - system and software engineering by Jean-Raymond Abrial , 2010, SOEN.

[36]  Jean-François Couchot,et al.  Graph Based Reduction of Program Verification Conditions , 2009, FM 2009.

[37]  Jacques Julliand,et al.  Génération de tests à partir de critères dynamiques de sélection et par abstraction , 2009 .