MartinLoeper / KAMP-DSL

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

Create Example Rules (PoC) #78

Closed MartinLoeper closed 7 years ago

MartinLoeper commented 7 years ago

Write the following rules using KAMP-DSL:

both are located inside BPArchitectureModelLookup.

Compare the results and evaluate the current functionality.

MartinLoeper commented 7 years ago

The rules are ready:

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

    insert edu.kit.ipd.sdq.kamp4bp.model.modificationmarks.BPModificationmarksFactory#createBPModifyEntryLevelSystemCall 
    into edu.kit.ipd.sdq.kamp4bp.model.modificationmarks.BPChangePropagationDueToDataDependencies#getEntryLevelSystemCallModifications;

rule lookUpEntryLevelSystemCallsWithParameterOfTypesFromParameter:
    pcm::DataType <- pcm::Parameter[dataType__Parameter] <- pcm::OperationSignature[parameters__OperationSignature] <- pcm::EntryLevelSystemCall[operationSignature__EntryLevelSystemCall];

    insert edu.kit.ipd.sdq.kamp4bp.model.modificationmarks.BPModificationmarksFactory#createBPModifyEntryLevelSystemCall 
    into edu.kit.ipd.sdq.kamp4bp.model.modificationmarks.BPChangePropagationDueToDataDependencies#getEntryLevelSystemCallModifications;

rule lookUpEntryLevelSystemCallsWithSignatures:       
    pcm::OperationSignature <- pcm::EntryLevelSystemCall[operationSignature__EntryLevelSystemCall];

    insert edu.kit.ipd.sdq.kamp4bp.model.modificationmarks.BPModificationmarksFactory#createBPModifyEntryLevelSystemCall
    into edu.kit.ipd.sdq.kamp4bp.model.modificationmarks.BPInterBusinessProcessPropagation#getAbstractUserActionModifications;

They resulted in the following workplans: Rule Comparison.zip

I compared them using http://www.synkronizer.com/trial-edition. It turned out that both workplans are equal! This means that both rules could be successfully rewritten using KAMP-DSL.

MartinLoeper commented 7 years ago

Please note that the given rules were tested against a custom set of marked elements.

Testing never proves the absence of faults it only shows their presence!