std::stringname=getString(variableStructure.at("name"),"variable-name in "+scopeDescription+"-scope");
// TODO check existance of name.
// TODO store prefix in variable.
std::stringexprManagerName=pref+name;
STORM_LOG_THROW(variableStructure.count("type")==1,storm::exceptions::InvalidJaniException,"Variable '"+name+"' (scope: "+scopeDescription+") must have a (single) type-declaration.");
// TODO DEPRECATED make initial value optional? --- still rpesent in files, so keep it for now
STORM_LOG_THROW(variableStructure.count("initial-value")==1,storm::exceptions::InvalidJaniException,"Initial value for variable '"+name+"' + (scope: "+scopeDescription+") must be given once.");
// Read initial value before; that makes creation later on a bit easier, and has as an additional benefit that we do not need to check whether the variable occurs also on the assignment.
storm::expressions::ExpressioninitExpr=parseExpression(variableStructure.at("initial-value"),"Initial value of variable "+name+" (scope: "+scopeDescription+")");
STORM_LOG_THROW(initExpr.hasBooleanType(),storm::exceptions::InvalidJaniException,"Initial value for Boolean variable "<<name<<" (scope: "<<scopeDescription<<") should have Boolean type.");
STORM_LOG_THROW(initExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Initial value for interger variable "<<name<<" (scope: "<<scopeDescription<<") should have integer type.");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unknown type description "<<variableStructure.at("type").dump()<<" for Variable '"<<name<<"' (scope: "<<scopeDescription<<")");
@ -119,7 +126,7 @@ namespace storm {
if(basictype=="int"){
STORM_LOG_THROW(lowerboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Lower bound for bounded integer variable "<<name<<"(scope: "<<scopeDescription<<") must be integer-typed");
STORM_LOG_THROW(upperboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Upper bound for bounded integer variable "<<name<<"(scope: "<<scopeDescription<<") must be integer-typed");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported base "<<basictype<<" for bounded variable "<<name<<"(scope: "<<scopeDescription<<") ");
STORM_LOG_THROW(rateExpr.hasNumericalType(),storm::exceptions::InvalidJaniException,"Rate '"<<rateExpr<<"' has not a numerical type");
}
STORM_LOG_THROW(edgeEntry.count("guard")==1,storm::exceptions::InvalidJaniException,"A single guard must be given in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"'");
storm::expressions::ExpressionguardExpr=parseExpression(edgeEntry.at("guard"),"guard expression in edge from '"+sourceLoc+"' in automaton '"+name+"'");
storm::expressions::ExpressionguardExpr=parseExpression(edgeEntry.at("guard"),"guard expression in edge from '"+sourceLoc+"' in automaton '"+name+"'",localVars);
STORM_LOG_THROW(guardExpr.hasBooleanType(),storm::exceptions::InvalidJaniException,"Guard "<<guardExpr<<" does not have Boolean type.");