STORM_LOG_THROW(initExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Initial value for interger variable "<<name<<" (scope: "<<scopeDescription<<") should have integer 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<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unknown type description "<<variableStructure.at("type").dump()<<" for Variable '"<<name<<"' (scope: "<<scopeDescription<<")");
STORM_LOG_THROW(variableStructure.at("type").count("kind")==1,storm::exceptions::InvalidJaniException,"For complex type as in variable "<<name<<"(scope: "<<scopeDescription<<") kind must be given");
std::stringkind=getString(variableStructure.at("type").at("kind"),"kind for complex type as in variable "+name+"(scope: "+scopeDescription+") ");
if(kind=="bounded"){
// First do the bounds, that makes the code a bit more streamlined
STORM_LOG_THROW(variableStructure.at("type").count("lower-bound")==1,storm::exceptions::InvalidJaniException,"For bounded type as in variable "<<name<<"(scope: "<<scopeDescription<<") lower-bound must be given");
storm::expressions::ExpressionlowerboundExpr=parseExpression(variableStructure.at("type").at("lower-bound"),"Lower bound for variable "+name+" (scope: "+scopeDescription+")");
assert(lowerboundExpr.isInitialized());
STORM_LOG_THROW(variableStructure.at("type").count("upper-bound")==1,storm::exceptions::InvalidJaniException,"For bounded type as in variable "<<name<<"(scope: "<<scopeDescription<<") upper-bound must be given");
storm::expressions::ExpressionupperboundExpr=parseExpression(variableStructure.at("type").at("upper-bound"),"Upper bound for variable "+name+" (scope: "+scopeDescription+")");
assert(upperboundExpr.isInitialized());
STORM_LOG_THROW(variableStructure.at("type").count("base")==1,storm::exceptions::InvalidJaniException,"For bounded type as in variable "<<name<<"(scope: "<<scopeDescription<<") base must be given");
std::stringbasictype=getString(variableStructure.at("type").at("base"),"base for bounded type as in variable "+name+"(scope: "+scopeDescription+") ");
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<<") ");
}
}else{
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported kind "<<kind<<" for complex type of variable "<<name<<"(scope: "<<scopeDescription<<") ");
}
}
}
else{
else{
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unknown type description, "<<variableStructure.at("type").dump()<<" for Variable '"<<name<<"' (scope: "<<scopeDescription<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unknown type description, "<<variableStructure.at("type").dump()<<" for Variable '"<<name<<"' (scope: "<<scopeDescription<<")");