KODEGEN: A Code Generation and Testing Tool Using Runnable Knowledge

  • Iaakov ExmanEmail author
  • Anton Litovka
  • Reuven Yagel
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 454)


KDE – Knowledge Driven Engineering – is a generalization of MDE – Model Driven Engineering – to a higher level of abstraction than the standard UML software models, aiming to be closer to the system designer concepts. But in order to reach an effective technology applicable in industry, one needs to implement it in a tool using Runnable Knowledge, i.e. which can be run and tested. This work describes KODEGEN – a KDE tool for testing while generating code – whose input consists of system ontologies, ontology states and scenario files. Incidental concepts not part of the ontologies are replaced by mock objects. The implementation uses a modified Gherkin syntax. The tool is demonstrated in practice by generating the actual code for a few case-studies.


KDE Runnable knowledge Ontology Ontology states Model testing Mock objects 


  1. 1.
    Adzic, G.: Test Driven .NET Development with FitNesse. Neuri, London (2008)Google Scholar
  2. 2.
    Adzic, G.: Bridging the Communication Gap: Specification by Example and Agile Acceptance Testing. Neuri, London (2009)Google Scholar
  3. 3.
    Adzic, G.: Specification by Example – How Successful Teams Deliver the Right Software. Manning, New York (2011)Google Scholar
  4. 4.
    Beck, K.: Test Driven Development: By Example. Addison-Wesley, Boston (2002)Google Scholar
  5. 5.
    Boehm, B.W.: Software engineering economics. IEEE Trans. Softw. Eng. 10, 4–21 (1984)CrossRefGoogle Scholar
  6. 6.
    Brown, A.W.: Model driven architecture: principles and practice. Softw. Syst. Model 3, 314–327 (2004). doi: 10.1007/s10270-004-0061-2 Google Scholar
  7. 7.
    Calero, C., Ruiz, F., Piattini, M. (eds.): Ontologies in Software Engineering and Software Technology. Springer, Heidelberg (2006)zbMATHGoogle Scholar
  8. 8.
    Chelimsky, D., Astels, D., Dennis, Z., Hellesoy, A., Helmkamp, B., North, D.: The RSpec Book: Behaviour Driven Development with RSpec, Cucumber, and Friends. Pragmatic Programmer, New York (2010)Google Scholar
  9. 9.
    Exman, I., Llorens, J., Fraga, A.: Software knowledge. In: Exman, I., Llorens, J., Fraga, A. (eds.) Proceedings of SKY 2011, 2nd International Workshop on Software Knowledge (2010)Google Scholar
  10. 10.
    Exman, I., Yagel, R.: ROM: a runnable ontology model testing tool. In: Fred, A., Dietz, J.L.G., Liu, K., Filipe, J. (eds.) Knowledge Discovery, Knowledge Engineering and Knowledge Management, pp. 271–283. Springer, Heidelberg (2012)Google Scholar
  11. 11.
    Freeman, S., Pryce, N.: Growing Object-Oriented Software, Guided by Tests. Addison-Wesley, Boston (2009)Google Scholar
  12. 12.
    KODEGEN – the tool (2013).
  13. 13.
    Moq – the simplest mocking library for .NET and Silverlight (2012).
  14. 14.
    North, D.: Introducing Behaviour Driven Development. Better Software Magazine (2006).
  15. 15.
    NUnit (2012).
  16. 16.
    Pan, J.Z., Staab, S., Assmann, U., Ebert, J., Zhao, Y. (eds.): Ontology-Driven Software Development. Springer, Heidelberg (2013)zbMATHGoogle Scholar
  17. 17.
    Parreiras, F.S.: Semantic Web and Model-Driven Engineering. John Wiley and IEEE Press, Hoboken (2012)CrossRefGoogle Scholar
  18. 18.
    RSpec mocks library (2013).
  19. 19.
    Smart, J.F.: BDD in Action Behavior-Driven Development for the Whole Software Lifecycle. Manning, New York (2014)Google Scholar
  20. 20.
    SpecFlow – Pragmatic BDD for .NET (2010).
  21. 21.
    Wynne, M., Hellesoy, A.: The Cucumber Book: Behaviour Driven Development for Testers and Developers. Pragmatic Programmer, New York (2012)Google Scholar
  22. 22.
    Yagel, R.: Can executable specifications close the gap between software requirements and implementation? In: Exman, I., Llorens, J., Fraga, A. (eds.) Proceedings of SKY 2011 International Workshop on Software Engineering, pp. 87–91. SciTePress, France, (2011)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  1. 1.Software Engineering DepartmentThe Jerusalem College of Engineering – AzrieliJerusalemIsrael

Personalised recommendations