Book a Demo

Author Topic: How to specify syntax and constraints in a Profile  (Read 2385 times)

Andriy

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
How to specify syntax and constraints in a Profile
« on: June 17, 2008, 10:05:13 pm »
Hello,

I am developing a custom language in EA. For this task I use the UML profiling mechanism. So far I managed to define my custom concepts (both entities and relationships) and their symbols. This is a good start for my language, but I would like to make it more constrained. This is where I run into problems:

1. In profile I specified how my relationships are connected to entities and what are multiplicities. (In other words I try to specify abstract syntax). When using the profile, it appears that my abstract syntax is not enforced.

2. In profile I specified constraints on my concepts. When using the profile, it appears that my constraints are not applied to concept instances. Is there a  special  trigger for evaluation of constraints? Furthermore, I could not find any documentation on writing constraints or the constraint languages in EA.

3. In profile I specified tagged values for my concepts. When using the profile, the types of my tagged values seem not to be enforced, as I could bind all kinds of strange values.

4. Is there a way to hide irrelevant (e.g. UML-related) properties from my modeling language?

I am new to EA, so probably I got some things wrong. Any help is much welcome.

Thanks in advance,
Andriy

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to specify syntax and constraints in a Pro
« Reply #1 on: June 18, 2008, 08:48:10 am »
You'll need to look at including your profile (via an MDG technology) from an add-in.

You can then handle the model validation broadcast functions. (http://www.sparxsystems.com.au/EAUserGuide/index.html?validation.htm) and to hide properties you would need to show your own dialog.  This can be done by responding to EA_OnContextItemDoubleClicked
 (http://www.sparxsystems.com.au/EAUserGuide/index.html?ea_oncontextitemdoubleclicked.htm)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to specify syntax and constraints in a Pro
« Reply #2 on: June 18, 2008, 09:52:18 am »
Quote
3. In profile I specified tagged values for my concepts. When using the profile, the types of my tagged values seem not to be enforced, as I could bind all kinds of strange values.
You will need to export your tagged value type definitions with your UML Profile by bundling them into a single MDG Technology.
The Sparx Team
[email protected]

Andriy

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: How to specify syntax and constraints in a Pro
« Reply #3 on: June 18, 2008, 06:37:33 pm »
Simon and KP, thanks for your fast replies! You gave valuable info. Is there any ideas about item 1 (abstract syntax)?