Abstract
This paper presents a new two-step verification method for control software. The novelty of the method is that it reduces the verification of the temporal properties of a control program to the deductive verification of an imperative program in the Hoare style, which explicitly models the time and history of the control program. The method is applied to programs written in the Reflex language, a domain-specific extension of C developed as an alternative to the languages of the IEC 61131-3 standard. Reflex is a process-oriented language that describes control programs in terms of communicating processes controlled by operator events, including the events generated by operations on discrete time intervals. At the first step, an annotated Reflex program is translated into an equivalent annotated imperative program on a bounded subset of C, which is extended with the logical type bool, supertype value (which combines the values that can return Reflex functions and operators), and statement havoc x (which assigns an arbitrary value to the variable x). At the second step, the resulting imperative program undergoes deductive verification. The proposed method is illustrated by the example of deductive verification of a Reflex program that controls a hand dryer. The example includes the original Reflex program, a set of requirements, the resulting annotated program, the correctness conditions generated, and results of verifying these conditions in Z3py, an interface to the Z3 SMT solver implemented in Python.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.REFERENCES
Blanke, M., Kinnaert, M., Lunze, J., and Staroswiecki, M., Diagnosis and Fault-Tolerant Control, Springer, 2006, 2nd ed.
IEC 61131-3: Programmable controllers, Part 3: Programming languages, Rev. 2.0, International Electrotechnical Commission Std., 2003.
Basile, F., Chiacchio, P., and Gerbasio, D., On the implementation of industrial automation systems based on PLC, IEEE Trans. Autom. Sci. Eng., 2013, vol. 4, no. 10, pp. 990–1003.
Thramboulidis, K. and Frey, G., An MDD process for IEC 61131-based industrial automation systems, Proc. 16th IEEE Int. Conf. Emerging Technologies and Factory Automation (ETFA), Toulouse, France, 2011, pp. 1–8.
IEC 61499: Function blocks for industrial process measurement and control systems, Parts 1–4, Rev. 1.0, International Electrotechnical Commission Std., 2004–2005.
Wagner, F., Schmuki, R., Wagner, T., and Wolstenholme, P., Modeling Software with Finite State Machines, Boston: Auerbach, 2006.
Samek, M., Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems, Oxford: Newnes, 2009, 2nd ed.
Control Technology Corporation, QuickBuilderTM reference guide, 2018. https://controltechnologycorp.com/docs/QuickBuilder_Ref.pdf. Accessed January 20, 2019.
Zyubin, V.E., Hyper-automaton: A model of control algorithms, Proc. IEEE Int. Sib. Conf. Control and Communications (SIBCON), Tomsk, Russia, 2007, pp. 51–57.
Hoare, C.A.R., Communicating Sequential Processes, Prentice-Hall, 1985.
Harel, D., Statecharts: A visual formalism for complex systems, Sci. Comput. Program., 1987, vol. 8, no. 3, pp. 231–274.
Lynch, N. and Tuttle, M., An introduction to input/output automata, CWI Quarterly, 1989, vol. 2, no. 3, pp. 219–246.
Berry, G., The foundations of Esterel, Proof, Language, and Interaction: Essays in Honour of Robin Milner, MIT Press, 2000, pp. 425–454.
Henzinger, T.A., The theory of hybrid automata, Verification of Digital and Hybrid Systems, NATO ASI Series (Series F: Computer and Systems Sciences), Inan, M.K. and Kurshan, R.P., Eds., Springer, 2000, vol. 170, pp. 265–292.
Milner, R., Communication and Concurrency, New Jersey: Prentice Hall, 1989.
Kaynar, D.K., Lynch, N., Segala, R., and Vaandrager, F., Timed I/O automata: A mathematical framework for modeling and analyzing real-time systems, Proc. 24th IEEE Int. Real-Time Systems Symp. (RTSS), Cancun, Mexico, 2003, pp. 166–177.
Kof, L. and Schätz, B., Combining aspects of reactive systems, Proc. Andrei Ershov 5th Int. Conf. Perspectives of System Informatics, Novosibirsk, 2003, pp. 239–243.
Zyubin, V., SPARM language as a means for programming microcontrollers, Optoelectron., Instrum., Data Process., 1996, vol. 2, no. 7, pp. 36–44.
Liakh, T.V., Rozov, A.S., and Zyubin, V.E., Reflex language: A practical notation for cyber-physical systems, Syst. Inf., 2018, vol. 12, no. 6, pp. 85–104.
Rozov, A.S. and Zyubin, V.E., Process-oriented programming language for MCU-based automation, Proc. IEEE Int. Sib. Conf. Control and Communications, Tomsk, Russia, 2013, pp. 1–4.
Bulavskij, D., Zyubin, V., Karlson, N., Krivoruchko, V., and Mironov, V., An automated control system for a silicon single-crystal growth furnace, Optoelectron., Instrum., Data Process., 1996, vol. 2, no. 5, pp. 25–30.
Travis, J. and Kring, J., LabVIEW for Everyone: Graphical Programming Made Easy and Fun, New Jersey: Prentice Hall, 2006, 3rd ed.
Zyubin, V., Using process-oriented programming in LabVIEW, Proc. 2nd IASTED Int. Multi-Conf. “Automation, Control, and Information Technology: Control, Diagnostics, and Automation,” Novosibirsk, 2010, pp. 35–41.
Randell, B., Software engineering techniques, Report on a conference sponsored by the NATO Science Committee, Brussels, Scientific Affairs Division, NATO, Rome, Italy, 1970, p. 16.
Z3 API in Python. https://ericpony.github.io/z3py-tutorial/guide-examples.htm. Accessed January 20, 2019.
Moura, L. and Bjørner, N., Z3: An efficient SMT solver, Proc. Conf. Tools and Algorithms for the Construction and Analysis of Systems (TACAS), Lect. Notes Comput. Sci., 2008, vol. 4963, pp. 337–340.
Anureev, I.S., Garanina, N.O., Liakh, T.V., Rozov, A.S., Zyubin, V.E., and Gorlatch, S., Two-step deductive verification of control software using Reflex, Proc. A.P. Ershov Informatics Conference (PSI), Novosibirsk, Russia, Lect. Notes Comput. Sci., 2019, vol. 11964, pp. 50–63.
Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., and Leino, K.R.M., Boogie: A modular reusable verifier for object-oriented programs, Proc. 4th Int. Conf. Formal Methods for Components and Objects, Lect. Notes Comput. Sci., 2005, vol. 4111, pp. 364–387.
FramaC homepage. https://frama-c.com.
Spark Pro homepage. https://www.adacore.com/ sparkpro.
The KeY project homepage. https://www.key-project.org.
Dafny homepage. https://www.microsoft.com/en-us/research/project/dafny-a-language-and-program-verifier-for-functional-correctness.
Dijkstra, E.W. and Scholten, C.S., Predicate Calculus and Program Semantics, Springer, 1990.
Nepomniaschy, V., Anureev, I., Mikhailov, I., and Promsky, A., Towards verification of C programs: C‑light language and its formal semantics, Program. Comput. Software, 2002, vol. 28, no. 6, pp. 314–323.
Nepomniaschy, V., Anureev, I., and Promsky, A., Towards verification of C programs: Axiomatic semantics of the C-kernel language, Program. Comput. Software, 2003, vol. 29, no. 6, pp. 338–350.
Garanina, N., Zyubin, V., Lyakh, V., and Gorlatch, S., An ontology of specification patterns for verification of concurrent systems, New Trends in Intelligent Software Methodologies, Tools, and Techniques (Proc. 17th Int. Conf. SoMeT), Series: Frontiers in Artificial Intelligence and Applications, Amsterdam: IOS Press, 2018, pp. 515–528.
ACL2 homepage. http://www.cs.utexas.edu/users/ moore/acl2.
Anureev, I.S., Operational ontological approach to formal programming language specification, Program. Comput. Software, 2009, vol. 35, no. 1, pp. 35–42.
Funding
This work was supported by the State budget of the Russian Federation (IAE project no. AAAA-A19-119120290056-0), Russian Foundation for Basic Research (project nos. 17-07-01600 and 20-01-00541), and German Federal Ministry of Education and Research (project HPC2SE).
Author information
Authors and Affiliations
Corresponding authors
Additional information
Translated by Yu. Kornienko
Rights and permissions
About this article
Cite this article
Anureev, I.S., Garanina, N.O., Lyakh, T.V. et al. Dedicative Verification of Reflex Programs. Program Comput Soft 46, 261–272 (2020). https://doi.org/10.1134/S0361768820040027
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768820040027