基于设计假设的蜕变关系与遗传编程测试CPS
Testing CPS with Design Assumptions-Based Metamorphic Relations and Genetic Programming
AI总结:
本文提出基于控制理论设计假设定义蜕变关系(MRs),并利用遗传编程探索MRs组合以生成CPS测试用例,通过预期输出轨迹偏差指导输入轨迹生成,有效解决预言机问题并帮助工程师识别测试用例。
摘要:
信息物理系统(CPSs)软件用于在物理系统上强制执行期望的行为。为了测试CPS软件与系统物理特性之间的交互,工程师提供期望物理状态的轨迹,并观察实际物理状态的轨迹。CPS需求描述了实际物理轨迹应如何紧密地跟踪期望轨迹。这些需求通常针对特定的、简单的输入轨迹(如阶跃或斜坡序列)定义,因此不适用于任意输入。这限制了CPS预言机的可用性。我们最近的工作提出了一种使用控制理论设计假设而非需求来测试CPS的方法。该方法通过利用满足设计假设时提供的控制理论保证来规避预言机问题。为了解决测试用例生成和预言机问题,研究人员提出了蜕变测试,该方法基于跨测试关系的研究,即蜕变关系(MRs)。在这项工作中,我们基于设计假设定义了MRs,并使用遗传编程探索这些MRs的组合以生成CPS测试用例。这使得能够生成具有潜在任意形状的CPS输入轨迹以及相关的预期输出轨迹。我们使用与预期输出轨迹的偏差来指导生成使MRs失效的输入轨迹。我们的实验结果表明,MR失效为工程师提供了新信息,帮助他们识别通过和失败的测试用例。此外,我们表明生成使MRs失效的轨迹是一个非平凡的问题,我们的遗传搜索成功地解决了这一问题。
英文摘要:
Cyber-Physical Systems (CPSs) software is used to enforce desired behaviours on physical systems. To test the interaction between the CPS software and the system's physics, engineers provide traces of desired physical states and observe traces of the actual physical states. CPS requirements describe how closely the actual physical traces should track the desired traces. These requirements are typically defined for specific, simple input traces such as step or ramp sequences, and thus are not applicable to arbitrary inputs. This limits the availability of oracles for CPSs. Our recent work proposes an approach to testing CPS using control-theoretical design assumptions instead of requirements. This approach circumvents the oracle problem by leveraging the control-theoretical guarantees that are provided when the design assumptions are satisfied. To address the test case generation and oracle problems, researchers have proposed metamorphic testing, which is based on the study of relations across tests, i.e., metamorphic relations (MRs). In this work, we define MRs based on the design assumptions and explore combinations of these MRs using genetic programming to generate CPS test cases. This enables the generation of CPS input traces with potentially arbitrary shapes, together with associated expected output traces. We use the deviation from the expected output traces to guide the generation of input traces that falsify the MRs. Our experiment results show that the MR-falsification provides engineers with new information, helping them identify passed and failed test cases. Furthermore, we show that the generation of traces that falsify the MRs is a non-trivial problem, which is successfully addressed by our genetic search.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。