Verifying Code Generation Tools for the B-Method Using Tests: A Case Study

被引:3
作者
Moreira, Anamaria M. [2 ]
Hentz, Cleverton [1 ]
Deharbe, David [1 ]
de Matos, Ernesto C. B. [1 ]
Souza Neto, Joao B. [1 ]
de Medeiros, Valerio, Jr. [1 ]
机构
[1] Univ Fed Rio Grande do Norte, BR-59072970 Natal, RN, Brazil
[2] Univ Fed Rio de Janeiro, Rio De Janeiro, Brazil
来源
TESTS AND PROOFS, TAP 2015 | 2015年 / 9154卷
关键词
Model-Based Testing; Grammar-Based Testing; B-Method; Code generation; TRANSLATION VALIDATION;
D O I
10.1007/978-3-319-21215-9_5
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In this paper, we present a case study where two code generators for the B-Method were validated using software testing techniques. Our testing strategy is a combination of Grammar-Based Testing (GBT) and Model-Based Testing (MBT) techniques. The strategy consists of two steps. In the first step, grammar-based coverage criteria are used to generate a wide and meaningful set of test input models to validate the parsing capabilities of the code generators. In the second step, a MBT tool is used to validate the correctness of the output produced by these tools. The MBT tool generates a set of tests based on the same input model used by the code generation tools. The generated code is considered correct (consistent with the input model) if it passes this set of tests. Using this testing strategy, we were able to find problems in both code generation tools with moderate effort.
引用
收藏
页码:76 / 91
页数:16
相关论文
共 21 条
  • [1] Abrial Jean-Raymond, 1996, The B-Book - Assigning Programs to Meanings
  • [2] Ammann P., 2016, INTRO SOFTWARE TESTI
  • [3] ClearSy, 2009, AT B US MAN VERS 4 0
  • [4] Deharbe D., 2013, SBMF
  • [5] GOERIGK W, 1996, COMPILER CORRECTNESS
  • [6] Gogolla M, 2011, LECT NOTES COMPUT SC, V6698, P221, DOI 10.1007/978-3-642-21470-7_16
  • [7] Härtel J, 2014, LECT NOTES COMPUT SC, V8706, P342, DOI 10.1007/978-3-319-11245-9_19
  • [8] Hentz C., 2010, THESIS
  • [9] Grammar-based test generation with YouGen
    Hoffman, Daniel Malcolm
    Ly-Gagnon, David
    Strooper, Paul
    Wang, Hong-Yi
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2011, 41 (04) : 427 - 447
  • [10] Survey of compiler testing methods
    Kossatchev A.S.
    Posypkin M.A.
    [J]. Programming and Computer Software, 2005, 31 (1) : 10 - 19