This software is an open source reference implementation of the Semantics of a Foundational Subset for Executable UML Models (fUML) and Precise Semantics of UML Composite Structures (PSCS) specifications by the Object Management Group (OMG) (see fUML and PSCS). The fUML implementation of this software is based on the Java fUML reference implementation developed by Model Driven Solutions (see https://github.com/ModelDriven/fUML-Reference-Implementation)
For licensing information, please see the LICENSE.md file.
For detailed information, please see the User Guide section 1. Prerequisites.
- .NET Framework (at least version 6.0)
- Microsoft Visual Studio1
- Eclipse Modeling Tools for creating UML models
- Java Runtime Environment is required for Eclipse
- Eclipse Papyrus for more sophisticated and graphical modeling of UML models
- Acceleo to be able to use the code generator for executable models
For detailed information, please see the User Guide section 2. Setup.
- Import fUML-C# root solution fUML-CSharp.sln in Visual Studio
For detailed information, please see the User Guide section 3. Build.
- Build dynamic libraries for uml, fuml and pscs (for PSCS-compatibility) in that order using Visual Studio or simply build the whole solution
- Depending on your preferences and needs, build debug, release or both
For detailed information, please see the User Guide section 4. Usage.
- Create new C# project (see
"<fUML-C#-rootdir>\fUML-CSharp\examples\helloworld"
as a reference project)- NOTE: it is suggested to store user-defined source code projects in common directory
"<fUML-C#-rootdir>\fUML-CSharp\usersrc"
- The usersrc directory may contain arbitrary nested subdirectories
- NOTE: it is suggested to store user-defined source code projects in common directory
- Add required assemblies for uml, fuml and pscs to your project's references
- Create a
<model-name>Environment
class by deriving from classfuml.environment.Environment
(orpscs.environment.Environment
for PSCS-compatibility) - Create a
<model-name>Model
class by deriving from classuml.environment.InMemoryModel
(this class will contain all of your model elements) - Create a class containing a main method and call
<model-name>Environment.Instance().Execute("<behavior-name>");
for each behavior you want to execute in subsequent order - Build project and run executable
- Import fUML-C# root project
- Import nested project generator within fUML-C# root project
- Create new .uml model with a modeling tool of your choice (Eclipse Papyrus is suggested)
- NOTE: it is suggested to store user-defined models in common directory
"<fUML-C#-rootdir>\fUML-CSharp\usermodels"
- The usermodels directory may contain arbitrary nested subdirectories
- NOTE: it is suggested to store user-defined models in common directory
- Navigate to file
\generator\src\fuml.generator.main\generate.mtl
in the project explorer - Right click
generate.mtl
and chooseRun as
-->Run configurations...
- Configure and run Acceleo Application accordingly:
- Choose
fuml.generator.main.Generate
- Choose your model file
- Choose a target directory for the generated source code (
"<fUML-C#-rootdir>\fUML-CSharp\usersrc\<model-name>"
is suggested)
- Choose
- Open newly generated C# project in Visual Studio and build executable(s)
- NOTE: Depending on the target directory path it might be necessary to adapt the project's dependencies to the uml, fuml and pscs assemblies since they are referenced by relative paths. This only applies if you choose a target directory structure that differes from the one suggested above.
- Run executable from command line using
<executable-name> <behavior-name> [<behavior-name> <behavior-name> <behavior-name> <...>]
Footnotes
-
For non-developing users Microsoft Visual Studio is only used for compilation. It is also possible to build C# projects from command line using msbuild.exe but for convenience it is suggested to use Microsoft Visual Studio. ↩