Browse Source

Bindings for storm environments

refactoring
Matthias Volk 7 years ago
parent
commit
06ec360c86
  1. 10
      src/core/environment.cpp
  2. 8
      src/core/environment.h
  3. 2
      src/mod_core.cpp
  4. 6
      tests/core/test_environment.py

10
src/core/environment.cpp

@ -0,0 +1,10 @@
#include "environment.h"
#include "src/helpers.h"
#include "storm/environment/Environment.h"
void define_environment(py::module& m) {
py::class_<storm::Environment>(m, "Environment", "Environment")
.def(py::init<>(), "Construct default environment")
;
}

8
src/core/environment.h

@ -0,0 +1,8 @@
#ifndef PYTHON_CORE_ENVIRONMENT_H_
#define PYTHON_CORE_ENVIRONMENT_H_
#include "common.h"
void define_environment(py::module& m);
#endif /* PYTHON_CORE_ENVIRONMENT_H_ */

2
src/mod_core.cpp

@ -6,6 +6,7 @@
#include "core/bisimulation.h" #include "core/bisimulation.h"
#include "core/input.h" #include "core/input.h"
#include "core/analysis.h" #include "core/analysis.h"
#include "core/environment.h"
PYBIND11_MODULE(core, m) { PYBIND11_MODULE(core, m) {
m.doc() = "core"; m.doc() = "core";
@ -25,4 +26,5 @@ PYBIND11_MODULE(core, m) {
define_bisimulation(m); define_bisimulation(m);
define_input(m); define_input(m);
define_graph_constraints(m); define_graph_constraints(m);
define_environment(m);
} }

6
tests/core/test_environment.py

@ -0,0 +1,6 @@
import stormpy
from helpers.helper import get_example_path
class TestEnvironment:
def test_environment(self):
env = stormpy.Environment()
Loading…
Cancel
Save