面向信息物理系统防护的基于大语言模型的基于属性的测试生成方法
LLM-based Property-based Test Generation for Guardrailing Cyber-Physical Systems
AI总结:
针对信息物理系统安全保障难的问题,提出借助大语言模型从系统代码与文档提取属性并生成基于属性的测试的方法,可用于设计阶段测试与运行阶段防护,实验验证了该方法的可行性与应用前景。
摘要:
信息物理系统(CPS)是集成了物理子系统、计算子系统和通信子系统的复杂系统。这类系统的异构特性使其安全保障工作颇具挑战。本文提出了一种新颖的自动化方法,利用大语言模型(LLM)生成的基于属性的测试(PBT)为信息物理系统提供防护。我们的方法借助LLM从CPS的代码和文档中提取系统属性,随后使用LLM生成可验证这些提取属性的PBT。生成的PBT有两大用途:一是在系统部署前的设计阶段用于CPS测试;二是可在部署后的运行阶段用于监控系统行为,防范系统进入不安全状态。我们在ChekProp工具中实现了该方法,并开展了初步实验,从相关性(与人工编写属性的匹配程度)、可执行性(仅需最少人工修改即可运行的比例)和有效性(对输入空间划分的覆盖度)三个维度评估生成的PBT。实验与评估结果表明,利用LLM生成的基于属性的测试为构建CPS防护机制提供了颇具前景的发展方向。
英文摘要:
Cyber-physical systems (CPSs) are complex systems that integrate physical, computational, and communication subsystems. The heterogeneous nature of these systems makes their safety assurance challenging. In this paper, we propose a novel automated approach for guardrailing cyber-physical systems using property-based tests (PBTs) generated by Large Language Models (LLMs). Our approach employs an LLM to extract properties from the code and documentation of CPSs. Next, we use the LLM to generate PBTs that verify the extracted properties on the CPS. The generated PBTs have two uses. First, they are used to test the CPS before it is deployed, i.e., at design time. Secondly, these PBTs can be used after deployment, i.e., at run time, to monitor the behavior of the system and guardrail it against unsafe states. We implement our approach in ChekProp and conduct preliminary experiments to evaluate the generated PBTs in terms of their relevance (how well they match manually crafted properties), executability (how many run with minimal manual modification), and effectiveness (coverage of the input space partitions). The results of our experiments and evaluation demonstrate a promising path forward for creating guardrails for CPSs using LLM-generated property-based tests.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。