From Declarative to Imperative UML/OCL Operation Specifications

  • Jordi Cabot
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4801)


An information system maintains a representation of the state of the domain in its Information Base (IB). The state of the IB changes due to the execution of the operations defined in the behavioral schema. There are two different approaches for specifying the effect of an operation: the imperative and the declarative approaches. In conceptual modeling, the declarative approach is preferable since it allows a more abstract and concise definition of the operation effect and conceals all implementation issues. Nevertheless, in order to execute the conceptual schema, declarative specifications must be transformed into equivalent imperative ones.

Unfortunately, declarative specifications may be non-deterministic. This implies that there may be several equivalent imperative versions for the same declarative specification, which hampers the transformation process. The main goal of this paper is to provide a pattern-based translation method between both specification approaches. To facilitate the translation we propose some heuristics that improve the precision of declarative specifications and help avoid non-determinism in the translation process.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ahrendt, W., Baar, T., Beckert, B., Bubel, R., Giese, M., Hähnle, R., Menzel, W., Mostowski, W., Roth, A., Schlager, S., Schmitt, P.H.: The KeY tool, Integrating object oriented design and formal verification. Software and Systems Modeling 4, 32–54 (2005)CrossRefGoogle Scholar
  2. 2.
    Baar, T.: OCL and Graph-Transformations - A Symbiotic Alliance to Alleviate the Frame Problem. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 20–31. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  3. 3.
    Babes-Bolyai. Object Constraint Language Environment 2.0,
  4. 4.
    Borgida, A., Mylopoulos, J., Reiter, R.: On the frame problem in procedure specifications. IEEE Transactions on Software Engineering 21, 785–798 (1995)CrossRefGoogle Scholar
  5. 5.
    Borland. Borland® Together® Architect (2006)Google Scholar
  6. 6.
    Broersen, J., Wieringa, R.: Preferential Semantics for Action Specifications in First-order Modal Action Logic. In: Proc. of the ECAI’98 Workshop on Practical Reasoning and Rationality (1998)Google Scholar
  7. 7.
    Cabot, J.: Ambiguity issues in OCL postconditions. In: Proc. OCL for (Meta-) Models in Multiple Application Domain (workshop co-located with the MODELS’06 Conference), Technical Report, TUD-FI06-04-Sept (2006)Google Scholar
  8. 8.
    Cabot, J., Teniente, E.: Transformation Techniques for OCL Constraints. Science of Computer Programming (to appear), Available online:
  9. 9.
    Dresden. Dresden, OCL Toolkit,
  10. 10.
    Dzidek, W.J., Briand, L.C., Labiche, Y.: Lessons Learned from Developing a Dynamic OCL Constraint Enforcement Tool for Java. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 10–19. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  11. 11.
    Frias, L., Queralt, A., Olivé, A.: EU-Rent Car Rentals Specification. LSI Technical Report, LSI-03-59-R (2003)Google Scholar
  12. 12.
    ISO/TC97/SC5/WG3: Concepts and Terminology for the Conceptual Schema and Information Base (1982)Google Scholar
  13. 13.
    Kosiuczenko, P.: Specification of Invariability in OCL. In: Nierstrasz, O., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 676–691. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  14. 14.
    Larman, C.: Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, 2nd edn. Prentice-Hall, Englewood Cliffs (2001)Google Scholar
  15. 15.
    Mayol, E., Teniente, E.: A Survey of Current Methods for Integrity Constraint Maintenance and View Updating. In: Akoka, J., Bouzeghoub, M., Comyn-Wattiau, I., Métais, E. (eds.) ER 1999. LNCS, vol. 1727, pp. 62–73. Springer, Heidelberg (1999)Google Scholar
  16. 16.
    Mellor, S.J., Balcer, M.J.: Executable UML. Object Technology Series. Addison-Wesley, London, UKGoogle Scholar
  17. 17.
    Meyer, B.: Object-oriented software construction, 2nd edn. Prentice-Hall, Englewood Cliffs (1997)zbMATHGoogle Scholar
  18. 18.
    Olivé, A.: Conceptual Schema-Centric Development: A Grand Challenge for Information Systems Research. In: Pastor, Ó., Falcão e Cunha, J. (eds.) CAiSE 2005. LNCS, vol. 3520, pp. 1–15. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  19. 19.
    Olivé, A., Raventós, R.: Modeling events as entities in object-oriented conceptual modeling languages. Data Knowl. Eng. 58, 243–262 (2006)CrossRefGoogle Scholar
  20. 20.
    OMG: UML 2.0 OCL Specification. OMG Adopted Specification (ptc/03-10-14)Google Scholar
  21. 21.
    OMG: UML 2.0 Superstructure Specification. OMG Adopted Specification (ptc/03-08-02)Google Scholar
  22. 22.
    Penny, D.A., Holt, R.C., Godfrey, M.W.: Formal Specification in Metamorphic Programming. In: Prehn, S., Toetenel, H. (eds.) VDM 1991. LNCS, vol. 551, pp. 11–30. Springer, Heidelberg (1991)Google Scholar
  23. 23.
    Queralt, A., Teniente, E.: A Platform Independent Model for the Electronic Marketplace Domain. LSI Technical Report, LSI-05-9-R (2005)Google Scholar
  24. 24.
    Queralt, A., Teniente, E.: Specifying the Semantics of Operation Contracts in Conceptual Modeling. Journal on Data Semantics VII, 33–56 (2006)zbMATHGoogle Scholar
  25. 25.
    Schewe, K.-D., Thalheim, B.: Towards a theory of consistency enforcement. Acta Informatica 36, 97–141 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Sendall, S., Strohmeier, A.: Using OCL and UML to Specify System Behavior. In: Object Modeling with the OCL, The Rationale behind the Object Constraint Language, pp. 250–280. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  27. 27.
    Wahls, T., Leavens, G.T., Baker, A.L.: Executing Formal Specifications with Concurrent Constraint Programming. Autom. Softw. Eng. 7, 315–343 (2000)CrossRefzbMATHGoogle Scholar
  28. 28.
    Wieringa, R.: A survey of structured and object-oriented software specification methods and techniques. ACM Computing Surveys 30, 459–527 (1998)CrossRefGoogle Scholar
  29. 29.
    Wüthrich, B.: On Updates and Inconsistency Repairing in Knowledge Bases. In: Proc. 9th Int. Conf. on Data Engineering, pp. 608–615 (1993)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Jordi Cabot
    • 1
  1. 1.Estudis d’Informàtica, Multimèdia i Telecomunicació, Universitat Oberta de Catalunya, Rbla. Poblenou 156. E08018 BarcelonaSpain

Personalised recommendations