Skip to main content

2015 | OriginalPaper | Buchkapitel

Using Patterns to Map OCL Constraints to JML Specifications

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

OCL is a formal notation to specify constraints on UML models that cannot otherwise be expressed using diagrammatic notations such as class diagrams. The type of constraints that can be expressed using OCL include class invariants and operation preconditions and postconditions. Constraint patterns can be used to simplify the development of consistent constraints for UML/OCL models. This paper investigates an approach based on constraint patterns to developing JML specifications for Java implementations from OCL constraints. This would enable the checking of OCL constraints at runtime since they can be translated to JML executable assertions. The approach involves mapping each OCL constraint pattern to a corresponding JML pattern. This results in a library of JML constraint patterns that provides a seamless transition from UML/OCL designs to Java implementations.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Warmer, J., Kleppe, A.: The object constraint language: getting your models ready for MDA. Addison-Wesley, Reading (2003) Warmer, J., Kleppe, A.: The object constraint language: getting your models ready for MDA. Addison-Wesley, Reading (2003)
2.
Zurück zum Zitat OMG (Object Management Group): Object Constraint Language (OCL), Version 2.4 (2014) OMG (Object Management Group): Object Constraint Language (OCL), Version 2.4 (2014)
3.
Zurück zum Zitat OMG (Object Management Group): Unified Modeling Language Specification, Version 2.5 (2013) OMG (Object Management Group): Unified Modeling Language Specification, Version 2.5 (2013)
4.
Zurück zum Zitat Ackermann, J.: Frequently occurring patterns in behavioral specification of software components. In: Proceedings of the Conference on Component-Oriented Enterprise Applications (COEA), pp. 41–56 (2005) Ackermann, J.: Frequently occurring patterns in behavioral specification of software components. In: Proceedings of the Conference on Component-Oriented Enterprise Applications (COEA), pp. 41–56 (2005)
5.
Zurück zum Zitat Ackermann, J.: Formal description of OCL specification patterns for behavioral specification of software components. In: Workshop on Tool Support for OCL and Related Formalisms, Technical Report LGL-REPORT-2005-001, EPFL, pp. 15–29 (2005) Ackermann, J.: Formal description of OCL specification patterns for behavioral specification of software components. In: Workshop on Tool Support for OCL and Related Formalisms, Technical Report LGL-REPORT-2005-001, EPFL, pp. 15–29 (2005)
6.
Zurück zum Zitat Ackermann, J., Turowski, K.: A library of OCL specification patterns for behavioral specification of software components. In: Dubois, E., Pohl, K. (eds.) CAiSE 2006. LNCS, vol. 4001, pp. 255–269. Springer, Heidelberg (2006)CrossRef Ackermann, J., Turowski, K.: A library of OCL specification patterns for behavioral specification of software components. In: Dubois, E., Pohl, K. (eds.) CAiSE 2006. LNCS, vol. 4001, pp. 255–269. Springer, Heidelberg (2006)CrossRef
7.
Zurück zum Zitat Davis, J.P., Bonnell, R.D.: Propositional logic constraint patterns and their use in UML-based conceptual modeling and analysis. IEEE Trans. Knowl. and Data Eng. 19, 427–440 (2007)CrossRef Davis, J.P., Bonnell, R.D.: Propositional logic constraint patterns and their use in UML-based conceptual modeling and analysis. IEEE Trans. Knowl. and Data Eng. 19, 427–440 (2007)CrossRef
8.
Zurück zum Zitat Wahler, M.: Using Patterns to Develop Consistent Design Constraints. Ph.D. thesis, ETH Zurich, Switzerland (2008) Wahler, M.: Using Patterns to Develop Consistent Design Constraints. Ph.D. thesis, ETH Zurich, Switzerland (2008)
9.
Zurück zum Zitat Wahler, M., Basin, D., Brucker, A., Koehler, J.: Efficient analysis of pattern-based constraint specifications. Softw. Syst. Model. 9, 225–255 (2010)CrossRef Wahler, M., Basin, D., Brucker, A., Koehler, J.: Efficient analysis of pattern-based constraint specifications. Softw. Syst. Model. 9, 225–255 (2010)CrossRef
10.
Zurück zum Zitat Wahler, M., Koehler, J., Brucker, A.D.: Model-driven constraint engineering. In: MoDELS Workshp. on OCL for (Meta-)Models in Multiple Application Domains, pp. 111–125 (2006) Wahler, M., Koehler, J., Brucker, A.D.: Model-driven constraint engineering. In: MoDELS Workshp. on OCL for (Meta-)Models in Multiple Application Domains, pp. 111–125 (2006)
11.
Zurück zum Zitat Hamie, A.: Towards verifying java realizations of OCL-constrained design models using JML. In: Proceedings of the 6th IASTED International Conference on Software Engineering and Applications (SEA 2002). IASTED Press (2002) Hamie, A.: Towards verifying java realizations of OCL-constrained design models using JML. In: Proceedings of the 6th IASTED International Conference on Software Engineering and Applications (SEA 2002). IASTED Press (2002)
12.
Zurück zum Zitat Hamie, A.: Strategies for Translating the UML/OCL Design Models to JAVA/JML Designs. In: International Computer Symposium, Taiwan (2004) Hamie, A.: Strategies for Translating the UML/OCL Design Models to JAVA/JML Designs. In: International Computer Symposium, Taiwan (2004)
13.
Zurück zum Zitat Hamie, A.: Translating the object constraint language into the java modelling language. In: Proceedings of the ACM Symposium on Applied Computing, pp. 1531–1535. ACM Press (2004) Hamie, A.: Translating the object constraint language into the java modelling language. In: Proceedings of the ACM Symposium on Applied Computing, pp. 1531–1535. ACM Press (2004)
14.
Zurück zum Zitat Avila, C., Flores, G., Cheon, Y.: A library-based approach to translating OCL constraints to JML assertions for runtime checking. In: International Conference on Software Engineering Research and Practice, pp. 403–408. CSREA Press (2008) Avila, C., Flores, G., Cheon, Y.: A library-based approach to translating OCL constraints to JML assertions for runtime checking. In: International Conference on Software Engineering Research and Practice, pp. 403–408. CSREA Press (2008)
15.
Zurück zum Zitat Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of JML: a behavioral interface specification language for java. ACM SIGSOFT Softw. Eng. Not. 31, 1–38 (2006)CrossRef Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of JML: a behavioral interface specification language for java. ACM SIGSOFT Softw. Eng. Not. 31, 1–38 (2006)CrossRef
16.
Zurück zum Zitat Cheon, Y., Leavens, G.T.: A runtime assertion checker for the java modeling language (JML). In: International Conference on Software Engineering Research and Practice, pp. 322–328. CSREA Press (2002) Cheon, Y., Leavens, G.T.: A runtime assertion checker for the java modeling language (JML). In: International Conference on Software Engineering Research and Practice, pp. 322–328. CSREA Press (2002)
17.
Zurück zum Zitat Cheon, Y., Leavens, G.T., Sitaraman, M., Edwards, S.: Model variables: cleanly supporting abstraction in design by contract. Softw.: Pract. Exp. 35, 583–599 (2005) Cheon, Y., Leavens, G.T., Sitaraman, M., Edwards, S.: Model variables: cleanly supporting abstraction in design by contract. Softw.: Pract. Exp. 35, 583–599 (2005)
18.
Zurück zum Zitat Frankel, D.: Model Driven Architecture: Applying MDA to Enterprise Computing. Wiley, New York (2002) Frankel, D.: Model Driven Architecture: Applying MDA to Enterprise Computing. Wiley, New York (2002)
19.
Zurück zum Zitat Leavens, G.T., Cheon, Y., Clifton, C., Ruby, C., Cok, D.R.: How the design of JML accommodates both runtime assertion checking and formal verification. Sci. Comput. Program. 55, 185–208 (2005)MathSciNetCrossRefMATH Leavens, G.T., Cheon, Y., Clifton, C., Ruby, C., Cok, D.R.: How the design of JML accommodates both runtime assertion checking and formal verification. Sci. Comput. Program. 55, 185–208 (2005)MathSciNetCrossRefMATH
20.
Zurück zum Zitat Cok, D., Kiniry, J.: ESC/Java2: uniting ESC/Java and JML. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.L., Muntean, T. (eds.) ASSIS 2004. LNCS, vol. 3362, pp. 108–128. Springer, Heidelberg (2005)CrossRef Cok, D., Kiniry, J.: ESC/Java2: uniting ESC/Java and JML. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.L., Muntean, T. (eds.) ASSIS 2004. LNCS, vol. 3362, pp. 108–128. Springer, Heidelberg (2005)CrossRef
21.
Zurück zum Zitat Jacobs, B., Poll, E.: Java program verification at nijmegen: developments and perspective. In: Futatsugi, K., Mizoguchi, F., Yonezaki, N. (eds.) ISSS 2003. LNCS, vol. 3233, pp. 134–153. Springer, Heidelberg (2003)CrossRef Jacobs, B., Poll, E.: Java program verification at nijmegen: developments and perspective. In: Futatsugi, K., Mizoguchi, F., Yonezaki, N. (eds.) ISSS 2003. LNCS, vol. 3233, pp. 134–153. Springer, Heidelberg (2003)CrossRef
22.
Zurück zum Zitat Hamie, A.: Pattern-based mapping of OCL specifications to JML contracts. In: Proceedings of the 2nd International Conference on Model-Driven Engineering and Software Development (MODELSWARD) (2014) Hamie, A.: Pattern-based mapping of OCL specifications to JML contracts. In: Proceedings of the 2nd International Conference on Model-Driven Engineering and Software Development (MODELSWARD) (2014)
23.
Zurück zum Zitat Gosling, J., Joy, B., Steele, G., Bracha, G., Buckley, A.: The Java Language Specification, Java SE 8 Edition (Java Series). Addison-Wesley, Upper Saddle River (2014) Gosling, J., Joy, B., Steele, G., Bracha, G., Buckley, A.: The Java Language Specification, Java SE 8 Edition (Java Series). Addison-Wesley, Upper Saddle River (2014)
Metadaten
Titel
Using Patterns to Map OCL Constraints to JML Specifications
verfasst von
Ali Hamie
Copyright-Jahr
2015
DOI
https://doi.org/10.1007/978-3-319-25156-1_3

Premium Partner