STORM_LOG_THROW(variableStructure.count("type")==1,storm::exceptions::InvalidJaniException,"Variable '"+name+"' (scope: "+scopeDescription+") must have a (single) type-declaration.");
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
// TODO DEPRECATED make initial value optional? --- still present 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.");
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.
// 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::expressions::ExpressioninitExpr=parseExpression(variableStructure.at("initial-value"),"Initial value of variable "+name+" (scope: "+scopeDescription+")");
STORM_LOG_THROW(assignmentDeclCount<2,storm::exceptions::InvalidJaniException,"Destination in edge from '"<<sourceLoc<<"' to '"<<targetLoc<<"' in automaton '"<<name<<"' has multiple assignment lists");
STORM_LOG_THROW(assignmentEntry.count("ref")==1,storm::exceptions::InvalidJaniException,"Assignment in edge from '"<<sourceLoc<<"' to '"<<targetLoc<<"' in automaton '"<<name<<"' must have one ref field");
std::stringrefstring=getString(assignmentEntry.at("ref"),"assignment in edge from '"+sourceLoc+"' to '"+targetLoc+"' in automaton '"+name+"'");
// TODO check types
// value
STORM_LOG_THROW(assignmentEntry.count("value")==1,storm::exceptions::InvalidJaniException,"Assignment in edge from '"<<sourceLoc<<"' to '"<<targetLoc<<"' in automaton '"<<name<<"' must have one value field");
storm::expressions::ExpressionassignmentExpr=parseExpression(assignmentEntry.at("value"),"assignment in edge from '"+sourceLoc+"' to '"+targetLoc+"' in automaton '"+name+"'");