Pattern-Based Mapping of OCL Specifications to JML Contracts

Research output: Chapter in Book/Conference proceeding with ISSN or ISBNConference contribution with ISSN or ISBNResearchpeer-review

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. However, since OCL constraints cannot be directly executed and checked at runtime by an implementation, constraints violations may not be detected or noticed causing many potential development and maintenance problems. This paper describes an approach for deriving a JML specification for a java implementation (a contract) from a specification written in UML and augmented with OCL constraints. This facilitates the checking of OCL constraints at runtime by translating them to JML executable assertions. The approach is based on the concept of constraint patterns that enable the reuse of commonly occurring constraints within a given context in software modelling. Each OCL constraint pattern would be mapped to a corresponding JML pattern that can be used in the translation process. The result is a library of JML constraint patterns that provides a seamless transition from UML/OCL designs to Java implementations.
Original languageEnglish
Title of host publicationMODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development
Place of PublicationPortugal
Pages1-8
Number of pages8
Publication statusPublished - 1 Jan 2015
EventMODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development - Lisbon, Portugal, 7-9 Jan 2014
Duration: 1 Jan 2015 → …

Publication series

NameInternational Conference on Model-Driven Engineering and Software Development

Conference

ConferenceMODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development
Period1/01/15 → …

Fingerprint

Specifications

Keywords

  • Constraint Pattern
  • OCL
  • JML
  • Contracts

Cite this

Hamie, A. (2015). Pattern-Based Mapping of OCL Specifications to JML Contracts. In MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development (pp. 1-8). (International Conference on Model-Driven Engineering and Software Development). Portugal.
Hamie, Ali. / Pattern-Based Mapping of OCL Specifications to JML Contracts. MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development. Portugal, 2015. pp. 1-8 (International Conference on Model-Driven Engineering and Software Development).
@inproceedings{254f96f4d5fa4456833e8dc9e128ab89,
title = "Pattern-Based Mapping of OCL Specifications to JML Contracts",
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. However, since OCL constraints cannot be directly executed and checked at runtime by an implementation, constraints violations may not be detected or noticed causing many potential development and maintenance problems. This paper describes an approach for deriving a JML specification for a java implementation (a contract) from a specification written in UML and augmented with OCL constraints. This facilitates the checking of OCL constraints at runtime by translating them to JML executable assertions. The approach is based on the concept of constraint patterns that enable the reuse of commonly occurring constraints within a given context in software modelling. Each OCL constraint pattern would be mapped to a corresponding JML pattern that can be used in the translation process. The result is a library of JML constraint patterns that provides a seamless transition from UML/OCL designs to Java implementations.",
keywords = "Constraint Pattern, OCL, JML, Contracts",
author = "Ali Hamie",
year = "2015",
month = "1",
day = "1",
language = "English",
isbn = "978989758007",
series = "International Conference on Model-Driven Engineering and Software Development",
pages = "1--8",
booktitle = "MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development",

}

Hamie, A 2015, Pattern-Based Mapping of OCL Specifications to JML Contracts. in MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development. International Conference on Model-Driven Engineering and Software Development, Portugal, pp. 1-8, MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development, 1/01/15.

Pattern-Based Mapping of OCL Specifications to JML Contracts. / Hamie, Ali.

MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development. Portugal, 2015. p. 1-8 (International Conference on Model-Driven Engineering and Software Development).

Research output: Chapter in Book/Conference proceeding with ISSN or ISBNConference contribution with ISSN or ISBNResearchpeer-review

TY - GEN

T1 - Pattern-Based Mapping of OCL Specifications to JML Contracts

AU - Hamie, Ali

PY - 2015/1/1

Y1 - 2015/1/1

N2 - 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. However, since OCL constraints cannot be directly executed and checked at runtime by an implementation, constraints violations may not be detected or noticed causing many potential development and maintenance problems. This paper describes an approach for deriving a JML specification for a java implementation (a contract) from a specification written in UML and augmented with OCL constraints. This facilitates the checking of OCL constraints at runtime by translating them to JML executable assertions. The approach is based on the concept of constraint patterns that enable the reuse of commonly occurring constraints within a given context in software modelling. Each OCL constraint pattern would be mapped to a corresponding JML pattern that can be used in the translation process. The result is a library of JML constraint patterns that provides a seamless transition from UML/OCL designs to Java implementations.

AB - 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. However, since OCL constraints cannot be directly executed and checked at runtime by an implementation, constraints violations may not be detected or noticed causing many potential development and maintenance problems. This paper describes an approach for deriving a JML specification for a java implementation (a contract) from a specification written in UML and augmented with OCL constraints. This facilitates the checking of OCL constraints at runtime by translating them to JML executable assertions. The approach is based on the concept of constraint patterns that enable the reuse of commonly occurring constraints within a given context in software modelling. Each OCL constraint pattern would be mapped to a corresponding JML pattern that can be used in the translation process. The result is a library of JML constraint patterns that provides a seamless transition from UML/OCL designs to Java implementations.

KW - Constraint Pattern

KW - OCL

KW - JML

KW - Contracts

M3 - Conference contribution with ISSN or ISBN

SN - 978989758007

T3 - International Conference on Model-Driven Engineering and Software Development

SP - 1

EP - 8

BT - MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development

CY - Portugal

ER -

Hamie A. Pattern-Based Mapping of OCL Specifications to JML Contracts. In MODELSWARD 2014: 2nd International Conference on Model-Driven Engineering and Software Development. Portugal. 2015. p. 1-8. (International Conference on Model-Driven Engineering and Software Development).