Extracting Hybrid Automata from Control Code
Formal methods—and abstract interpretation in particular—can assist in the development of correct control code. However, current approaches to deploying formal methods do not always match the way practicing engineers develop real control code. Engineers tend to think in code first—not formal models. Standard practice is for engineers to develop their control code and then build a model like a hybrid automaton from which to verify properties. Since the construction of this model is manual, it leaves open the possibility of error. Existing formal approaches, on the other hand, tend to focus on synthesizing control code from a verified formal model. We propose a method for synthesizing a hybrid automaton from the control code directly. Specifically, we use abstract interpretation to create an abstract state transition system, and from this we systematically extract a hybrid automaton. Not only does this eliminate the introduction of error into the model based on the code, it fits with common practice in engineering cyberphysical systems. We test the technique on a couple examples—control code for a thermostat and a nuclear reactor. We then pass the generated automata to the HyTech model-checker to verify safety and liveness properties.
KeywordsModel Checker Transition Relation Abstract Interpretation Hybrid Automaton Liveness Property
Unable to display preview. Download preview PDF.
- 2.Bouissou, O.: From control-command synchronous programs to hybrid automata. In: Analysis and Design of Hybrid Systems, pp. 291–298 (2012)Google Scholar
- 4.Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Conference Record of the Fourth ACM Symposium on Principles of Programming Languages, pp. 238–252. ACM Press, New York (1977)Google Scholar
- 5.Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: POPL 1979: Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 269–282. ACM Press, New York (1979)Google Scholar
- 9.Henzinger, T.A.: The theory of hybrid automata. In: Proceedings of the Eleventh Annual IEEE Symposium on Logic in Computer Science, LICS 1996, pp. 278–292. IEEE (July 1996)Google Scholar
- 11.Lyde, S., Might, M.: Extracting hybrid automata from control code. Tech. rep., University of Utah (2013), http://matt.might.net/a/2013/03/03/ha-extract/lyde2013hybrid.pdf
- 12.Shivers, O.G.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA (1991)Google Scholar
- 13.Silva, B.I., Richeson, K., Krogh, B., Chutinan, A.: Modeling and verifying hybrid dynamic systems using checkmate. In: Proceedings of 4th International Conference on Automation of Mixed Processes, pp. 323–328 (2000)Google Scholar
- 14.Van Horn, D., Might, M.: Abstracting abstract machines. In: ICFP 2010: Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming, pp. 51–62. ACM Press (2010)Google Scholar
- 15.Hybrid Automata Extraction, https://github.com/stevenlyde/ha-extraction