A Declarative Approach for Software Modeling

  • Mayer Goldberg
  • Guy Wiener
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7149)


In this paper we describe a method for encoding software models as Prolog programs, and how to use these programs to support incremental development. Requirements, alternative designs, and implementation patterns are encoded as predicates in the program, and define a search routine, the solutions of which are possible implementations of the requirements. Under default operation, this routine validates that a given parsed code is compatible with one of these solutions. Additionally, the same search routine can be executed by special interpreters that provide traceability and code generation as well. Code generation may be complete or partial, allowing the user to combine hand-written and generated code. By customizing the interpreter, the user can generate an outline of the design or a tasks list, instead of code. We demonstrate these techniques using Java and SQL, but our approach is applicable to other programming languages and paradigms as well.


Code Generation Partial Evaluation Proof Tree Prolog Program Incremental Development 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abrial, J.: The B-book: assigning programs to meanings. Cambridge University Press (1996)Google Scholar
  2. 2.
    Blaha, M., Premerlani, W.: Object-oriented modeling and design for database applications. Prentice-Hall, Inc., Upper Saddle River (1997)Google Scholar
  3. 3.
    Clarke, J., Dolado, J., Harman, M., Hierons, R., Jones, B., Lumkin, M., Mitchell, B., Mancoridis, S., Rees, K., Roper, M., Shepperd, M.: Reformulating software engineering as a search problem. IEEE Software 150(3), 161–175 (2003)CrossRefGoogle Scholar
  4. 4.
    Favre, J.M.: Towards a basic theory to model model driven engineering. In: 3rd Workshop in Software Model Engineering, WiSME (2004)Google Scholar
  5. 5.
    Fowler, M.: Analysis patterns: reusable objects models. Addison-Wesley Longman Publishing Co., Inc., Boston (1997)Google Scholar
  6. 6.
    Goldberg, M., Wiener, G.: Round-Trip Modeling using OPM/PL. In: International Conference on Software Science, Technology and Engineering, SwSTE (2010)Google Scholar
  7. 7.
    Harman, M., Clark, J.: Metrics are fitness functions too. In: 10th International Symposium on Software Metrics, pp. 58–69 (2004)Google Scholar
  8. 8.
    Kang, K.: Feature-oriented domain analysis (FODA) feasibility study. Technical report, Carnegie-Mellon University, Pittsburgh PA, USA (1990)Google Scholar
  9. 9.
    Kniesel, G., Hannemann, J., Rho, T.: A comparison of logic-based infrastructures for concern detection and extraction. In: 3rd Workshop on Linking Aspect Technology and Evolution, p. 6. ACM (2007)Google Scholar
  10. 10.
    Object Management Group: Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification (2008),
  11. 11.
    ROOTS Group: The JTransformer project web page,
  12. 12.
    Schmidt, D.: Guest editor’s introduction: Model-driven engineering. Computer 39(2), 25–31 (2006)CrossRefGoogle Scholar
  13. 13.
    Sefika, M., Sane, A., Campbell, R.: Monitoring compliance of a software system with its high-level design models. In: 18th International Conference for Software Engineering, ICSE, vol. 18, pp. 387–396 (1996)Google Scholar
  14. 14.
    Shoham, Y.: Artificial Intelligence Techniques in PROLOG. Morgan Kaufmann Publishers Inc., San Francisco (1993)zbMATHGoogle Scholar
  15. 15.
    Soley, R.: The OMG Staff Strategy Group: Model-Driven Architecture. White paper (November 2000),
  16. 16.
    Sterling, L., Shapiro, E.: The art of Prolog. MIT Press, Cambridge (1994)zbMATHGoogle Scholar
  17. 17.
    Stevens, P.: Bidirectional model transformations in QVT: Semantic issues and open questions. Software and Systems Modeling 9(1), 7–20 (2010)CrossRefGoogle Scholar
  18. 18.
    Wiener, G.: Heuristic partial evaluator source code,
  19. 19.
    Wiener, G.: Persistent Semantic Information. PhD thesis, Ben-Gurion University (March 2011) (to be published)Google Scholar
  20. 20.
    Winkler, S., Pilgrim, J.: A survey of traceability in requirements engineering and model-driven development. Software and System Modeling 9, 529–565 (2010)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Mayer Goldberg
    • 1
  • Guy Wiener
    • 2
  1. 1.Dept. of Computer ScienceBen-Gurion University of the NegevIsrael
  2. 2.Dept. of Computer Science & Applied MathematicsWeizmann Institute for ScienceIsrael

Personalised recommendations