On Two Friends for Getting Correct Programs
We report on our progress-to-date in implementing a software development environment which integrates the efforts of two formal software engineering techniques: program refinement as supported by Event B and program verification as supported by the Spec# programming system. Our objective is to improve the usability of formal verification tools by providing a general framework for integrating these two approaches to software verification. We show how the two approaches Correctness-by-Construction and Post-hoc Verification can be used in a productive way. Here, we focus on the final steps in this process where the final concrete specification is transformed into an executable algorithm. We present EB2RC, a plug-in for the Rodin platform, that reads in an Event B model and uses the control framework introduced during its refinement to generate a graphical representation of the executable algorithm. EB2RC also generates a recursive algorithm that is easily translated into executable code. We illustrate our technique through case studies and their analysis.
- 5.Kaufmann, M., Moore, S.J.: Some key research problems in automated theorem proving for hardware software verification. Revista de la Real Academia de Ciencias Exactas, Físicas y Naturales. Serie A. Matemâticas 98(1), 181–195 (2004)Google Scholar
- 7.Leavens, G.T., Abrial, J.-R., Batory, D., Butler, M., Coglio, A., Fisler, K., Hehner, E., Jones, C., Miller, D., Peyton-Jones, S., Sitaraman, M., Smith, D.R., Stump, A.: Roadmap for enhanced languages and methods to aid verification. In: 5th International Conference on Generative Programming and Component Engineering, Portland, Oregon, pp. 221–235. ACM (2006)Google Scholar
- 9.Méry, D.: Refinement-based guidelines for algorithmic systems. Int. J. Softw. Inform. 3(2–3), 197–239 (2009)Google Scholar
- 10.Méry, D., Monahan, R.: Transforming Event-B models into verified C# implementations. In: 1st International Workshop on Verification and Program Transformation, Saint Petersburg, Russia, pp. 57–73. EasyChair (2013)Google Scholar
- 11.Méry, D., Singh, N.K.: The EB2ALL code generation tool (2011). http://eb2all.loria.fr/
- 12.Project RODIN. Rigorous open development environment for complex systems (2004). http://rodin-b-sharp.sourceforge.net/