Abstract
Current real-time embedded systems development frameworks lack support for the verification of properties using explicit time where counting time (i.e., durations) may play an important role in the development process. Focusing on the real-time constraints inherent to these systems, we present a framework that addresses the specification of duration properties for runtime verification by employing a fragment of metric temporal logic with durations. We also provide an overview of the framework, the synthesis tools, and the library to support monitoring properties for real-time systems developed in C++11. The results obtained provide clear evidence of the feasibility and advantages of employing a duration-sensitive formalism to increase the dependability of avionic controller systems such as the PX4 and the Ardupilot flight stacks.
Similar content being viewed by others
Notes
By constant time, we mean that a monitor executes the same number of CPU cycles at each invocation.
The instructions to generate the C++11 code files that are the output of the use case experiments are fully detailed in [29] .
Available at https://github.com/anmaped/rmtld3synth/tree/v0.3-alpha, version 0.3-alpha.
References
Ranjbaran, M., Khorasani, K.: Fault recovery of an under-actuated quadrotor aerial vehicle. In: CDC, pp. 4385–4392 (2010)
Meier, L., Honegger, D., Pollefeys, M.: Px4: a node-based multithreaded open source robotics framework for deeply embedded platforms. In: ICRA, pp. 6235–6240 (2015)
Bauer, A., Leucker, M., Schallhart, C.: Runtime Verification for LTL and TLTL. ACM Trans. Softw. Eng. Methodol. 20(4), 14:1–14:64 (2011)
Clarke, E.M., Grumberg, O., Peled, D.A.: Model Checking. MIT Press, Cambridge (1999)
de Roever, W.P., de Boer, F.S., Hannemann, U., Hooman, J., Lakhnech, Y., Poel, M., Zwiers, J.: Concurrency Verification: Introduction to Compositional and Noncompositional Methods, volume 54 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge (2001)
Harrison, John: Handbook of Practical Logic and Automated Reasoning, 1st edn. Cambridge University Press, New York (2009)
Shin, I., Lee, I.: Periodic resource model for compositional real-time guarantees. In: RTSS, pp. 2–13 (2003)
Liu, J.W.S., Shih, W.-K., Lin, K.-J., Bettati, R., Chung, J.-Y.: Imprecise computations. Proc. IEEE 82(1), 83–94 (1994)
Mizotani, K., Hatori, Y., Kumura, Y., Takasu, M., Chishiro, H., Yamasaki, N.: An integration of imprecise computation model and real-time voltage and frequency scaling. In: CATA, pp. 63–70 (2015)
Lakhneche, Y., Hooman, J.: Metric temporal logic with durations. Theor. Comput. Sci. 138(1), 169–199 (1995)
Ouaknine, J., Worrell, J.: Some recent results in metric temporal logic. In: FORMATS ’08, pp. 1–13, Springer, Berlin (2008)
Pike, L.: Modeling time-triggered protocols and verifying their real-time schedules. In: FMCAD, pp. 231–238, (2007)
Pedro, A.M., Pereira, D., Pinho, L.M., Pinto, J.S.: Logic-based schedulability analysis for compositional hard real-time embedded systems. SIGBED Rev. 12(1), 56–64 (2015)
Platzer, A., Clarke, E.M.: Computing differential invariants of hybrid systems as fixedpoints. In: CAV, pp. 176–189. Springer, New York (2008)
Cimatti, A., Roveri, M., Tonetta, S.: Requirements validation for hybrid systems. In: CAV, pp. 188–203. Springer, New York (2009)
Pedro, A.M., Pereira, D., Pinho, L.M., Pinto, J.S.: Monitoring for a decidable fragment of mtld. In: RV, pp. 169–184. Springer, New York (2015)
Collins, G.E.: Quantifier elimination for real closed fields by cylindrical algebraic decomposition: a synopsis. SIGSAM Bull. 10(1), 10–12 (1976)
Chen, Y., Chang, L., Kuo, T.I., Mok, A.K.: Real-time task scheduling anomaly: observations and prevention. In: SAC, pp. 897–898. ACM, New York (2005)
Barringer, H., Rydeheard, D., Havelund, K.: Rule Systems for Run-Time Monitoring: From Eagle to Ruler. Springer, Berlin (2007)
Sammapun, U., Lee, I., Sokolsky, O.: Rt-mac: runtime monitoring and checking of quantitative and probabilistic properties. In: RTCSA, pp. 147–153 (2005)
Pike, L., Goodloe, A., Morisset, R., Niller, S.: Copilot: a hard real-time runtime monitor. In: RV’10, pp. 345–359. Springer, Berlin (2010)
Bauer, A., Kuster, J., Vegliach, G.: From Propositional to First-order Monitoring. Springer, Berlin (2013)
Decker, N., Leucker, M., Thoma, D.: Monitoring modulo theories. In: TACAS, pp. 341–356. Springer, New York (2014)
Bouyer, P., Chevalier, F., Markey, N.: On the expressiveness of TPTL and MTL. Inf. Comput. 208(2), 97–116 (2010)
Koymans, Ron: Specifying real-time properties with metric temporal logic. Real-Time Syst. 2(4), 255–299 (1990)
Pnueli, A.: The temporal logic of programs. In: SFCS ’77, pp. 46–57. IEEE Computer Society, Washington (1977)
Pedro, A.M.: rtmlib Monitoring Library. https://anmaped.github.io/rtmlib/doc/ (2016), version 0.1-alpha
The OCaml Development Team. Ocaml programming language (2013)
Pedro, A.M.: rmtld3synth Synthesis Tool. https://github.com/cistergit/rmtld3synth/ (2016), version 0.1-alpha
Nelissen, G., Pereira, D., Pinho, L.M.: A novel run-time monitoring architecture for safe and efficient inline monitoring. Ada-Europe 2015, 66–82 (2015)
Coombes, M., McAree, O., Chen, W. H., Render, P.: Development of an autopilot system for rapid prototyping of high level control algorithms. In: Proceedings of 2012 UKACC CONTROL, pp. 292–297 (2012)
Nutt, G.: NuttX Real-Time Operating System. http://nuttx.org/ (2007), version 7.11
Schumann, J., Moosbrugger, P., Rozier, K.Y.: R2u2: Monitoring and diagnosis of security threats for unmanned aerial systems. In: RV 2015, pp. 233–249 (2015)
Pedro, A.M.: Use Case (1) and Use Case (2) configure files with settings. https://github.com/anmaped/rmtld3synth/tree/dev/config (2016). version 1
Cassez, F., Larsen, K.G.: The impressive power of stopwatches. In: CONCUR, pp. 138–152. Springer, Berlin (2000)
Hunter, P., Ouaknine, J., Worrell, J.: Expressive completeness for metric temporal logic. In: IEEE Computer Society, pp. 349–357 (2013)
Navabpour, S., Bonakdarpour, B., Fischmeister, S.: Time-triggered runtime verification of component-based multi-core systems. In: RV. Springer, New York (2015)
Mueller, M.W., D’Andrea, R.: Stability and control of a quadrocopter despite the complete loss of one, two, or three propellers. In: IEEE international conference on robotics and automation (ICRA), pp. 45–52, (2014)
Author information
Authors and Affiliations
Corresponding author
A rmtld3synth tool User’s Guide
A rmtld3synth tool User’s Guide
The rmtld3synth synthesis tool is able to automatically generate monitors based on the formal specifications written in RMTL-\(\int _3\). Polynomial inequalities are supported by this formalism as well as the most common operators of temporal logics. Furthermore, quantification is also considered in the language of RMTL-\(\int _3\) as a means to facilitate the decomposition of the quantified formulas into several monitoring conditions.
We will now present an overview of the typical process for generating monitors for Ocaml and C++11 languages using this tool, together with a running example of a simple monitoring case generation. We begin by the running example, present the generated monitors, and show how to configure the RV monitoring model to couple with the system.
Consider the formula
that intuitively describes that given an event a, b occurs until c and, at the same time, the duration of b shall be less than four time units over the next 10 time units. For instance, a trace that satisfies this formula is
From rmtld3synth2ocaml tool, we have synthesized the formula’s example into the code of Listing 4. For that, we have used the command in Listing 2.
Next, we can also generate C++11 monitors by replacing –synth-ocaml with –synth-cpp11. The outcome is the monitor illustrated in Listing 5. To use those monitors, we need to define a trace for Ocaml reference as in Listing 3.
For the Ocaml language, experimental integration with RTMLib is available. However, we do not describe it here, but refer the reader for the examples in rmtld3synth’s repository Footnote 3. For C++11 we will now briefly describe how it is performed. Given the verbosity of the generated code, we have removed the conjunction including the duration inequality and used instead the simple formula
Now, we describe the settings for constructing the RV monitoring model.
Overview of the configuration settings. The settings for rmtld3synth tool are defined using the syntax
where | distinguishes between the supported types of arguments such as Boolean, integer or string, and setting_id is a string containing the name of the setting to which values are assigned. An example of a set of possible settings for the tool is given in the first five lines of Listing 6.
We now briefly describe the purpose of each of the setting entries present in Listing 6:
-
gen_tests sets the automatic generations of test cases (to be used as a demo for testing monitor’s execution).
-
gen_concurrency_tests constructs tests for testing lock- and wait-free monitors executing concurrently.
-
gen_unit_tests constructs tests for C++11 synthesis using the Ocaml source code as an oracle.
-
buffer_size sets the static size of the buffer to be used (rmtld3synth tool can change it if required by some constraints).
-
minimum_inter_arrival_time establishes the minimum inter-arrival time that the events can have. It is a very pessimistic setting but provides some information for static checking.
-
maximum_period sets the maximum interval between two consecutive releases of a task’s job. It has a correlation between the periodic monitor and the minimum inter-arrival time. It provides static checks according to the size of time stamps of events.
-
event_type provides the type for dealing with events (commonly is a class parameter).
-
event_subtype provides the type for the event data. In that case, it is an identifier that can distinct 255 events. However, if more events are required, the type should be modified to *uint32_t* or greater. The number of different events versus the available size for the identifier is also statically checked.
-
cluster_name identifies the set of monitors. It acts as a label for grouping monitor specifications.
Writing formulas in RMTLD3 The formulas “m_simple” and “m_morecomplex” follow the same syntax defined in this document. For setting a periodic monitor, we use . They are formatted as a symbolic expression. The type of monitors in Ocaml is according to Listing 7.
Rights and permissions
About this article
Cite this article
de Matos Pedro, A., Pinto, J.S., Pereira, D. et al. Runtime verification of autopilot systems using a fragment of MTL-\({\int }\) . Int J Softw Tools Technol Transfer 20, 379–395 (2018). https://doi.org/10.1007/s10009-017-0470-5
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-017-0470-5