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.
- Compiler: GCC (Linux) or MinGW-w64 (Windows)
- Java Runtime Environment
- Eclipse CDT or any Eclipse IDE with C++-Development Tools installed
- Eclipse Modeling Tools for creating UML models
- 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 project fUML-CPP into your workspace
- Import nested projects uml, fuml and pscs (for PSCS-compatibility)
- Add binary directories paths of uml, fuml and pscs (for PSCS-compatibility) to your system's environment variables (e.g. add them to PATH in Windows)
- Depending on whether you want to build debug version, release version or both versions of the dynamic libraries:
"<fUML-C++-rootdir>\uml\Debug"
for debug version of uml"<fUML-C++-rootdir>\uml\Release"
for release version of uml"<fUML-C++-rootdir>\fuml\Debug"
for debug version of fuml"<fUML-C++-rootdir>\fuml\Release"
for release version of fuml"<fUML-C++-rootdir>\pscs\Debug"
for debug version of pscs"<fUML-C++-rootdir>\pscs\Release"
for release version of pscs
For detailed information, please see the User Guide section 3. Build.
- Build dynamic libraries for uml, fuml and pscs (in that order) using Eclipse C++-Development Tools managed build
- 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>\examples\helloworld"
as a reference project)- NOTE: it is suggested to store user-defined source code projects in common directory
"<fUML-C++-rootdir>\usersrc"
- The usersrc directory may contain arbitrary nested subdirectories
- NOTE: it is suggested to store user-defined source code projects in common directory
- Add include directories for uml and fuml to your project
- Add uml and fuml binaries to the linker options of your projects
- 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
- 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>\usermodels"
- The usermodels directory may contain arbitrary nested subdirectories
- NOTE: it is suggested to store user-defined models in common directory
- Import nested project generator within fUML-C++ root project
- 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>\usersrc\<model-name>"
is suggested)
- Choose
- Import newly generated C++ project within fUML-C++ root project and build executable(s)
- Run executable from command line using
<executable-name> <behavior-name> [<behavior-name> <behavior-name> <behavior-name> <...>]