- Relationships: ``<elem> has <relationship> <elem/value>``
- There are two types of relationships:
- *Associations* are a relationship between two elements (variables).
- *Attributes* are a relationship between an element (variable) and a value (variable or constant)
- **Associations** are a relationship between two elements (variables).
- **Attributes** are a relationship between an element (variable) and a value (variable or constant).
- Relationships follow this naming structure ``<package>.<class>.<relationship>``.
- Example:
- ``vm has abstract.ComputingNode.ifaces iface`` is an **Association**, as it puts in relationship the element ``vm`` with the element ``iface``.
- ``vm has abstract.ComputingNode.cpu_cores >= 4`` is an **Attribute** Relationship, as it compares a property (``cpu_cores``) of the element ``vm`` with a constant number.
- Classes: ``class <class name>``
- They represent a kind of element in the architecture.
- Classes follow this naming structure ``<package>.<class>``
- Equality: ``is``, ``is not``
- Used to set an equality (or inequality) constraint on an element variable. You can compare elements and classes.
You can even compare classes between each other, but it's kinda pointless.
- Used to set an equality (or inequality) constraint on an element variable. You can use it to assign a class to an element.
- Example: ``vm is class abstract.VirtualMachine``
- You can compare attributes with constants, or attributes with attributes.
- Example:
- ``vm has abstract.ComputingNode.cpu_cores >= 4`` compares attribute ``cpu_cores`` with a numeric constant.
- ``vm1 has abstract.ComputingNode.cpu_cores >= vm2 abstract.ComputingNode.cpu_cores`` compares attribute ``cpu_cores`` of ``vm1`` with the one of ``vm2``.