Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaption to changes in Storm #45

Merged
merged 2 commits into from
Nov 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/storage/jani.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "jani.h"
#include <storm/storage/jani/Model.h>
#include <storm/storage/jani/JSONExporter.h>
#include <storm/storage/jani/visitor/JSONExporter.h>
#include <storm/storage/expressions/ExpressionManager.h>
#include <storm/logic/RewardAccumulationEliminationVisitor.h>
#include <storm/storage/jani/traverser/InformationCollector.h>
Expand Down Expand Up @@ -135,7 +135,6 @@ void define_jani(py::module& m) {
return py::make_iterator(v.begin(), v.end());
}, py::keep_alive<0, 1>())
.def("add_variable", [](VariableSet& vs, Variable& v) -> void { vs.addVariable(v); })
.def("add_bounded_integer_variable", [](VariableSet& vs, BoundedIntegerVariable& v) -> auto& { return vs.addVariable(v); /*return vs.getVariable(v.getExpressionVariable());*/ }, py::return_value_policy::reference_internal, "variable"_a)
.def("empty", &VariableSet::empty, "is there a variable in the set?")
.def("get_variable_by_name", [](VariableSet& v, std::string const& name) -> auto& { return v.getVariable(name);})
.def("get_variable_by_expr_variable", [](VariableSet& v, storm::expressions::Variable const& var) -> auto& { return v.getVariable(var);})
Expand All @@ -147,15 +146,6 @@ void define_jani(py::module& m) {
.def_property_readonly("expression_variable", &Variable::getExpressionVariable, "expression variable for this variable")
.def_property_readonly("init_expression", &Variable::getInitExpression);

py::class_<BoundedIntegerVariable, std::shared_ptr<BoundedIntegerVariable>> bivariable(m, "JaniBoundedIntegerVariable", "A Bounded Integer", variable);
bivariable.def(py::init<std::string, storm::expressions::Variable, storm::expressions::Expression, storm::expressions::Expression, storm::expressions::Expression>(),
"name"_a, "expression_variable"_a, "init_value"_a, "lower_bound"_a, "upper_bound"_a)
.def(py::init<std::string, storm::expressions::Variable, storm::expressions::Expression, storm::expressions::Expression>(),
"name"_a, "expression_variable"_a, "lower_bound"_a, "upper_bound"_a)
.def_property_readonly("lower_bound", &BoundedIntegerVariable::getLowerBound)
.def_property_readonly("upper_bound", &BoundedIntegerVariable::getUpperBound)
;

py::class_<Constant, std::shared_ptr<Constant>> constant(m, "JaniConstant", "A Constant in JANI");
constant.def(py::init<std::string, storm::expressions::Variable>())
.def_property_readonly("defined", &Constant::isDefined, "is constant defined by some expression")
Expand Down