-
We have to switch on the engine at File › Settings › Other Settings › Dclare › Engine on.
-
Attribute inheritance works, i.e. attributes for concept
SuperConcept
can be referred to in conceptSubConcept extends SuperConcept
. -
We can have circular change rules, as long as they don’t conflict.
Example: In model
A
, we have a named node of conceptX
. A rule creates modelB
and within it a named node of conceptY
. We can propagate name changes fromX
toY
and fromY
toX
.
-
Inside Dclare, we can only write to the model with the
:=
operator or by callingconcat()
on a collection.
-
We can use variables in the Rules section by nesting them into curly braces:
{ node<Something> = this.someRefOfTypeSomething; }
-
We can find opposites of references with the
~
operator:nlist<Inhabitant> inhabitants := this.address.~Inhabitant::home;
-
We can set an attribute to optional, if it might be
null
. Prefix the attribute withoptional
, or use the intention menu.