C++ implementation of the DEPM algorithm, built on the C++ Storm API.
- Build the source code inside a new docker image.
docker build --target=binary -t openepl-engine:binary .
- Run the executable with the required input parameters
docker run --rm -it -v $(pwd)/input:/input openepl-engine:binary `-i /input/${INPUT_DEPM_XML} -p "FAILURE" --mttf`
Execute the following command from the project root directory openepl-engine
:
docker build -t openepl-engine:Debug -f Dockerfile --build-arg CMAKE_BUILD_TYPE="Debug" .
docker build -t openeplengine:Release -f Dockerfile --build-arg CMAKE_BUILD_TYPE="Release" .
ARG MAKEFLAGS=-j$(nproc)
ARG CMAKE_BUILD_TYPE="Debug" | "Release"
ARG BUILD_DIR="/build"
ARG SRC_DIR="/source"
Developing in Clion using the Docker Toolchain provides a consistent experience. The debugging environment is an ephemeral Docker container.
- Docker
- CLion
-
From the
$PROJECT_ROOT_DIR
, run the following commands in a shell:# Set the environment variables PROJECT_ROOT_DIR=$(pwd) DEV_IMAGE_TAG=openepl-engine-debugger DEV_IMAGE_DOCKERFILE=$PROJECT_ROOT_DIR/Dockerfile-dev # Build the development image docker build --build-arg UID=$(id -u) -t $DEV_IMAGE_TAG $DEV_IMAGE_DOCKERFILE
-
- Go to
Settings / Preferences | Build, Execution, Deployment | Toolchains
. - Click
Add toolchain
and selectDocker
. - Click the
screw nut icon
next to theDocker
field to select a Docker image.- You can also configure a
Docker server
inSettings / Preferences | Build, Execution, Deployment | Docker
and then select it in the toolchain settings.
- You can also configure a
- Select the Docker Image
openepl-engine-debugger
and wait until the tool detection finishes. - Set the
C Compiler
togcc
- Set the
C++ Compiler
tog++
- Then save the settings.
- Go to
-
- After configuring a Docker toolchain, you can select it in
CMake profiles
or inMakefile
settings. Alternatively, move the toolchain to the top of the list to make it default.
- After configuring a Docker toolchain, you can select it in
** Note: The project folder will mounted to the Docker container and building, running, and debugging will be
performed in it. CLion will start the container and shut it down after the command is executed. The project folder
will be mounted into the /tmp/openepl-engine
directory in the container. **
-
- To get better performance on Windows, we recommend using Docker with the WSL 2 backend.
- Set up
Docker Desktop
with the WSL 2 backend. - In the Docker desktop application, navigate to
Settings | Resources | WSL Integration
and enable integration with your WSL distribution (for example, ubuntu-20.04). - Place the project sources into the WSL filesystem (for example, \wsl$\ubuntu-20.04\tmp\llvm), then open it in CLion and configure a Docker toolchain.
- Set up
- To get better performance on Windows, we recommend using Docker with the WSL 2 backend.