STORM_LOG_THROW(edgeEntry.count("location")==1,storm::exceptions::InvalidJaniException,"Each edge in automaton '"<<name<<"' must have a source");
STORM_LOG_THROW(edgeEntry.count("location")==1,storm::exceptions::InvalidJaniException,"Each edge in automaton '"<<name<<"' must have a source");
std::stringsourceLoc=getString(edgeEntry.at("location"),"source location for edge in automaton '"+name+"'");
std::stringsourceLoc=getString(edgeEntry.at("location"),"source location for edge in automaton '"+name+"'");
@ -1441,15 +1441,35 @@ namespace storm {
// guard
// guard
STORM_LOG_THROW(edgeEntry.count("guard")<=1,storm::exceptions::InvalidJaniException,"Guard can be given at most once in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"'");
STORM_LOG_THROW(edgeEntry.count("guard")<=1,storm::exceptions::InvalidJaniException,"Guard can be given at most once in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"'");
STORM_LOG_THROW(edgeEntry.at("guard").count("exp")==1,storm::exceptions::InvalidJaniException,"Guard in edge from '"+sourceLoc+"' in automaton '"+name+"' must have one expression");
STORM_LOG_THROW(edgeEntry.at("guard").count("exp")==1,storm::exceptions::InvalidJaniException,"Guard in edge from '"+sourceLoc+"' in automaton '"+name+"' must have one expression");
guardExpr=parseExpression(edgeEntry.at("guard").at("exp"),scope.refine("guard expression in edge from '"+sourceLoc));
guardExpr=parseExpression(edgeEntry.at("guard").at("exp"),scope.refine("guard expression in edge from '"+sourceLoc));
STORM_LOG_THROW(guardExpr.hasBooleanType(),storm::exceptions::InvalidJaniException,"Guard "<<guardExpr<<" does not have Boolean type.");
STORM_LOG_THROW(guardExpr.hasBooleanType(),storm::exceptions::InvalidJaniException,"Guard "<<guardExpr<<" does not have Boolean type.");
STORM_LOG_THROW(edgeEntry.count("assignments")==1,storm::exceptions::InvalidJaniException,"Multiple edge assignments in edge from '"+sourceLoc+"' in automaton '"+name+"'.");
STORM_LOG_THROW(assignmentEntry.count("ref")==1,storm::exceptions::InvalidJaniException,"Assignment in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"' must have one ref field");
storm::jani::LValuelValue=parseLValue(assignmentEntry.at("ref"),scope.refine("Assignment variable in edge from '"+sourceLoc+"' in automaton '"+name+"'"));
// value
STORM_LOG_THROW(assignmentEntry.count("value")==1,storm::exceptions::InvalidJaniException,"Assignment in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"' must have one value field");
storm::expressions::ExpressionassignmentExpr=parseExpression(assignmentEntry.at("value"),scope.refine("assignment in edge from '"+sourceLoc+"' in automaton '"+name+"'"));
// TODO check types
// index
int64_tassignmentIndex=0;// default.
if(assignmentEntry.count("index")>0){
assignmentIndex=getSignedInt(assignmentEntry.at("index"),"assignment index in edge from '"+sourceLoc+"' in automaton '"+name+"'");
STORM_LOG_THROW(edgeEntry.count("destinations")==1,storm::exceptions::InvalidJaniException,"A single list of destinations must be given in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"'");
STORM_LOG_THROW(edgeEntry.count("destinations")==1,storm::exceptions::InvalidJaniException,"A single list of destinations must be given in edge from '"<<sourceLoc<<"' in automaton '"<<name<<"'");