STORM_LOG_THROW(variable.hasLowerBound()&&variable.hasUpperBound(),storm::exceptions::WrongFormatException,"Bounded integer variables with infinite range are not supported.");
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+")",globalVars,constants,localVars);
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+")",globalVars,constants,localVars);
assert(upperboundExpr.isInitialized());
STORM_LOG_THROW(variableStructure.at("type").count("lower-bound")+variableStructure.at("type").count("upper-bound")>0,storm::exceptions::InvalidJaniException,"For bounded type as in variable "<<name<<"(scope: "<<scopeDescription<<") lower-bound or upper-bound must be given");
upperboundExpr=parseExpression(variableStructure.at("type").at("upper-bound"),"Upper bound for variable "+name+" (scope: "+scopeDescription+")",globalVars,constants,localVars);
}
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");
STORM_LOG_THROW(initVal.get().hasIntegerType(),storm::exceptions::InvalidJaniException,"Initial value for integer variable "+name+"(scope "+scopeDescription+") should be an integer");
}
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(!lowerboundExpr.isInitialized()||lowerboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Lower bound for bounded integer variable "<<name<<"(scope: "<<scopeDescription<<") must be integer-typed");
STORM_LOG_THROW(!upperboundExpr.isInitialized()||upperboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Upper bound for bounded integer variable "<<name<<"(scope: "<<scopeDescription<<") must be integer-typed");
STORM_LOG_THROW(lowerboundExpr.evaluateAsInt()<=upperboundExpr.evaluateAsInt(),storm::exceptions::InvalidJaniException,"Lower bound must not be larger than upper bound for bounded integer variable "<<name<<"(scope: "<<scopeDescription<<")");
STORM_LOG_THROW(lowerBound&&upperBound,storm::exceptions::NotImplementedException,"Jani Bounded Integer variables (for now) have to be bounded from both sides");