Skip to main content
Log in

Incremental semantic analysis for OCL compilers

  • SI: Engineering of Computer-Based Systems
  • Published:
Innovations in Systems and Software Engineering Aims and scope Submit manuscript

Abstract

In software engineering, modeling with unified modeling language and object constraint language became industry standards and are supported by many computer-aided software engineering tools. The increasing number of the modeled functionalities results in complex models that need more and more textual constraints to express the hidden restrictions applied to the systems. During the metamodel development, rebuilding all the constraints is unnecessary when only a few changes have been applied due to the iterative, incremental manner of modifications. In this paper, we present a family of algorithms that handles the changes in constraints incrementally on the expression level; thus, the required rebuilds are kept to a minimum. Incremental variable reference resolving and type checking are performed as a part of the incremental semantic analysis. Balancing between the incremental and standard compilation is also considered, heuristics are given to select the faster method of compilation at each iteration. With the achieved results the duration of metamodel development can be decreased; thus, the efficiency of the environment is improved.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Stevens P, Pooley R (1999) Using UML: software engineering with objects and components. Addison-Wesley, Object Technology Series

  2. Object Management Group, OCL 2.0 Specification, June 2005. http://www.omg.org/docs/ptc/05-06-06.pdf

  3. Kelly S, Tolvanen JP (2008) Domain-specific modeling: enabling full code generation. Wiley, London

    Book  Google Scholar 

  4. Lédeczi Á, Maróti M, Völgyesi P (2007) The generic modeling environment. Technical report, Institute for Software Integrated Systems, Vanderbilt University

  5. VMTS Team Visual modeling and transformation system website. http://vmts.aut.bme.hu/

  6. Holzner S (2004) Eclipse. O’Reilly Media

  7. Powers L, Snell M (2008) Microsoft visual studio 2008 Unleashed. Sams

  8. Vajk T, Mezei G, Levendovszky T (2009) Incremental type checking in OCL compilers. In: IEEE Eastern European conference on the engineering of computer based systems, pp 9–18

  9. Vajk T, Mezei G, Levendovszky T (2008) An incremental OCL compiler for modeling environments. In: Electronic communications of the EASST, vol 15. OCL Concepts and Tools 2008

  10. Warmer J, Kleppe A (2003) Object constraint language, the: getting your models ready for MDA, 2nd edn. Addison Wesley, Reading

    Google Scholar 

  11. MacLennan BJ (1990) Functional programming: practice and theory. Addison-Wesley Longman Publishing Co., Inc., Boston

    MATH  Google Scholar 

  12. OMG (2007) Object Management Group Meta Object Facility (MOF) 2.0 query/view/transformation specification. Object Modeling Group

  13. Hamie A, Civello F, Howse J, Kent S, Mitchell R (1998) Reflections on the object constraint language. In: The unified modeling language (UML), LNCS. IEEE Press, London, pp 137–145

  14. Cabot J (2006) Ambiguity issues in OCL postconditions. In: Proceedings of the 6th OCL workshop at the UML/MoDELS conference

  15. Technische Universität Dresden Dresden OCL toolkit. http://dresden-ocl.sourceforge.net/

  16. Kent OCL Kent object constraint language library. http://www.cs.kent.ac.uk/projects/ocl/

  17. Meta-Object Facility (MOF) 1.4 specification (2002) http://www.omg.org/technology/documents/formal/mof.htm

  18. Steinberg D, Budinsky F, Paternostro M, Merks E (2009) EMF: eclipse modeling framework, 2nd edn (Eclipse). Addison-Wesley Longman, Amsterdam, 2nd revised edition (rev). ed

  19. Allilaire F, Idrissi T (2004) ADT: Eclipse development tools for ATL. In: Akehurst DH (ed)Proceedings of the second European workshop on model driven architecture (MDA) with an emphasis on methodologies and transformations (EWMDA-2) (Canterbury, England) Computing Laboratory, University of Kent, Canterbury, pp 171–178

  20. Csertán G, Huszerl G, Majzik I, Pap Z, Pataricza A, Varró D (2002) “Viatra” visual automated transformations for formal verification and validation of uml models. In: ASE ’02: proceedings of the 17th IEEE international conference on automated software engineering, (Washington, DC, USA). IEEE Computer Society, London, p 267

  21. Fujaba Tool Suite, “From UML to Java and Back Again”. http://www.fujaba.de/

  22. KMF, “Kent Modelling Framework”. http://www.cs.kent.ac.uk/projects/kmf/

  23. Akehurst D, Linington P, Patrascoiu O (2003) OCL 2.0: implementing the standard. Technical Report, 12–03, University of Kent, Kent

  24. OSLO, “Open Source Library for OCL”. http://oslo-project.berlios.de/

  25. OCLE, “Object Constraint Language Environment”. http://lci.cs.ubbcluj.ro/ocle/

  26. OCTOPUS, “OCL Tool for Precise UML Specifications”. http://octopus.sourceforge.net/

  27. Garcia M (2008) Efficient integrity checking for essential MOF + OCL in software repositories. J Object Technol 7(6):101–119

    Article  Google Scholar 

  28. Cuadrado JS, Jouault F, Molina JG, Bézivin JB (2008) Deriving OCL optimization patterns from benchmarks. In: ECEASST, vol 15

  29. Mezei G, Levendovszky T, Charaf H (2006) Restrictions for OCL constraint optimization algorithms. ECEASST, vol 5

  30. Mezei G, Lengyel L, Levendovszky T, Charaf H (2006) Minimizing the traversing steps in the code generated by OCL 2.0 compilers. In: WSEAS transactions on information science and applications, vol 3, pp 818–824, February

  31. Vajk T, Mezei G, Charaf H (2007) Architecture of an in-memory transformation engine. In: Proceedings of 8th international symposium of Hungarian researchers on computational intelligence (Budapest, Hungary), pp 573–581, November

  32. Mezei G, Levendovszky T, Charaf H (2006) An optimizing OCL compiler for metamodeling and model transformation environments. In: SET, pp 61–71

  33. Cabot J, Teniente E (2006) Incremental evaluation of OCL constraints. In: CAiSE, pp 81–95

  34. Knuth DE (1968) Semantics of context-free languages. Theory Comput Syst 2:127–145

    Google Scholar 

  35. Reps T (1982) Optimal-time incremental semantic analysis for syntax-directed editors. In: POPL ’82: proceedings of the 9th ACM SIGPLAN-SIGACT symposium on principles of programming languages (New York, NY, USA). ACM, New york, pp 169–176

  36. Hedin G (1992) Incremental semantic analysis. PhD thesis, Lund University

  37. Maddox WH (1997) Incremental static semantic analysis. PhD thesis, University of California

  38. Pennings M, Swierstra SD, Vogt H (1992) Using cached functions and constructors for incremental attribute evaluation. In: PLILP ’92: proceedings of the 4th international symposium on programming language implementation and logic programming (London, UK). Springer, Berlin, pp 130–144

  39. Jay “(Language Processing).” http://www.cs.rit.edu/~ats/projects/lp/doc/jay/package-summary.html

  40. Donnelly C, Stallman RM (2003) Bison manual for version 1.875. Free software foundation, 8th edn

  41. Aho AV, Sethi R, Ullman JD (1986) Compilers: principles, techniques, and tools. Addison Wesley, Pearson Education

  42. Muchnick SS (1997) Advanced compiler design and implementation. Morgan Kaufmann Publishers, Los Altos

Download references

Acknowledgments

This work was partially supported by the European Union and the European Social Fund through project FuturICT.hu (Grant No.: TAMOP-4.2.2.C-11/1/ KONV-2012-0013) organized by VIKING Zrt. Balatonfüred. This work was partially supported by the Hungarian Government, managed by the National Development Agency, and financed by the Research and Technology Innovation Fund (Grant No.: KMR_12-1-2012-0441). I would like to thank one of the anonymous reviewers for pointing out few errors in the draft of the conference paper. Special thanks to my friend, Erika Renáta Kovács for helping me formalize the definitions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tamás Vajk.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Vajk, T., Mezei, G. & Levendovszky, T. Incremental semantic analysis for OCL compilers. Innovations Syst Softw Eng 9, 147–162 (2013). https://doi.org/10.1007/s11334-013-0218-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11334-013-0218-7

Keywords

Navigation