Browse Source

Updated dft bindings after Storm-dft refactoring

refactoring
Matthias Volk 7 years ago
parent
commit
aacb202fb3
  1. 10
      src/dft/dft.cpp

10
src/dft/dft.cpp

@ -1,8 +1,8 @@
#include "dft.h" #include "dft.h"
#include "storm-dft/parser/DFTJsonParser.h" #include "storm-dft/parser/DFTJsonParser.h"
#include "storm-dft/builder/ExplicitDFTModelBuilderApprox.h"
#include "storm-dft/builder/ExplicitDFTModelBuilder.h"
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm-dft/settings/modules/DFTSettings.h"
#include "storm-dft/settings/modules/FaultTreeSettings.h"
#include "storm-dft/storage/dft/DFTIsomorphism.h" #include "storm-dft/storage/dft/DFTIsomorphism.h"
// Thin wrapper for model building using one formula as argument // Thin wrapper for model building using one formula as argument
@ -18,15 +18,15 @@ std::shared_ptr<storm::models::sparse::Model<ValueType>> buildModelFromJsonDft(s
auto colouring = dft.colourDFT(); auto colouring = dft.colourDFT();
symmetries = dft.findSymmetries(colouring); symmetries = dft.findSymmetries(colouring);
} }
storm::builder::ExplicitDFTModelBuilderApprox<ValueType> builder(dft, symmetries, true);
typename storm::builder::ExplicitDFTModelBuilderApprox<ValueType>::LabelOptions labeloptions({}, true);
storm::builder::ExplicitDFTModelBuilder<ValueType> builder(dft, symmetries, true);
typename storm::builder::ExplicitDFTModelBuilder<ValueType>::LabelOptions labeloptions({}, true);
builder.buildModel(labeloptions, 0, 0.0); builder.buildModel(labeloptions, 0, 0.0);
return builder.getModel(); return builder.getModel();
} }
void define_dft(py::module& m) { void define_dft(py::module& m) {
m.def("_set_up", []() { m.def("_set_up", []() {
storm::settings::addModule<storm::settings::modules::DFTSettings>();
storm::settings::addModule<storm::settings::modules::FaultTreeSettings>();
}, "Initialize Storm-dft"); }, "Initialize Storm-dft");
// Build model // Build model
m.def("build_sparse_model_from_json_dft", &buildModelFromJsonDft<double>, "Build the model", py::arg("jsonDft"), py::arg("symred") = false); m.def("build_sparse_model_from_json_dft", &buildModelFromJsonDft<double>, "Build the model", py::arg("jsonDft"), py::arg("symred") = false);

Loading…
Cancel
Save