Extending OCL Operation Contracts with Objective Functions

By Matthias P. Krieger and Achim D. Brucker.

We explore the potential of adding objective functions to OCL operation contracts. If an operation contract includes an objective function, the operation has the obligation to yield results that make the objective function assume an optimal value. Thus, an objective function expresses a preference among the possible operation results that conform to the postconditions of the operation contract and any class invariants. Objective functions strictly increase the expressiveness of OCL operation contracts. While objective functions arise naturally in application domains like operations research, we argue that objective functions are a useful general-purpose specification instrument and discuss several application examples. As tool support for operation contracts with objective functions, we present an animator for OCL operation contracts with optimization capabilities. We ensure tool interoperability by specifying objective functions in a UML profile.

Keywords:
OCL, UML, Objective Functions

Please cite this work as follows:
M. P. Krieger and A. D. Brucker, “Extending OCL operation contracts with objective functions,” Electronic Communications of the EASST, vol. 44, 2011, doi: 10.14279/tuj.eceasst.44.662. Author copy: http://logicalhacking.com/publications/krieger.ea-objective-functions-2011/

BibTeX
@Article{ krieger.ea:objective-functions:2011,
  abstract     = {We explore the potential of adding objective functions to OCL
                  operation contracts. If an operation contract includes an
                  objective function, the operation has the obligation to yield
                  results that make the objective function assume an optimal
                  value. Thus, an objective function expresses a preference
                  among the possible operation results that conform to the
                  postconditions of the operation contract and any class
                  invariants. Objective functions strictly increase the
                  expressiveness of OCL operation contracts. While objective
                  functions arise naturally in application domains like
                  operations research, we argue that objective functions are a
                  useful general-purpose specification instrument and discuss
                  several application examples. As tool support for operation
                  contracts with objective functions, we present an animator for
                  OCL operation contracts with optimization capabilities. We
                  ensure tool interoperability by specifying objective functions
                  in a UML profile.},
  author       = {Matthias P. Krieger and Achim D. Brucker},
  title        = {Extending {OCL} Operation Contracts with Objective
                  Functions},
  language     = {USenglish},
  doi          = {10.14279/tuj.eceasst.44.662},
  areas        = {formal methods, software},
  year         = {2011},
  keywords     = {OCL, UML, Objective Functions},
  editor       = {Jordi Cabot and Tony Clark and Manuel Clavel and Martin
                  Gogolla},
  issn         = {1863-2122},
  copyright    = {ECEASST},
  copyrighturl = {https://journal.ub.tu-berlin.de/eceasst/article/view/662},
  journal      = {Electronic Communications of the EASST },
  volume       = {44},
  volumetitle  = {Proceedings of the Workshop on {OCL} and Textual Modelling
                  (OCL 2011)},
  note         = {Author copy: \url{http://logicalhacking.com/publications/krieger.ea-objective-functions-2011/}},
}