Frank V. Castellucci (email@example.com)
Thu, 9 Dec 1999 08:20:47 -0500
> > "Frank V. Castellucci" wrote: > > > > [snip] > > let me try to give you my understanding of the situation. The name OCL (Object constraint language) > may be missleading since OCL is not intended to be a "typical constraint programming language". OCL > is a specification language to express properties of UML models that have to be satisfied by > implementations of these models. Note that the implementations of the UML models do not depend on > the existence of OCL constraints. > > The OCL constraints in your example are restrictions on the static object model (a snapshot) of the > system. The intention is that any operation (like a method or an assignment) transforms snapshots > satisfying the constraints to snapshots also satisfying the constraints. If an operation does not do > this then it does not satisfy the specification given by the OCL constraints. The semantics of the > operations (like the assignment) are independet of the OCL constraints, since the OCL constraints > are part of the specification and not part of the implemenation. > Hubert and Bernhard, Given then that it is declarative as part of the Class (not instance) model would it be out of implementation that constraints don't violate themselves in the process. So in Rose I create Class A int x = 5 context A: invariant: self.x = self.relationship.y Class B int y = 6 context B: invariant: self.y = self.relationship.x This, to me, is a violation of the static model. I guess my point is that should conformance to OCL MEAN enforcement at the static level so that the above would flag an error in the log? This is a in-coherent model in my opinion.