28 research outputs found
Quantitative Regular Expressions for Arrhythmia Detection Algorithms
Motivated by the problem of verifying the correctness of arrhythmia-detection
algorithms, we present a formalization of these algorithms in the language of
Quantitative Regular Expressions. QREs are a flexible formal language for
specifying complex numerical queries over data streams, with provable runtime
and memory consumption guarantees. The medical-device algorithms of interest
include peak detection (where a peak in a cardiac signal indicates a heartbeat)
and various discriminators, each of which uses a feature of the cardiac signal
to distinguish fatal from non-fatal arrhythmias. Expressing these algorithms'
desired output in current temporal logics, and implementing them via monitor
synthesis, is cumbersome, error-prone, computationally expensive, and sometimes
infeasible.
In contrast, we show that a range of peak detectors (in both the time and
wavelet domains) and various discriminators at the heart of today's
arrhythmia-detection devices are easily expressible in QREs. The fact that one
formalism (QREs) is used to describe the desired end-to-end operation of an
arrhythmia detector opens the way to formal analysis and rigorous testing of
these detectors' correctness and performance. Such analysis could alleviate the
regulatory burden on device developers when modifying their algorithms. The
performance of the peak-detection QREs is demonstrated by running them on real
patient data, on which they yield results on par with those provided by a
cardiologist.Comment: CMSB 2017: 15th Conference on Computational Methods for Systems
Biolog
On Expressing and Monitoring Oscillatory Dynamics
To express temporal properties of dense-time real-valued signals, the Signal
Temporal Logic (STL) has been defined by Maler et al. The work presented a
monitoring algorithm deciding the satisfiability of STL formulae on finite
discrete samples of continuous signals. The logic has been used to express and
analyse biological systems, but it is not expressive enough to sufficiently
distinguish oscillatory properties important in biology. In this paper we
define the extended logic STL* in which STL is augmented with a signal-value
freezing operator allowing us to express (and distinguish) detailed properties
of biological oscillations. The logic is supported by a monitoring algorithm
prototyped in Matlab. The monitoring procedure of STL* is evaluated on a
biologically-relevant case study.Comment: In Proceedings HSB 2012, arXiv:1208.315
Diagnosis and Repair for Synthesis from Signal Temporal Logic Specifications
We address the problem of diagnosing and repairing specifications for hybrid
systems formalized in signal temporal logic (STL). Our focus is on the setting
of automatic synthesis of controllers in a model predictive control (MPC)
framework. We build on recent approaches that reduce the controller synthesis
problem to solving one or more mixed integer linear programs (MILPs), where
infeasibility of a MILP usually indicates unrealizability of the controller
synthesis problem. Given an infeasible STL synthesis problem, we present
algorithms that provide feedback on the reasons for unrealizability, and
suggestions for making it realizable. Our algorithms are sound and complete,
i.e., they provide a correct diagnosis, and always terminate with a non-trivial
specification that is feasible using the chosen synthesis method, when such a
solution exists. We demonstrate the effectiveness of our approach on the
synthesis of controllers for various cyber-physical systems, including an
autonomous driving application and an aircraft electric power system
A Flexible and Efficient Temporal Logic Tool for Python: PyTeLo
Temporal logic is an important tool for specifying complex behaviors of
systems. It can be used to define properties for verification and monitoring,
as well as goals for synthesis tools, allowing users to specify rich missions
and tasks. Some of the most popular temporal logics include Metric Temporal
Logic (MTL), Signal Temporal Logic (STL), and weighted STL (wSTL), which also
allow the definition of timing constraints. In this work, we introduce PyTeLo,
a modular and versatile Python-based software that facilitates working with
temporal logic languages, specifically MTL, STL, and wSTL. Applying PyTeLo
requires only a string representation of the temporal logic specification and,
optionally, the dynamics of the system of interest. Next, PyTeLo reads the
specification using an ANTLR-generated parser and generates an Abstract Syntax
Tree (AST) that captures the structure of the formula. For synthesis, the AST
serves to recursively encode the specification into a Mixed Integer Linear
Program (MILP) that is solved using a commercial solver such as Gurobi. We
describe the architecture and capabilities of PyTeLo and provide example
applications highlighting its adaptability and extensibility for various
research problems
Falsification of Signal-Based Specifications for Cyber-Physical Systems
In the development of software for modern Cyber-Physical Systems, testing is an integral part that is rightfully given a lot of attention. Testing is done on many different abstraction levels, and especially for large-scale industrial systems, it can be difficult to know when the testing should conclude and the software can be considered correct enough for making its way into production. This thesis proposes new methods for analyzing and generating test cases as a means of being more certain that proper testing has been performed for the system under test. For analysis, the proposed approach includes automatically finding how much a given test suite has executed the physical properties of the simulated system. For test case generation, an up-and-coming approach to find errors in Cyber-Physical Systems is simulation-based falsification. While falsification is suitable also for some large-scale industrial systems, sometimes there is a gap between what has been researched and what problems need to be solved to make the approach tractable in the industry. This thesis attempts to close this gap by applying falsification techniques to real-world models from Volvo Car Corporation, and adapting the falsification procedure where it has shortcomings for certain classes of systems. Specifically, the thesis includes a method for automatically transforming a signal-based specification into a formal specification in temporal logic, as well as a modification to the underlying optimization problem that makes falsification more viable in an industrial setting. The proposed methods have been evaluated for both academic benchmark examples and real-world industrial models. One of the main conclusions is that the proposed additions and changes to analysis and generation of tests can be useful, given that one has enough information about the system under test. It is difficult to provide a general solution that will always work best -- instead, the challenge lies in identifying which properties of the given system should be taken into account when trying to find potential errors in the system
On Optimization-Based Falsification of Cyber-Physical Systems
In what is commonly referred to as cyber-physical systems (CPSs), computational and physical resources are closely interconnected. An example is the closed-loop behavior of perception, planning, and control algorithms, executing on a computer and interacting with a physical environment. Many CPSs are safety-critical, and it is thus important to guarantee that they behave according to given specifications that define the correct behavior. CPS models typically include differential equations, state machines, and code written in general-purpose programming languages. This heterogeneity makes it generally not feasible to use analytical methods to evaluate the system’s correctness. Instead, model-based testing of a simulation of the system is more viable. Optimization-based falsification is an approach to, using a simulation model, automatically check for the existence of input signals that make the CPS violate given specifications. Quantitative semantics estimate how far the specification is from being violated for a given scenario. The decision variables in the optimization problems are parameters that determine the type and shape of generated input signals. This thesis contributes to the increased efficiency of optimization-based falsification in four ways. (i) A method for using multiple quantitative semantics during optimization-based falsification. (ii) A direct search approach, called line-search falsification that prioritizes extreme values, which are known to often falsify specifications, and has a good balance between exploration and exploitation of the parameter space. (iii) An adaptation of Bayesian optimization that allows for injecting prior knowledge and uses a special acquisition function for finding falsifying points rather than the global minima. (iv) An investigation of different input signal parameterizations and their coverability of the space and time and frequency domains. The proposed methods have been implemented and evaluated on standard falsification benchmark problems. Based on these empirical studies, we show the efficiency of the proposed methods. Taken together, the proposed methods are important contributions to the falsification of CPSs and in enabling a more efficient falsification process