MOPMC is a multi-objective probabilistic model checking tool specialised for convex queries on Markov Decision Processes (MDPs) with multiple objectives. A convex query returns an (approximately) optimal point (and value) for a given convex function (viewed as a loss function) that is defined on the multi-dimensional objective space. Examples of convex functions are MSE, variance, etc. Currently, only total reward objectives are supported.
Built on top of Storm's model parsing and building C++ API, MOPMC accepts a PRISM model format (for an MDP) and a PCTL/LTL-style property specification. One important feature of MOPMC is the utilisation of GPU hardware acceleration for valuation-iteration computing. The convex queries in MOPMC can scale to a large number of objectives.
For benchmarking, MOPMC also implements the achievability queries, which are supported by other existing probabilistic model checking tools.
This build is known to work on Ubuntu 20.04 LTS.
This project is implemented with CUDA Toolkit 12.0. To compile this project, installation of the CUDA Toolkit 12.0 is required (see the NVIDIA CUDA Installation Guide).
Use nvcc --version and nvidia-smi to check the installed toolkit and driver versions, respectively. Also note that the version compactibility between the CUDA Toolkit and the NVIDIA Driver.
After installation, append the toolkit to PATH, e.g., by adding the following line to either .bashrc or .profile:
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}Additionally, if an IDE, such as CLion, is used, then also set the LD_LIBRARY_PATH to contain the toolkit's lib64 directory. This can be done by adding the following line into to either .bashrc or .profile:
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}This avoids errors by the IDE debug compiler relating to setting CMAKE_CUDA_ARCHITECTURES.
The command FindCUDAToolkit the CMakeLists.txt identifies the CUDA libraries for this project.
MOMPC utilises a re-build of Storm stable v1.8.1 as a library for parsing, model building and processing. A slight modification is make to Storm's source code to support model export in MOPMC. The modified version is included in this fork, which extends Storm stable v1.8.1.
The modified storm can be built using CMake 3.16.3. Note that other version of CMake may be incompatible with Storm stable v1.8.1.
To build storm as a library, run sudo make install -j <num_of_threads> rather than make.
This way, this project can use find_package(storm) in CMakeLists.txt to load Storm.
Storm 1.8.1 uses CMake 3.16.3. MOPMC requires at least CMake 3.22.
Therefore, different CMake versions are recommended.
The process of compiling MOPMC from the source is as follows:
Clone this project, cd into the project root, and execute
mkdir build ; ./configure.sh ; ./build.shTo test the build is working, run the executable using the convenience script:
./test-run.shA pre-configured environment for compiling MOMPC is defined in a mopmc-env
Docker image, which is in the Docker Hub.
This Docker image contains a Ubuntu 20.04 OS and is built to support AMD64 (x86_64) and ARM64 (Apple silicon) architectures.
It has been tested in the host OSs Ubuntu 20.04 LTS, Windows 10 and MacOS with or without NVIDIA GPU
(In the latter case, the command of running MOPMC must include the option -v standard (see below)).
To run a Docker container with GPU acceleration, the NVIDIA Container Toolkit is required. Follow the installation guide to install the toolkit and configure Docker.
Clone this project, and build a Docker image:
docker build --tag mopmc .Then, run the image:
docker run --rm -it --runtime=nvidia --gpus all mopmcIf NVIDIA GPU is not used, run it as follows:
docker run --rm -it mopmcAn MOPMC Docker image with a ready-to-run MOPMC build is available in the Docker Hub. As this project is being actively developed, the pre-built version may not be the latest.
(Optionally) pull the image with a pre-built MOPMC:
docker pull gxsu/mopmcRun the image:
docker run --rm -it --runtime=nvidia --gpus all gxsu/mopmcwith NVIDIA GPU (note that NVIDIA Container Toolkit must be installed), or
docker run --rm -it gxsu/mopmcwithout NVIDIA GPU.
To run a convex query:
./build/mopmc -m examples/dive_and_rise/dive_and_rise_action_rewards.nm -p examples/dive_and_rise/dive_and_rise_prop_cq_10.props -q convex To run a query without GPU acceleration for value iteration:
./build/mopmc -m examples/dive_and_rise/dive_and_rise_action_rewards.nm -p examples/dive_and_rise/dive_and_rise_prop_cq_10.props -q convex -v standardTo see all the running options:
./build/mopmc -hTo export model only:
./build/mopmc -m examples/dive_and_rise/dive_and_rise_action_rewards.nm \
-p examples/dive_and_rise/dive_and_rise_prop_cq_10.props \
-e out/dive_and_riseTo run a query and export the returned schedulers:
./build/mopmc -m examples/dive_and_rise/dive_and_rise_action_rewards.nm -p \
examples/dive_and_rise/dive_and_rise_prop_cq_10.props -q convex \
-x out/dive_and_riseTo run an achievability query in MOPMC:
./build/mopmc -m examples/multiobj_scheduler05.nm -p examples/multiobj_scheduler05.pctl -q achievabilityTo run an achievability query in Storm:
$STORM_HOME/build/bin/storm --prism examples/multiobj_scheduler05.nm --prop examples/multiobj_scheduler05.pctlTo run an achievability query in PRISM:
$PRRIM_HOME/bin/storm examples/multiobj_scheduler05.nm examples/multiobj_scheduler05.pctlMOPMC accepts the standard PRISM model format for MDPs. For property specification,
it accepts the PCTL/LTL-style multi-objective achievability properties,
which are adopted by existing PMC tools such as Storm and PRISM.
For convex queries, it interprets an achievability property in the following way:
Suppose a property specification is given as
multi(R{"time"}<=14.0 [ F "tasks_complete" ], R{"energy"}<=1.25 [ F "tasks_complete" ])
for the MDP in multiobj_scheduler05.nm, and the loss function is MSE.
Let "time" and "energy", respectively.
The values