MartinLoeper / KAMP-DSL

Domain Specific Language for the KAMP Framework
Apache License 2.0
0 stars 0 forks source link

Causing Entities - New Language Feature #80

Closed MartinLoeper closed 7 years ago

MartinLoeper commented 7 years ago

I recognised that we need a language feature for the causing entities. We cannot assume that a rule consistent of A -> B -> C has either B nor A as causing entity for C. The user may decide on his own whether to choose A or B.

We observe this in BPArchitectureModelLookup#lookUpEntryLevelSystemCallsWithParameterOfTypes which is written in KAMP-DSL as follows:

rule lookUpEntryLevelSystemCallsWithParameterOfTypes:
    pcm::DataType <- pcm::OperationSignature[returnType__OperationSignature] <- pcm::EntryLevelSystemCall[operationSignature__EntryLevelSystemCall];

In this rule, the author chose to select DataType as causing entity.

MartinLoeper commented 7 years ago

I suggest, we add a causing entities marker (*) after the lookup which is targeted.

A -> B* -> C
MartinLoeper commented 7 years ago

We must ensure via validation that:

MartinLoeper commented 7 years ago

I suggest, we set the causing entities marker onto the marked elements or the next-to-last lookup. This will be taken into account if no marker was explicitly set.

MartinLoeper commented 7 years ago

We do not need to restrict the positions for the markers! Multiple markers add all elements in the subsequent lookup into the set of causing entities.

A causing entity marker on the last lookup rule instructs the engine to put all elements inside the causing entity set which share a common marked element.