Advertisement

Extracting Hybrid Automata from Control Code

  • Steven Lyde
  • Matthew Might
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7871)

Abstract

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.

Keywords

Model Checker Transition Relation Abstract Interpretation Hybrid Automaton Liveness Property 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Agrawal, A., Simon, G., Karsai, G.: Semantic Translation of Simulink/Stateflow Models to Hybrid Automata Using Graph Transformations. Electron. Notes Theor. Comput. Sci. 109, 43–56 (2004)CrossRefGoogle Scholar
  2. 2.
    Bouissou, O.: From control-command synchronous programs to hybrid automata. In: Analysis and Design of Hybrid Systems, pp. 291–298 (2012)Google Scholar
  3. 3.
    Cousot, P.: Integrating physical systems in the static analysis of embedded control software. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 135–138. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 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. 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
  6. 6.
    Felleisen, M., Friedman, D.P.: A calculus for assignments in higher-order languages. In: POPL 1987: Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 314–325. ACM, New York (1987)CrossRefGoogle Scholar
  7. 7.
    Flanagan, C., Sabry, A., Duba, B.F., Felleisen, M.: The essence of compiling with continuations. In: PLDI 1993: Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pp. 237–247. ACM, New York (1993)CrossRefGoogle Scholar
  8. 8.
    Henzinger, T.A., Ho, P.-H., Wong-Toi, H.: A user guide to hytech. In: Brinksma, E., Steffen, B., Cleaveland, W.R., Larsen, K.G., Margaria, T. (eds.) TACAS 1995. LNCS, vol. 1019, pp. 41–71. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  9. 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
  10. 10.
    Henzinger, T.A., Ho, P.H., Toi, H.W.: HYTECH: A model checker for hybrid systems. International Journal on Software Tools for Technology Transfer 1(1-2), 110–122 (1997)CrossRefGoogle Scholar
  11. 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. 12.
    Shivers, O.G.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA (1991)Google Scholar
  13. 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. 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. 15.
    Hybrid Automata Extraction, https://github.com/stevenlyde/ha-extraction

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Steven Lyde
    • 1
  • Matthew Might
    • 1
  1. 1.University of UtahSalt Lake CityUSA

Personalised recommendations