3

I have a matlab function that is used in three different ways:

  • From within Matlab (.m)
  • As a .NET library (.dll)
  • As a standalone binary (.exe)

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.

Christophe
  • 68,716
  • 7
  • 72
  • 138
Andreas
  • 5,086
  • 3
  • 16
  • 36

2 Answers2

1

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>>? )

enter image description here

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:

  • Show the deployment with nested artifacts directly on nodes, and adding the dependencies in the diagram.
  • But you could as well keep artifacts apart and use the <<deploy>> dependency notation.
Christophe
  • 68,716
  • 7
  • 72
  • 138
0

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.

Jim L.
  • 6,177
  • 3
  • 21
  • 47