Reputation: 5301
I have a matlab function that is used in three different ways:
This makes three different artifacts deployed on three different execution environments (or nodes in general). From the .m-file I create the .dll and .exe using Matlab MCC (compiler).
In my current model the files are left unrelated. How would I model that the .dll and .exe are compiled from .m using MCC?
Also, how should I relate the interfaces exposed by each? The environments have very different type systems.
Upvotes: 3
Views: 113
Reputation: 73366
I understand that you have a component made of a function (or a class):
The .m
file is the source code of this function. It is therefore an artifact that manifests/embodies the abstract concept of your function in a digital format.
At the same time the .m
is compiled and gives a .dll
and a .exe
which both embody/manifest the same function but in yet different forms. Hence, all three artifacts <> the same function.
But the .dll
and the .exe
also depend on the .m
. So you could add another dependency, that you could for example further clarify an ad-hoc stereotype (e.g. <<generated from>>
? )
The three artifacts could be deployed independently on nodes (including the .m
file which could be directly executed on a matlab execution environment nested in a node). If you want to show this on the same diagram you could:
<<deploy>>
dependency notation.Upvotes: 1
Reputation: 6529
Create a reified Compilation
class that has an association with Source File
, an association with an abstract Compiler Output File
, and an association with Compiler
. Create two subclasses of Compiler Output File
: one called Dynamic Linked Library File
and one called Executable File
. This pattern makes explicit how compilation happens.
Upvotes: 0