Nothing Special   »   [go: up one dir, main page]

Skip to main content
Log in

CLPS–B – A constraint solver to animate a B specification

  • Special section on tools and algorithms for the construction and analysis of systems
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

Abstract

This paper proposes an approach to evaluating B formal specifications using constraint logic programming with sets (CLPS). This approach is used to animate and generate test sequences from B formal specifications. The solver, called CLPS–B, is described in terms of constraint domains, consistency verification, and constraint propagation. It is more powerful than most constraint systems because it allows the domain of variable to contain other variables, which increases the level of abstraction. The constrained state propagates the nondeterminism of the B specifications and reduces the number of states in a reachability graph. We illustrate this approach by comparing the constrained state graph exploration with the concrete one in a simple example – process scheduler. We also describe the automated test generation method that uses the CLPS–B solver to better control combinational explosion.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Van Aertryck L, Benveniste M, le Metayer D (1997) CASTING: a formally based software test generation method. In: Proceedings of the 1st IEEE international conference on formal engineering methods (ICFEM’97), Hiroshima Japan, 12–14 November 1997, pp 99–112

  2. Abrial J-R (1996) The B-BOOK: assigning programs to meanings. Cambridge University Press

  3. Ambert F, Legeard B, Legros E (1994) Constraint logic programming on sets and multisets. In: Proceedings of ICLP’94 – workshop on constraint languages and their use in problem modeling, Ithaca, New York, November 1994, pp 151–165

  4. Aiken A, Wilmmers EL (1993) Type inclusion constraints and type inference. In: Proceedings of the conference on functional programming languages and computer architecture, Copenhagen, Denmark, 9–11 June 1993, pp 31–41

  5. Behm P, Desforges P, Meynadier JM (1998) METEOR: an industrial success in formal development. In Proceedings of the 2nd international conference on the B method, Montpellier, France, Lecture notes in computer science, vol 1393. Springer, Berlin Heidelberg New York, pp 26–27

  6. Bouquet F, Julliand J, Legeard B, Peureux F (2002) Automatic reconstruction and generation of functional test patterns – application to the Java Card Transaction Mechanism (confidential). Technical Report TR-01/02, LIFC, University of Franche-Comté and Schlumberger Montrouge Product Center

  7. Bouquet F, Legeard B, Peureux F (2000) Constraint logic programming with sets for animation of B formal specifications. In: Proceedings of the CL’00 workshop on (constraint) logic programming and software engineering (LPSE’00), London, July 2000

  8. Caritey N, Gaspari L, Legeard B, Peureux F (2001) Specification-based testing: application on algorithms of Metro and RER tickets (confidential). Technical Report TR-03/01, LIFC – University of Franche-Comté and Schlumberger Besançon

  9. Dick J, Faivre A (1993) Automating the generation and sequencing of test cases from model-based specifications. In: Proceedings of the international conference on formal methods Europe (FME’93), April 1993. Lecture notes in computer science, vol 670. Springer, Berlin Heidelberg New York, pp 268–284

  10. Dick J (1990) Using Prolog to animate Z specifications. In: Proceedings of the Z user meeting 1989. Workshops in computing, Oxford, 15 December 1990. Springer, Berlin Heidelberg New York

  11. Delzanno G, Podelski A (1999) Model checking in CLP. In: Proceedings of Tools and Algorithms for Construction and Analysis of Systems (TACAS’99), Amsterdam, 22–28 March 1999, pp 223–239

  12. El-Far IK, Whittaker JA (2001) Model-based software testing. Encycl Softw Eng 1:825–837

    Google Scholar 

  13. Friedman G, Hartman A, Nagin K, Shiran T (2002) Projected state machine coverage for software testing. In: Proceedings of the international symposium on software testing and analysis (ISSTA’02), vol 27, Rome, Italy, ACM SIGSOFT, July 2002, pp 134–143

  14. Gotlieb A, Botella B, Rueher M (2000) A CLP framework for computing structural test data. In: Proceedings of the 1st international conference on computational logic (CL’00), London, July 2000. Springer, Berlin Heidelberg New York, pp 399–413

  15. Gervet C (1997) Interval propagation to reason about sets: definition and implementation of a practical language. Constraints 1(2):191–246

    Article  MathSciNet  Google Scholar 

  16. Grieskamp W (2000) A computation model for Z based on concurrent constraint resolution. In: Proceedings of the international conference of Z and B users (ZB’00), York, UK, September 2000. Lecture notes in computer science, vol 1878. Springer, pp 414–432

  17. Hierons R (1997) Testing from a Z specification. J Softw Test Verif Reliabil 7:19–33

    Article  Google Scholar 

  18. Hörcher HM, Peleska J (1995) Using formal specifications to support software testing. Softw Qual J 4(4):309–327

    Article  Google Scholar 

  19. ISO. Information Processing Systems, Open Systems Interconnection. OSI Conformance Testing Methodology and Framework – ISO 9646

  20. Jackson D (2000) Automating first-order relational logic. In: Proceedings of the international conference on foundations of software engineering, ACM SIGSOFT, San Diego, November 2000, pp 130–138

  21. Jones CB (1990) Systematic software development using VDM, 2nd edn. Prentice-Hall, Upper Saddle River, NJ

  22. Kozen D (1994) Set constraints and logic programming (abstract). In: Proceedings of the 1st international conference on constraints in computational logics (CCL’94), Munich, Germany, September 1994. Lecture notes in computer science, vol 845. Springer, Berlin Heidelberg New York, pp 302–303

  23. Legeard B, Peureux F (2001) Generation of functional test sequences from B formal specifications – presentation and industrial case-study. In: Proceedings of the 16th international conference on automated software engineering (ASE’01), San Diego, November 2001. IEEE Press, New York, pp 377–381

  24. Legeard B, Peureux F, Vincent J (2001) Automatic generation of functional test patterns from a formalized smart card model – application to the GSM 11-11 specification (confidential). Technical Report TR-01/01, LIFC – University of Franche-Comté and Schlumberger Montrouge Product Center

  25. Legeard B, Peureux F, Utting M (2002a) A comparison of the BTT and TTF test-generation methods. In: Proceedings of the international conference on formal specification and development in Z and B (ZB’02), Grenoble, France, January 2002. Lecture notes in computer science, vol 2272. Springer, Berlin Heidelberg New York, pp 309–329

  26. Legeard B, Peureux F, Utting M (2002b) Automated boundary testing from Z and B. In: Proceedings of the international conference on formal methods Europe (FME’02), Copenhagen, Denmark, July 2002. Lecture notes in computer science, vol 2391. Springer, Berlin Heidelberg New York, pp 21–40

  27. Lötzbeyer H, Pretschner A (2000) AutoFocus on constraint logic programming. In: Proceedings of the CL’00 workshop on (constraint) logic programming and software engineering LPSE’00, London, July 2000

  28. Marre B, Arnould A (2000) Test Sequence generation from Lustre descriptions: GATEL. In: Proceedings of the 15th international conference on automated software engineering (ASE’00), Grenoble, France, 11–15 September 2000. IEEE Press, New York, pp 229–237

  29. Meudec C (1999) Test derivation from model based formal specifications. In: Proceedings of the 3rd Irish workshop on formal methods (IWFM’99). BCS, electronic workshops in computing, Galway, Eire, July 1999

  30. Meudec C (2001) ATGEN: Automatic test data generation using constraint logic programming and symbolic execution. J Softw Test Verif Reliabil 11(2):81–96

    Article  Google Scholar 

  31. Nadel BA (1996) Constraint satisfaction algorithms. Comput Intell 5:188–224

    Article  Google Scholar 

  32. Neilson D, Sorensen IH (1999) The B-Technologies: a system for computer aided programming. B-Core (UK) Limited, Kings Piece, Harwell, Oxon, OX11 0PA, 1999. Available at: http://www.b-core.com/btoolkit.html

  33. Offutt AJ, Jin Z, Pan J (1999) The dynamic domain reduction procedure for test data generation. J Softw Pract Exper 29(2):167–193

    Article  Google Scholar 

  34. Pretschner A (2001) Classical search strategies for test case generation with constraint logic programming. In: Proceedings of the CONCUR’01 workshop on formal approaches to testing of software (FATES’01), Aalborg, Denmark, BRICS Technical Report (http://www.bricks.dk/NS/01/4), August 2001, pp 47–60

  35. Sterling L, Ciancarini P, Turnidge T (1996) On the animation of “Not executable” specification by prolog. J Softw Eng Knowl Eng 6(1):63–87

    Article  MathSciNet  Google Scholar 

  36. Spivey JM (1992) The Z notation: a reference manual, 2nd edn. Prentice-Hall, Upper Saddle River, NJ

    Google Scholar 

  37. Tsang E (1993) Foundations of constraint satisfaction. Academic, New York

  38. West MM, Eaglestone BM (1992) Software development: two approaches to animation of Z specifications using Prolog. Softw Eng J 7(4):264–276

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Fabrice Bouquet, Bruno Legeard or Fabien Peureux.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Bouquet, F., Legeard, B. & Peureux, F. CLPS–B – A constraint solver to animate a B specification. Int J Softw Tools Technol Transfer 6, 143–157 (2004). https://doi.org/10.1007/s10009-003-0123-8

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-003-0123-8

Keywords

Navigation