Book a Demo

Author Topic: Rules /Constraints in UML  (Read 9993 times)

daphne7

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Rules /Constraints in UML
« on: March 24, 2007, 01:27:14 pm »
hi, i have a lot questions about rules/constraints in uml.
i hope you can help me.

following compositional relations are defined in my profile:

has-context
has-features
has-subsystems
has-hardware
has-software
has-processors
has-subcontext
has-hardware/software-restrictions

also it is a stereotype called context defined (metaclass component).

a.1) how can i define a rule (in ocl???) so that the stereotype context can only has only the relation has-subcontext? other relations are not allowed for context.
is it possible to define constraints in uml (and also enterprise architect) for this rule?

a.2) if it is possible to define a rule: does enterprise architect evaluate the breach of the rules?

a.3) i have following relationship:
<<software artifact>>   realises            <<feature>>
Editor                -----------------> Writing Application

via a rule i want that a relation is-realised-by is linked from the feature to the software-artifact when i link the relation realises from the software artifact to the feature.


b) if it is not possible to define rules/constraints so do i have to define a new metamodel?

is it complex to define a new metamodel? enterprise architect supports to define a new metamodel but what is with the evaluation? can i use the new defined classes?

thank you for your efforts...
« Last Edit: March 26, 2007, 02:40:24 pm by 7akkaya »

daphne7

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Rules /Constraints in UML
« Reply #1 on: March 26, 2007, 09:28:48 am »
 :'( :'( :'(

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Rules /Constraints in UML
« Reply #2 on: March 26, 2007, 01:06:20 pm »
Quote
:'( :'( :'(
Generally, it is considered bad form to ask forum members to do ones homework or study questions.  That's probably why there's been no response.

However, with respect to a.3) you already have the answer...  Can you suggest why this might be so?

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

daphne7

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Rules /Constraints in UML
« Reply #3 on: March 26, 2007, 01:43:44 pm »
stop!
i have not asked members to do my homework. i have spent a lot of time for investigation but there is not a result. so it is absolutely understandable and legitimately when i ask for a advice. to ask for an advice is not a bad form but a dissertation.

if you have an advice for my questions i would be grateful to you.

if you have not an advice for my question i would be grateful when you stop this kind of accusation.


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Rules /Constraints in UML
« Reply #4 on: March 26, 2007, 01:57:53 pm »
Quote
stop!
i have not asked members to do my homework. i have spent a lot of time for investigation but there is not a result. so it is absolutely understandable and legitimately when i ask for a advice. to ask for an advice is not a bad form but a dissertation.

if you have an advice for my questions i would be grateful to you.

if you have not an advice for my question i would be grateful when you stop this kind of accusation.

Unfortunately, perception is everything these days...

If you don't mean it to look like you are asking someone to do your homework.  Then don't make it look so.  I was merely suggesting why people might not have answered.

However, with respect to my suggestion regarding a.3.  I stand by it.  If you can't suggest why you already have the answer before you; you should look at the semantics of your statements.  All relationship edges (apart from AssociationEnd) are binary in nature and express both a forward and inverse "access function" which allows the deduction of an inverse semantics from its forward semantics.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

daphne7

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Rules /Constraints in UML
« Reply #5 on: March 26, 2007, 02:37:39 pm »
i am creating a profile for asset modeling language for product lines (ampl).

ampl defines two assets: feature and software artifact.
software artifacts realize features and features are realized by software artifacts. in ampl both relationships has to be modelled.

for creating a knowledge base this is very important. so both relationships (realize and is-realised-by) has to be distinguished.

therefore i have defined the uni-directional association is-realised-by beside the uni-directional realize relationship.

my goal is that when i link a software artifact with a feature via the realize connector so the inverse relationship is-realised-by should be automatically used.
to use only the realize or is-realised-by relationship is not allowed.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Rules /Constraints in UML
« Reply #6 on: March 26, 2007, 02:57:14 pm »
Quote
my goal is that when i link a software artifact with a feature via the realize connector so the inverse relationship is-realised-by should be automatically used.
to use only the realize or is-realised-by relationship is not allowed.
Why?

Seems to go against modelling first principles, I think.

I'm not familiar with AMPL, but seems strange to me to create two relationships with identical semantics.

Are you saying that the relationships (which don't appear to be Associations) are uni-directional?

Paolo

Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!