lutaml / lutaml-uml

UML module for LutaML
2 stars 2 forks source link

UML syntax: Dependency relationship #35

Open ronaldtse opened 4 years ago

ronaldtse commented 4 years ago

Dependencies

Notation & Semantics

Screen Shot 2020-08-05 at 2 45 45 AM
class dependent
class independent
dependent ..> independent

---

class dependent
class independent1
class independent2
dependent ..> independent1
dependent ..> independent2

Causes of Dependencies

Types of dependency relationships

Screen Shot 2020-08-05 at 2 46 31 AM
class List
class SortableList
SortableList ..> (substitute) List
Screen Shot 2020-08-05 at 2 46 49 AM
class List
class Order
Order ..> (use) List
Screen Shot 2020-08-05 at 2 47 17 AM
class Boss
class Employee {
  +name
  -salary
}
Boss ..> (permit) Employee
class Boss
class Tariffing
association {
  from Boss
  to Tariffing
  type dependency(derive)
  comment 'Optimized performance (i.e. The calculation now uses locally replicated data)'
}
Keyword/Stereotype Description
<<call>> Stereotype to usage relationshipIs defined and specified from one operation to another operation, so that the source operation calls the target operation. The source can also be a class (the class contains an operation that calls the target operation)
<<Create>> Stereotype to usage relationship. The dependent element creates instances of the independent element. Is delined between classifiers
<<derive>> Stereotype to abstraction relationship. The dependent element is derived from the independent element
<<instantiate>> Stereotype to usage relationship. The dependent element creates instances of the independent element. Is defined between classifiers.
<<permit>> Keyword for permission relationship. The dependent element is permitted to use private of this independent element
<<refine>> Stereotype to abstraction relationship. The dependent element resides on a more concrete semantic level than the independent element
<<trace>> Stereotype to abstraction relationship. The dependent element leads to the independent to trace semantic dependencies (e.g. From a use case to a class)
<<use>> Keyword fo usage relationship. The dependent element uses the independent element for its implementation
w00lf commented 4 years ago
class Boss
class Employee {
  +name
  -salary
}
Boss ..> (permit) Employee

@ronaldtse ucd gem already have this syntax for defining dependency:

class Boss {
   dependency Employee
}
class Employee {
  +name
  -salary
}
ronaldtse commented 4 years ago

OK, let's adopt this syntax. But where do you write <<permit>>?

w00lf commented 4 years ago

OK, let's adopt this syntax. But where do you write <<permit>>?

In that case, we can use the explicit syntax as described in https://github.com/lutaml/lutaml-uml/issues/23#issuecomment-671696360

ronaldtse commented 4 years ago

Sounds good. @w00lf once the decision is made could you please help move it to the specification document? Thanks!

w00lf commented 4 years ago

Sounds good. @w00lf once the decision is made could you please help move it to the specification document? Thanks!

Ok, will do