36 STORM_LOG_ASSERT(oldStateValuations.getNumberOfStates() > 0,
"Code assumes that there are states in the state valuations.");
39 for (
auto it = oldStateValuations.at(0).begin(); it != oldStateValuations.at(0).end(); ++it) {
40 builder.addVariable(it.getVariable());
43 for (
auto const& v : booleanVariables) {
46 for (
auto const& v : integerVariables) {
51 for (uint64_t state = 0; state < oldStateValuations.getNumberOfStates(); ++state) {
52 std::vector<bool> booleanValues{};
53 std::vector<int64_t> integerValues{};
55 for (
auto sv = oldStateValuations.at(state).begin(); sv != oldStateValuations.at(state).end(); ++sv) {
56 if (sv.isVariableAssignment()) {
57 auto const& var = sv.getVariable();
59 evaluator.setBooleanValue(var, sv.getBooleanValue());
61 booleanValues.push_back(sv.getBooleanValue());
63 }
else if (sv.isInteger()) {
64 evaluator.setIntegerValue(var, sv.getIntegerValue());
66 integerValues.push_back(sv.getIntegerValue());
70 evaluator.setRationalValue(var, sv.getRationalValue());
72 "Extending state valuations with rational values is currently not supported.");
75 STORM_LOG_THROW(!extend, storm::exceptions::NotSupportedException,
"Extending state valuations with label values is currently not supported.");
79 for (
auto const& expr : booleanExpressions) {
80 booleanValues.push_back(evaluator.asBool(expr));
82 for (
auto const& expr : integerExpressions) {
83 integerValues.push_back(evaluator.asInt(expr));
85 builder.addState(state, std::move(booleanValues), std::move(integerValues));