Skip to main content
Top

2019 | OriginalPaper | Chapter

BTestBox: A Tool for Testing B Translators and Coverage of B Models

Authors : Diego de Azevedo Oliveira, Valério Medeiros Jr., David Déharbe, Martin A. Musicante

Published in: Tests and Proofs

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

The argument of correctness in refinement-based formal software design often disregards source code analysis and code generation. To mitigate the risk of errors in these phases, certifications issued by regulation entities demand or recommend testing the generated software using a code coverage criteria. We propose improvements for the BTestBox, a tool for automatic generation of tests for software components developed with the B method. BTestBox supports several code coverage criteria and code generators for different languages. The tool uses a constraint solver to produce tests, thus being able to identify dead code and tautological branching conditions. It also generates reports with different metrics and may be used as an extension to the Atelier B. Our tool performs a double task: first, it acts on the B model, by checking the code coverage. Second, the tool performs the translation of lower level B specifications into programming language code, runs tests and compares their results with the expected output of the test cases. The present version of BTestBox uses parallelisation techniques that significantly improve its performance. The results presented here are encouraging, showing performance numbers that are one order of magnitude better than the ones obtained in the tool’s previous version.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Footnotes
1
This operation implements the Russian Multiplication technique, that iteratively doubles one of the factors while halving the other one. The variant and invariant clauses are standard B elements, which are necessary to prove the correctness of the operation, including its termination.
 
Literature
1.
go back to reference Abrial, J.: The B-Book - Assigning Programs to Meanings. Cambridge University Press, Cambridge (2005) Abrial, J.: The B-Book - Assigning Programs to Meanings. Cambridge University Press, Cambridge (2005)
2.
go back to reference Ambert, F., et al.: BZ-TT: a tool-set for test generation from Z and B using constraint logic programming. In: Proceedings of FATES 2002, pp. 105–120 (2002) Ambert, F., et al.: BZ-TT: a tool-set for test generation from Z and B using constraint logic programming. In: Proceedings of FATES 2002, pp. 105–120 (2002)
3.
go back to reference Ammann, P., Offutt, J.: Introduction to Software Testing. Cambridge University Press, Cambridge (2008) Ammann, P., Offutt, J.: Introduction to Software Testing. Cambridge University Press, Cambridge (2008)
4.
go back to reference Ammann, P., Offutt, J., Huang, H.: Coverage criteria for logical expressions. In: 14th International Symposium on Software Reliability Engineering, ISSRE 2003, pp. 99–107. IEEE (2003) Ammann, P., Offutt, J., Huang, H.: Coverage criteria for logical expressions. In: 14th International Symposium on Software Reliability Engineering, ISSRE 2003, pp. 99–107. IEEE (2003)
6.
go back to reference Dalal, S.R., et al.: Model-based testing in practice. In: Proceedings of the 21st International Conference on Software Engineering, pp. 285–294. ACM (1999) Dalal, S.R., et al.: Model-based testing in practice. In: Proceedings of the 21st International Conference on Software Engineering, pp. 285–294. ACM (1999)
7.
go back to reference Déharbe, D., Azevedo, D., Matos, E.C.B., de Medeiros Jr., V.: BtestBox: an automatic test generator for B method. In: VII Congresso Brasileiro de Software: Teoria e Prática (CBSOFT 2016) - Sessão de ferramentas, pp. 81–88 (2016) Déharbe, D., Azevedo, D., Matos, E.C.B., de Medeiros Jr., V.: BtestBox: an automatic test generator for B method. In: VII Congresso Brasileiro de Software: Teoria e Prática (CBSOFT 2016) - Sessão de ferramentas, pp. 81–88 (2016)
8.
go back to reference Dijkstra, E.W.: A Discipline of Programming, vol. 1. Prentice-Hall, Englewood Cliffs (1976) Dijkstra, E.W.: A Discipline of Programming, vol. 1. Prentice-Hall, Englewood Cliffs (1976)
9.
go back to reference Clearsy System Engineering: Atelier B User Manual. Aix-en-Provence (1996) Clearsy System Engineering: Atelier B User Manual. Aix-en-Provence (1996)
11.
go back to reference Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009)CrossRef Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009)CrossRef
13.
go back to reference Marinescu, R., Seceleanu, C., Le Guen, H., Pettersson, P.: A research overview of tool-supported model-based testing of requirements-based designs. In: Advances in Computers, vol. 98, pp. 89–140. Elsevier (2015) Marinescu, R., Seceleanu, C., Le Guen, H., Pettersson, P.: A research overview of tool-supported model-based testing of requirements-based designs. In: Advances in Computers, vol. 98, pp. 89–140. Elsevier (2015)
15.
go back to reference Medeiros Jr., V.: Método B e a síntese verificada para código de montagem. Ph.D. thesis, UFRN, Federal University of Rio Grande do Norte, Natal (2016) Medeiros Jr., V.: Método B e a síntese verificada para código de montagem. Ph.D. thesis, UFRN, Federal University of Rio Grande do Norte, Natal (2016)
17.
go back to reference Satpathy, M., Leuschel, M., Butler, M.: ProTest: an automatic test environment for B specifications. ENTCS 111, 113–136 (2005) Satpathy, M., Leuschel, M., Butler, M.: ProTest: an automatic test environment for B specifications. ENTCS 111, 113–136 (2005)
18.
go back to reference Schneider, S.: The B-Method: An Introduction. Palgrave, Basingstoke (2001) Schneider, S.: The B-Method: An Introduction. Palgrave, Basingstoke (2001)
19.
go back to reference Shafique, M.: Systematic review of state based model based testing tools. Ph.D. thesis, Carleton University Ottawa (2010) Shafique, M.: Systematic review of state based model based testing tools. Ph.D. thesis, Carleton University Ottawa (2010)
Metadata
Title
BTestBox: A Tool for Testing B Translators and Coverage of B Models
Authors
Diego de Azevedo Oliveira
Valério Medeiros Jr.
David Déharbe
Martin A. Musicante
Copyright Year
2019
DOI
https://doi.org/10.1007/978-3-030-31157-5_6

Premium Partner