Refactoring, Refinement, and Reasoning
Refactoring of code is a common device in software engineering. As cyber-physical systems (CPS) become ever more complex, similar engineering practices become more common in CPS development. Proper safe developments of CPS designs are accompanied by a proof of correctness. Since the inherent complexities of CPS practically mandate iterative development, frequent changes of models are standard practice, but require reverification of the resulting models after every change.
To overcome this issue, we develop proof-aware refactorings for CPS. That is, we study model transformations on CPS and show how they correspond to relations on correctness proofs. As the main technical device, we show how the impact of model transformations on correctness can be characterized by different notions of refinement in differential dynamic logic. Furthermore, we demonstrate the application of refinements on a series of safety-preserving and liveness-preserving refactorings. For some of these we can give strong results by proving on a meta-level that they are correct. Where this is impossible, we construct proof obligations for showing that the refactoring respects the refinement relation.
Unable to display preview. Download preview PDF.
- 1.Abrial, J.R., Butler, M.J., Hallerstede, S., Hoang, T.S., Mehta, F., Voisin, L.: Rodin: an open toolset for modelling and reasoning in Event-B. STTT 12(6) (2010)Google Scholar
- 8.Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring—Improving the Design of Existing Code. Addison-Wesley (1999)Google Scholar
- 11.Kouskoulas, Y., Platzer, A., Kazanzides, P.: Formal methods for robotic system control software. Tech. Rep. 2, Johns Hopkins University APL (2013)Google Scholar
- 12.Kouskoulas, Y., Renshaw, D., Platzer, A., Kazanzides, P.: Certifying the safe design of a virtual fixture control algorithm for a surgical robot. In: Belta, C., Ivancic, F. (eds.) HSCC. ACM (2013)Google Scholar
- 13.Mitsch, S., Ghorbal, K., Platzer, A.: On provably safe obstacle avoidance for autonomous robotic ground vehicles. In: Robotics: Science and Systems (2013)Google Scholar
- 14.Mitsch, S., Loos, S.M., Platzer, A.: Towards formal verification of freeway traffic control. In: Lu, C. (ed.) ICCPS, pp. 171–180. IEEE (2012)Google Scholar
- 15.Mitsch, S., Passmore, G.O., Platzer, A.: A vision of collaborative verification-driven engineering of hybrid systems. In: Kerber, M., Lange, C., Rowat, C. (eds.) Do-Form, pp. 8–17. AISB (2013)Google Scholar
- 16.Mitsch, S., Quesel, J.D., Platzer, A.: Refactoring, refinement, and reasoning: A logical characterization for hybrid systems. Tech. Rep. CMU-CS-14-103, Carnegie Mellon (2014)Google Scholar
- 17.Opdyke, W.F.: Refactoring Object-oriented Frameworks. Ph.D. thesis, Champaign, IL, USA, uMI Order No. GAX93-05645 (1992)Google Scholar
- 19.Platzer, A.: A complete axiomatization of quantified differential dynamic logic for distributed hybrid systems. Logical Methods in Computer Science 8(4), 1–44 (2012) (special issue for selected papers from CSL 2010)Google Scholar
- 20.Platzer, A.: Logics of dynamical systems. In: LICS, pp. 13–24. IEEE (2012)Google Scholar
- 21.Platzer, A.: The structure of differential invariants and differential cut elimination. Logical Methods in Computer Science 8(4), 1–38 (2012)Google Scholar
- 25.Schneider, S., Treharne, H., Wehrheim, H.: The behavioural semantics of Event-B refinement. Formal Aspects of Computing, 1–30 (2012)Google Scholar
- 26.Tabuada, P.: Verification and Control of Hybrid Systems: A Symbolic Approach. Springer (2009)Google Scholar