STORM_LOG_THROW(initvalcount==1,storm::exceptions::InvalidJaniException,"Initial value must be given once for transient variable '"+name+"' (scope: "+scopeDescription+") "+name+"' (scope: "+scopeDescription+") ");
}else{
STORM_LOG_THROW(initvalcount<=1,storm::exceptions::InvalidJaniException,"Initial value can be given at most one for variable "+name+"' (scope: "+scopeDescription+")");
STORM_LOG_THROW(variableStructure.count("type")==1,storm::exceptions::InvalidJaniException,"Variable '"+name+"' (scope: "+scopeDescription+") must have a (single) type-declaration.");
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+") ");
@ -231,11 +227,19 @@ namespace storm {
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");
// TODO as soon as we support half-open intervals, we have to change this.
}else{
initVal=parseExpression(variableStructure.at("initial-value"),"Initial value for variable "+name+" (scope: "+scopeDescription+") ");
}
}
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<<") ");
STORM_LOG_THROW(lowerBound&&upperBound,storm::exceptions::NotImplementedException,"Jani Bounded Integer variables (for now) have to be bounded from both sides");