Ensuring correctness of cyber-physical systems (CPS) is an extremely challenging task that is in practice often addressed with simulation based testing. Formal specification languages, such as Signal Temporal Logic (STL), are used to mathematically express CPS requirements and thus render the simulation activity more systematic and principled. We propose a novel method for adaptive generation of tests with specification coverage for STL. To achieve this goal, we devise cooperative reachability games that we combine with numerical optimization to create tests that explore the system in a way that exercise various parts of the specification. To the best of our knowledge our approach is the first adaptive testing approach that can be applied directly to MATLAB\texttrademark\; Simulink/Stateflow models. We implemented our approach in a prototype tool and evaluated it on several illustrating examples and a case study from the avionics domain, demonstrating the effectiveness of adaptive testing to (1) incrementally build a test case that reaches a test objective, (2) generate a test suite that increases the specification coverage, and (3) infer what part of the specification is actually implemented.
翻译:确保网络物理系统(CPS)的正确性是一项极具挑战性的任务,在实践中常常通过模拟测试来解决。正式规格语言,如信号时空逻辑(STL),用来从数学上表达CPS的要求,从而使模拟活动更加系统和有原则。我们提出了一种创新的适应性生成测试方法,为STL提供了规格范围。为了实现这一目标,我们设计了合作性可达性游戏,与数字优化相结合,以运用规格不同部分的方式对系统进行探索。我们最了解的是,我们的方法是第一个适应性测试方法,可以直接应用于MATLAB\texttrademark\;Simmlink/starproll 模型。我们用一个原型工具实施了我们的方法,并在几个说明实例和从航空域进行的案例研究中评估了我们的方法,展示了适应性测试的有效性:(1) 逐步建立一个达到测试目标的测试案例,(2) 产生一个能够增加规格覆盖范围的测试套件,(3) 并推断该规格的哪个部分实际得到实施。