STORM_LOG_THROW(expected==actual,storm::exceptions::InvalidJaniException,"Operator "<<opstring<<" expects "<<expected<<" arguments, but got "<<actual<<" in "<<errorInfo<<".");
STORM_LOG_THROW(expr.hasBooleanType(),storm::exceptions::InvalidJaniException,"Operator "<<opstring<<" expects argument "+std::to_string(argNr)+" to be Boolean in "<<errorInfo<<".");
STORM_LOG_THROW(expressionStructure.count("args")==1,storm::exceptions::InvalidJaniException,"Operation arguments are not given in "<<expressionStructure.dump()<<" in "<<scopeDescription<<".");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unknown operator "<<opstring<<" in "<<scopeDescription<<".");
}
}
}
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Only standard operators are supported for complex expressions as "<<expressionStructure.dump()<<" in "<<scopeDescription<<".");
}
}
}
}
@ -171,16 +224,29 @@ namespace storm {
STORM_LOG_THROW(automatonStructure.count("name")==1,storm::exceptions::InvalidJaniException,"Each automaton must have a name");
STORM_LOG_THROW(automatonStructure.count("name")==1,storm::exceptions::InvalidJaniException,"Each automaton must have a name");
std::stringname=getString(automatonStructure.at("name")," the name field for automaton");
std::stringname=getString(automatonStructure.at("name")," the name field for automaton");
storm::jani::Automatonautomaton(name);
storm::jani::Automatonautomaton(name);
STORM_LOG_THROW(automatonStructure.count("locations")>0,storm::exceptions::InvalidJaniException,"Automaton "<<name<<" does not have locations.");
STORM_LOG_THROW(automatonStructure.count("locations")>0,storm::exceptions::InvalidJaniException,"Automaton '"<<name<<"' does not have locations.");
STORM_LOG_THROW(locEntry.count("name"),storm::exceptions::InvalidJaniException,"Locations for automaton "<<name<<" must have exactly one name");
STORM_LOG_THROW(locEntry.count("name"),storm::exceptions::InvalidJaniException,"Locations for automaton '"<<name<<"' must have exactly one name");
std::stringlocName=getString(locEntry.at("name"),"location of automaton "+name);
std::stringlocName=getString(locEntry.at("name"),"location of automaton "+name);
STORM_LOG_THROW(locIds.count(locName)==0,storm::exceptions::InvalidJaniException,"Location with name '"+locName+"' already exists in automaton '"+name+"'");
STORM_LOG_THROW(locIds.count(locName)==0,storm::exceptions::InvalidJaniException,"Location with name '"+locName+"' already exists in automaton '"+name+"'");
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+"'");
STORM_LOG_THROW(locIds.count(sourceLoc)==1,storm::exceptions::InvalidJaniException,"Source of edge has unknown location '"<<sourceLoc<<"' in automaton '"<<name<<"'.");
STORM_LOG_THROW(edgeEntry.count("action")<2,storm::exceptions::InvalidJaniException,"Edge from "<<sourceLoc<<" in automaton "<<name<<" has multiple actions");
if(edgeEntry.count("action")>0){
std::stringaction=getString(edgeEntry.at("action"),"action name in edge from '"+sourceLoc+"' in automaton '"+name+"'");
}
STORM_LOG_THROW(edgeEntry.count("rate")<2,storm::exceptions::InvalidJaniException,"Edge from "<<sourceLoc<<" in automaton "<<name<<" has multiple rates");