STORM_LOG_THROW(rewardModelName.empty(),storm::exceptions::InvalidArgumentException,"Cannot build unknown reward model '"<<rewardModelName<<"'.");
STORM_LOG_THROW(globalVariables.getNumberOfTransientVariables()==1,storm::exceptions::InvalidArgumentException,"Reference to standard reward model is ambiguous.");
STORM_LOG_THROW(globalVariables.getNumberOfRealTransientVariables()+globalVariables.getNumberOfUnboundedIntegerTransientVariables()==1,storm::exceptions::InvalidArgumentException,"Reference to standard reward model is ambiguous.");
STORM_LOG_THROW(rewardModelName.empty(),storm::exceptions::InvalidArgumentException,"Cannot build unknown reward model '"<<rewardModelName<<"'.");
STORM_LOG_THROW(globalVariables.getNumberOfTransientVariables()==1,storm::exceptions::InvalidArgumentException,"Reference to standard reward model is ambiguous.");
STORM_LOG_THROW(globalVariables.getNumberOfRealTransientVariables()+globalVariables.getNumberOfUnboundedIntegerTransientVariables()==1,storm::exceptions::InvalidArgumentException,"Reference to standard reward model is ambiguous.");
}
}
// If no reward model was yet added, but there was one that was given in the options, we try to build the
STORM_LOG_THROW(expressionOrLabelAndBool.first.getLabel()=="init"||expressionOrLabelAndBool.first.getLabel()=="deadlock",storm::exceptions::InvalidSettingsException,"Terminal states refer to illegal label '"<<expressionOrLabelAndBool.first.getLabel()<<"'.");
// If it's a label, i.e. refers to a transient boolean variable we need to derive the expression
// for the label so we can cut off the exploration there.
STORM_LOG_THROW(model.getGlobalVariables().hasVariable(expressionOrLabelAndBool.first.getLabel()),storm::exceptions::InvalidSettingsException,"Terminal states refer to illegal label '"<<expressionOrLabelAndBool.first.getLabel()<<"'.");
STORM_LOG_THROW(variable.isBooleanVariable(),storm::exceptions::InvalidSettingsException,"Terminal states refer to non-boolean variable '"<<expressionOrLabelAndBool.first.getLabel()<<"'.");
STORM_LOG_THROW(variable.isTransient(),storm::exceptions::InvalidSettingsException,"Terminal states refer to non-transient variable '"<<expressionOrLabelAndBool.first.getLabel()<<"'.");
STORM_LOG_THROW(assignedValue<=integerIt->upperBound,storm::exceptions::WrongFormatException,"The update "<<assignmentIt->getExpressionVariable().getName()<<" := "<<assignmentIt->getAssignedExpression()<<" leads to an out-of-bounds value ("<<assignedValue<<") for the variable '"<<assignmentIt->getExpressionVariable().getName()<<"'.");
STORM_LOG_ASSERT(static_cast<int_fast64_t>(newState.getAsInt(integerIt->bitOffset,integerIt->bitWidth))+integerIt->lowerBound==assignedValue,"Writing to the bit vector bucket failed (read "<<newState.getAsInt(integerIt->bitOffset,integerIt->bitWidth)<<" but wrote "<<assignedValue<<").");
@ -266,7 +298,7 @@ namespace storm {
// If a terminal expression was set and we must not expand this state, return now.
STORM_LOG_THROW(assignedValue<=integerIt->upperBound,storm::exceptions::WrongFormatException,"The update "<<update<<" leads to an out-of-bounds value ("<<assignedValue<<") for the variable '"<<assignmentIt->getVariableName()<<"'.");
STORM_LOG_THROW(assignedValue>=integerIt->lowerBound,storm::exceptions::WrongFormatException,"The update "<<update<<" leads to an out-of-bounds value ("<<assignedValue<<") for the variable '"<<assignmentIt->getVariableName()<<"'.");
STORM_LOG_THROW(locEntry.count("invariant")==0,storm::exceptions::InvalidJaniException,"Invariants in locations as in '"+locName+"' in automaton '"+name+"' are not supported");
//STORM_LOG_THROW(locEntry.count("invariant") > 0 && !supportsInvariants(parentModel.getModelType()), storm::exceptions::InvalidJaniException, "Invariants are not supported in the model type " + to_string(parentModel.getModelType()));
STORM_LOG_THROW(transientValueEntry.count("ref")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one ref that is assigned to");
STORM_LOG_THROW(transientValueEntry.count("value")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one assigned value");
storm::jani::Variableconst&lhs=getLValue(transientValueEntry.at("ref"),parentModel.getGlobalVariables(),automaton.getVariables(),"LHS of assignment in location "+locName+" (automaton '"+name+"')");
STORM_LOG_THROW(lhs.isTransient(),storm::exceptions::InvalidJaniException,"Assigned non-transient variable "+lhs.getName()+" in location "+locName+" (automaton: '"+name+"')");
storm::expressions::Expressionrhs=parseExpression(transientValueEntry.at("value"),"Assignment of variable "+lhs.getName()+" in location "+locName+" (automaton: '"+name+"')");
STORM_LOG_THROW(transientValueEntry.count("ref")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one ref that is assigned to");
STORM_LOG_THROW(transientValueEntry.count("value")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one assigned value");
storm::jani::Variableconst&lhs=getLValue(transientValueEntry.at("ref"),parentModel.getGlobalVariables(),automaton.getVariables(),"LHS of assignment in location "+locName+" (automaton '"+name+"')");
STORM_LOG_THROW(lhs.isTransient(),storm::exceptions::InvalidJaniException,"Assigned non-transient variable "+lhs.getName()+" in location "+locName+" (automaton: '"+name+"')");
storm::expressions::Expressionrhs=parseExpression(transientValueEntry.at("value"),"Assignment of variable "+lhs.getName()+" in location "+locName+" (automaton: '"+name+"')");
STORM_LOG_THROW(edgeEntry.count("rate")<2,storm::exceptions::InvalidJaniException,"Edge from '"<<sourceLoc<<"' in automaton '"<<name<<"' has multiple rates");
storm::expressions::ExpressionrateExpr;
if(edgeEntry.count("rate")>0){
rateExpr=parseExpression(edgeEntry.at("rate"),"rate expression in edge from '"+sourceLoc+"' in automaton '"+name+"'");
STORM_LOG_THROW(edgeEntry.at("rate").count("exp")==1,storm::exceptions::InvalidJaniException,"Rate in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"' must have a defing expression.");
rateExpr=parseExpression(edgeEntry.at("rate").at("exp"),"rate expression in edge from '"+sourceLoc+"' in automaton '"+name+"'");
STORM_LOG_THROW(rateExpr.hasNumericalType(),storm::exceptions::InvalidJaniException,"Rate '"<<rateExpr<<"' has not a numerical type");