Re: OCL and constraints



Date view Thread view Subject view Author view

robert france (france@bach.cs.colostate.edu)
Thu, 9 Dec 1999 11:14:23 -0700 (MST)


>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. If one views the "model" (Class Diagram with corresponding OCL constraints) as a specification (expressible in logic) of the instance structures (states?) that are valid then the problem translates to one of internal consistency (in the example you give, the specification is clearly not consistent). Using this view one can talk about instance structures "satisfying" a specification (Class Diagram with OCL). In talking about implementations one should talk about a CD implementation "refining" a specification. I'm not sure what it means for a Class Diagram to "conform" with OCL constraints unless we're talking about consistency in a logical framework. So your question may be how do we go about making such consistency checks? I've probably muddied the waters! Opinions please. Cheers, Robert ==================================================================== Robert B. France, Assoc Professor | Tel: 970-491-6356 Computer Science Department | Fax: 970-491-2466 Colorado State University | Email: france@cs.colostate.edu Fort Collins, CO 80523 | www.cs.colostate.edu/~france/


Date view Thread view Subject view Author view