Book a Demo

Author Topic: OCL and Tagged Values  (Read 5881 times)

gmcallow

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
OCL and Tagged Values
« on: November 10, 2007, 04:10:37 am »
Hi,

I've got a few problems using OCL in EA - looking through this forum I don't seem to be the only one, but hopefully somebody will be able to shed some light on this.  A lot of the issues seem come from the lack of documentation on using OCL with EA, and also that the initial validation of the constraints only appears to do basic syntax checking.

I can use OCL on an class to specify invariants involving its attributes - that's fine.  However, I'd like to be able to use OCL to evaluate some of the elements Tagged Values.  Referencing the tagged value directly (e.g. inv: self.TaggedValueName > 2) doesn't seem to work.  Is there a way to either

* Reference a tagged value directly from OCL, or
* Link a tagged value with an attribute so I can evaluate it that way.

Regards

Glenn

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
Re: OCL and Tagged Values
« Reply #1 on: November 13, 2007, 04:07:14 am »
Glenn:

I am not a specialist at using OCL, I have use it in my domain model as part of my current research. I defined OCL invariants applied to properties (attributes) and association ends or association classes. There is nothing on the OCL specifications concerning the use of OCL on tagged values, so this is a "non-normative" area for now.

Applying a modeling focus, I guess it would be possible to include the tags as elements of a supporting metamodel, and then define usual OCL expressions on that metamodel.

Regards,
Joao
Joao Paulo Hespanha
OTB Research Institute
Technical University Delft

gmcallow

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: OCL and Tagged Values
« Reply #2 on: November 13, 2007, 08:07:43 am »
Joao,

Are you using EA to maintain your domain model for your current research ?  If not, which tool are you using if you don't mind me asking.

I haven't managed to get EA to correctly validate OCL invariants on AssociationEnds either.  I can reference Class A's attributes only if I have an attribute of Class A within Class B, accessing through the attribute instead of the role.

I'm quickly coming to the conclusion (having gone through many of the forum posts here) that the OCL support witin EA isn't up to much at the moment.

Regards

Glenn