LLM-Based Property-Based Test Generation for Guardrailing Cyber-Physical Systems
Open Access
- 11 October 2025
- book chapter
- Published by Springer Nature
- p. 18-46
Abstract
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.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- OmniTester: Multimodal Large Language Model Driven Scenario Testing for Autonomous VehiclesAutomotive Innovation, 2025
- Enhancing Code Generation for Low-Resource Languages: No Silver Bullet2025
- LLM-Driven Testing for Autonomous Driving Scenarios2024
- PROZE: Generating Parameterized Unit Tests Informed by Runtime Data2024
- CRYSTAL framework: Cybersecurity assurance for cyber-physical systemsJournal of Logical and Algebraic Methods in Programming, 2024
- Software Testing With Large Language Models: Survey, Landscape, and VisionIEEE Transactions on Software Engineering, 2024
- Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction2023
- On Time Actors2016
- Parameterized unit testsACM SIGSOFT Software Engineering Notes, 2005
- Property-based testingACM SIGSOFT Software Engineering Notes, 1997