Early Validation of High-level System Requirements with Event Calculus and Answer Set Programming
Ondřej Vašíček, Joaquin Arias, Jan Fiedor, Gopal Gupta, Brendan Hall, Bohuslav Křena, Brian Larson, Sarat Chandra Varanasi, Tomáš Vojnar
TL;DR
This work addresses the challenge of validating high-level CPS requirements early in development by translating real-world requirements into an Event Calculus model and conducting goal-directed reasoning with the s(CASP) system, enabling both deductive and abductive analysis with explanations. The PCA Pump project serves as a non-trivial, safety-critical test bed, revealing inconsistencies and an overdose risk that could only be detected earlier through such formal validation. The authors introduce multiple methodological and engineering contributions to make EC+s(CASP) scalable and robust: refined EC axioms, self-ending trajectory handling, incremental abductive refinement, a predicate-proof caching system, and a decoupled triggers-and-effects approach, all demonstrated on both consistency and general-property queries. The results show that early, explainable validation can identify critical safety issues and support improvement of requirements, with potential broad impact for CPS engineering beyond the PCA pump case.
Abstract
This paper proposes a new methodology for early validation of high-level requirements on cyber-physical systems with the aim of improving their quality and, thus, lowering chances of specification errors propagating into later stages of development where it is much more expensive to fix them. The paper presents a transformation of a real-world requirements specification of a medical device$-$a PCA pump$-$into an Event Calculus model that is then evaluated using answer set programming and the s(CASP) system. The evaluation under s(CASP) allowed deductive as well as abductive reasoning about the specified functionality of the PCA pump on the conceptual level with minimal implementation or design dependent influences, and led to fully-automatically detected nuanced violations of critical safety properties. Further, the paper discusses scalability and non-termination challenges that had to be faced in the evaluation and techniques proposed to (partially) solve them. Finally, ideas for improving s(CASP) to overcome its evaluation limitations that still persist as well as to increase its expressiveness are presented.
