抽取形式规格说明加强类型行为测试
Extracting Formal Specifications to Strenghten Type Behaviour Testing
摘要:
测试已经成为软件开发中不可或缺的活动,然而编写好的相关测试仍然是一项相当具有挑战性的任务。一个众所周知的问题是,测试每个结果通常是不可能或不现实的,因为程序组件的输入和/或输出可以表示难以置信的大,除非是无限域。解决这个问题的一种常见方法是只测试用例类,并假设这些类覆盖了组件容易暴露的所有(或至少大部分)用例。不幸的是,这些假设在许多情况下都是错误的,导致一个经过良好测试的程序在特定输入时失败。在这篇简短的论文中,我们建议利用形式化验证,特别是模型检验技术,作为一种更好地识别上述假设不成立的情况下,并最终加强的信心,可以在一个测试套件。其思想是以术语重写系统的形式提取程序的数据类型的形式规范,并根据程序员指定的一组属性检查该规范。然后,可以使用模型检验来识别tose属性不成立的情况,并将其选择为测试情况。
英文摘要:
Testing has become an indispensable activity of software development, yet writing good and relevant tests remains a quite challenging task. One well-known problem is that it often is impossible or unrealistic to test for every outcome, as the input and/or output of a program component can represent incredbly large, unless infinite domains. A common approach to tackle this issue it to only test classes of cases, and to assume that those classes cover all (or at least most) of the cases a component is susceptible to be exposed to. Unfortunately, those kind of assumptions can prove wrong in many situations, causing a yet well-tested program to fail upon a particular input. In this short paper, we propose to leverage formal verification, in particular model checking techniques, as a way to better identify cases for which the aforementioned assumptions do not hold, and ultimately strenghten the confidence one can have in a test suite. The idea is to extract a formal specification of the data types of a program, in the form of a term rewriting system, and to check that specification against a set of properties specified by the programmer. Cases for which tose properties do not hold can then be identified using model checking, and selected as test cases.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。