Teaching Programming with Formal Models in Greenfoot

In: Proceedings of the 2nd International Conference on Computer Supported Education 2010 / Cordeiro, José; Verbraeck, Alexander; Helfert, Marcus (Hrsg.)
Valencia, Spain: INSTICC Press (2010), S. 309-316
ISBN: 978-989-674-024-5
Buchaufsatz / Kapitel / Fach: Informatik
Formal methods for software development are subject to teaching in computer science as a matter of course. However, it is difficult to relate the theories to the practical matter of program code creation. The reason for this is the complexity of model-driven software development approaches which would be needed to derive executable applications from formal models, but are usually not in the focus of the courses. We propose to teach formal methods by using ``embedded models'', i.e. program code patterns that represent the semantics of formal methods inside arbitrary object-oriented programs. The approach is realized within the Greenfoot graphical simulation enginge. With this approach the technical barrier to the practical use of formal methods is lowered, so that students can easily experiment with such models in a game-oriented environment.