Matthias Volk
5 years ago
13 changed files with 132 additions and 26 deletions
-
13CMakeLists.txt
-
56cmake/CMakeLists.txt
-
3cmake/config.py.in
-
7lib/stormpy/gspn/__init__.py
-
19setup.py
-
1setup/config.py
-
2src/gspn/common.h
-
18src/gspn/gspn.cpp
-
5src/gspn/gspn.h
-
14src/mod_gspn.cpp
-
2tests/configurations.py
-
4tests/gspn/conftest.py
-
12tests/gspn/test_gspn.py
@ -0,0 +1,7 @@ |
|||||
|
from . import _config |
||||
|
|
||||
|
if not _config.storm_with_gspn: |
||||
|
raise ImportError("No support for GSPNs was built in Storm.") |
||||
|
|
||||
|
from . import gspn |
||||
|
from .gspn import * |
@ -0,0 +1,2 @@ |
|||||
|
#include "src/common.h" |
||||
|
#include "storm-gspn/api/storm-gspn.h" |
@ -0,0 +1,18 @@ |
|||||
|
#include "gspn.h"
|
||||
|
#include "src/helpers.h"
|
||||
|
#include "storm-gspn/storage/gspn/GSPN.h"
|
||||
|
#include "storm-gspn/storage/gspn/GspnBuilder.h"
|
||||
|
#include "storm/settings/SettingsManager.h"
|
||||
|
|
||||
|
|
||||
|
typedef storm::gspn::GSPN GSPN; |
||||
|
|
||||
|
|
||||
|
void define_gspn(py::module& m) { |
||||
|
|
||||
|
// GSPN class
|
||||
|
py::class_<GSPN, std::shared_ptr<GSPN>>(m, "GSPN", "Generalized Stochastic Petri Net") |
||||
|
.def("name", &GSPN::getName, "Name of GSPN") |
||||
|
; |
||||
|
|
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "common.h" |
||||
|
|
||||
|
void define_gspn(py::module& m); |
@ -0,0 +1,14 @@ |
|||||
|
#include "common.h"
|
||||
|
|
||||
|
#include "gspn/gspn.h"
|
||||
|
|
||||
|
PYBIND11_MODULE(gspn, m) { |
||||
|
m.doc() = "Support for GSPNs"; |
||||
|
|
||||
|
#ifdef STORMPY_DISABLE_SIGNATURE_DOC
|
||||
|
py::options options; |
||||
|
options.disable_function_signatures(); |
||||
|
#endif
|
||||
|
|
||||
|
define_gspn(m); |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
from configurations import has_gspn |
||||
|
|
||||
|
if has_gspn: |
||||
|
import stormpy.gspn |
@ -0,0 +1,12 @@ |
|||||
|
import os |
||||
|
|
||||
|
import stormpy |
||||
|
from helpers.helper import get_example_path |
||||
|
|
||||
|
from configurations import gspn |
||||
|
|
||||
|
|
||||
|
@gspn |
||||
|
class TestGSPNBuilder: |
||||
|
def test_build_gspn(self): |
||||
|
assert True |
Write
Preview
Loading…
Cancel
Save
Reference in new issue