STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported type 'clock' for variable '"<<variableName<<"' (scope: "<<scope.description<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported type 'clock' for variable '"<<variableName<<"' (scope: "<<scope.description<<").");
}elseif(typeStructure=="continuous"){
}elseif(typeStructure=="continuous"){
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported type 'continuous' for variable ''"<<variableName<<"' (scope: "<<scope.description<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported type 'continuous' for variable ''"<<variableName<<"' (scope: "<<scope.description<<").");
}else{
}else{
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported type "<<typeStructure.dump()<<" for variable '"<<variableName<<"' (scope: "<<scope.description<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported type "<<typeStructure.dump()<<" for variable '"<<variableName<<"' (scope: "<<scope.description<<").");
}
}
}elseif(typeStructure.is_object()){
}elseif(typeStructure.is_object()){
STORM_LOG_THROW(typeStructure.count("kind")==1,storm::exceptions::InvalidJaniException,"For complex type as in variable "<<variableName<<"(scope: "<<scope.description<<") kind must be given");
STORM_LOG_THROW(typeStructure.count("kind")==1,storm::exceptions::InvalidJaniException,"For complex type as in variable "<<variableName<<"(scope: "<<scope.description<<") kind must be given");
@ -726,7 +726,7 @@ namespace storm {
STORM_LOG_THROW(!lowerboundExpr.isInitialized()||lowerboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Lower bound for bounded integer variable "<<variableName<<"(scope: "<<scope.description<<") must be integer-typed");
STORM_LOG_THROW(!lowerboundExpr.isInitialized()||lowerboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Lower bound for bounded integer variable "<<variableName<<"(scope: "<<scope.description<<") must be integer-typed");
STORM_LOG_THROW(!upperboundExpr.isInitialized()||upperboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Upper bound for bounded integer variable "<<variableName<<"(scope: "<<scope.description<<") must be integer-typed");
STORM_LOG_THROW(!upperboundExpr.isInitialized()||upperboundExpr.hasIntegerType(),storm::exceptions::InvalidJaniException,"Upper bound for bounded integer variable "<<variableName<<"(scope: "<<scope.description<<") 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 "<<variableName<<"(scope: "<<scope.description<<")");
STORM_LOG_THROW(lowerboundExpr.evaluateAsInt()<=upperboundExpr.evaluateAsInt(),storm::exceptions::InvalidJaniException,"Lower bound must not be larger than upper bound for bounded integer variable "<<variableName<<"(scope: "<<scope.description<<").");
STORM_LOG_THROW(!lowerboundExpr.isInitialized()||lowerboundExpr.hasNumericalType(),storm::exceptions::InvalidJaniException,"Lower bound for bounded real variable "<<variableName<<"(scope: "<<scope.description<<") must be numeric");
STORM_LOG_THROW(!lowerboundExpr.isInitialized()||lowerboundExpr.hasNumericalType(),storm::exceptions::InvalidJaniException,"Lower bound for bounded real variable "<<variableName<<"(scope: "<<scope.description<<") must be numeric");
STORM_LOG_THROW(!upperboundExpr.isInitialized()||upperboundExpr.hasNumericalType(),storm::exceptions::InvalidJaniException,"Upper bound for bounded real variable "<<variableName<<"(scope: "<<scope.description<<") must be numeric");
STORM_LOG_THROW(!upperboundExpr.isInitialized()||upperboundExpr.hasNumericalType(),storm::exceptions::InvalidJaniException,"Upper bound for bounded real variable "<<variableName<<"(scope: "<<scope.description<<") must be numeric");
STORM_LOG_THROW(lowerboundExpr.evaluateAsRational()<=upperboundExpr.evaluateAsRational(),storm::exceptions::InvalidJaniException,"Lower bound must not be larger than upper bound for bounded integer variable "<<variableName<<"(scope: "<<scope.description<<")");
STORM_LOG_THROW(lowerboundExpr.evaluateAsRational()<=upperboundExpr.evaluateAsRational(),storm::exceptions::InvalidJaniException,"Lower bound must not be larger than upper bound for bounded integer variable "<<variableName<<"(scope: "<<scope.description<<").");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported base "<<basictype<<" for bounded variable "<<variableName<<"(scope: "<<scope.description<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported base "<<basictype<<" for bounded variable "<<variableName<<"(scope: "<<scope.description<<").");
}
}
}elseif(kind=="array"){
}elseif(kind=="array"){
STORM_LOG_THROW(typeStructure.count("base")==1,storm::exceptions::InvalidJaniException,"For array type as in variable "<<variableName<<"(scope: "<<scope.description<<") base must be given");
STORM_LOG_THROW(typeStructure.count("base")==1,storm::exceptions::InvalidJaniException,"For array type as in variable "<<variableName<<"(scope: "<<scope.description<<") base must be given");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported kind "<<kind<<" for complex type of variable "<<variableName<<"(scope: "<<scope.description<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unsupported kind "<<kind<<" for complex type of variable "<<variableName<<"(scope: "<<scope.description<<").");
}
}
}
}
}
}
@ -767,7 +767,7 @@ namespace storm {
STORM_LOG_THROW(functionDefinitionStructure.count("parameters")==1,storm::exceptions::InvalidJaniException,"Function definition '"+functionName+"' (scope: "+scope.description+") must have exactly one list of parameters.");
STORM_LOG_THROW(functionDefinitionStructure.count("parameters")==1,storm::exceptions::InvalidJaniException,"Function definition '"+functionName+"' (scope: "+scope.description+") must have exactly one list of parameters.");
STORM_LOG_THROW(parameterStructure.count("name")==1,storm::exceptions::InvalidJaniException,"Parameter declaration of parameter "+std::to_string(parameters.size())+" of Function definition '"+functionName+"' (scope: "+scope.description+") must have a name");
STORM_LOG_THROW(parameterStructure.count("name")==1,storm::exceptions::InvalidJaniException,"Parameter declaration of parameter "+std::to_string(parameters.size())+" of Function definition '"+functionName+"' (scope: "+scope.description+") must have a name");
std::stringparameterName=getString(parameterStructure.at("name"),"parameter-name of parameter "+std::to_string(parameters.size())+" of Function definition '"+functionName+"' (scope: "+scope.description+")");
std::stringparameterName=getString(parameterStructure.at("name"),"parameter-name of parameter "+std::to_string(parameters.size())+" of Function definition '"+functionName+"' (scope: "+scope.description+").");
ParsedTypeparameterType;
ParsedTypeparameterType;
STORM_LOG_THROW(parameterStructure.count("type")==1,storm::exceptions::InvalidJaniException,"Parameter declaration of parameter "+std::to_string(parameters.size())+" of Function definition '"+functionName+"' (scope: "+scope.description+") must have exactly one type.");
STORM_LOG_THROW(parameterStructure.count("type")==1,storm::exceptions::InvalidJaniException,"Parameter declaration of parameter "+std::to_string(parameters.size())+" of Function definition '"+functionName+"' (scope: "+scope.description+") must have exactly one type.");
parseType(parameterType,parameterStructure.at("type"),parameterName,scope.refine("parameter declaration of parameter "+std::to_string(parameters.size())+" of function definition "+functionName));
parseType(parameterType,parameterStructure.at("type"),parameterName,scope.refine("parameter declaration of parameter "+std::to_string(parameters.size())+" of function definition "+functionName));
@ -797,9 +797,9 @@ namespace storm {
std::stringexprManagerName=namePrefix+name;
std::stringexprManagerName=namePrefix+name;
booltransientVar=defaultVariableTransient;// Default value for variables.
booltransientVar=defaultVariableTransient;// Default value for variables.
STORM_LOG_THROW(tvarcount<=1,storm::exceptions::InvalidJaniException,"Multiple definitions of transient not allowed in variable '"+name+"' (scope: "+scope.description+")");
STORM_LOG_THROW(tvarcount<=1,storm::exceptions::InvalidJaniException,"Multiple definitions of transient not allowed in variable '"+name+"' (scope: "+scope.description+").");
if(tvarcount==1){
if(tvarcount==1){
transientVar=getBoolean(variableStructure.at("transient"),"transient-attribute in variable '"+name+"' (scope: "+scope.description+")");
transientVar=getBoolean(variableStructure.at("transient"),"transient-attribute in variable '"+name+"' (scope: "+scope.description+").");
}
}
STORM_LOG_THROW(variableStructure.count("type")==1,storm::exceptions::InvalidJaniException,"Variable '"+name+"' (scope: "+scope.description+") must have a (single) type-declaration.");
STORM_LOG_THROW(variableStructure.count("type")==1,storm::exceptions::InvalidJaniException,"Variable '"+name+"' (scope: "+scope.description+") must have a (single) type-declaration.");
STORM_LOG_THROW(initvalcount==1,storm::exceptions::InvalidJaniException,"Initial value must be given once for transient variable '"+name+"' (scope: "+scope.description+") "+name+"' (scope: "+scope.description+")");
STORM_LOG_THROW(initvalcount==1,storm::exceptions::InvalidJaniException,"Initial value must be given once for transient variable '"+name+"' (scope: "+scope.description+") "+name+"' (scope: "+scope.description+").");
}else{
}else{
STORM_LOG_THROW(initvalcount<=1,storm::exceptions::InvalidJaniException,"Initial value can be given at most one for variable "+name+"' (scope: "+scope.description+")");
STORM_LOG_THROW(initvalcount<=1,storm::exceptions::InvalidJaniException,"Initial value can be given at most one for variable "+name+"' (scope: "+scope.description+").");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unknown type description, "<<variableStructure.at("type").dump()<<" for variable '"<<name<<"' (scope: "<<scope.description<<")");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"Unknown type description, "<<variableStructure.at("type").dump()<<" for variable '"<<name<<"' (scope: "<<scope.description<<").");
}
}
/**
/**
@ -1391,7 +1391,7 @@ namespace storm {
STORM_LOG_THROW(transientValueEntry.count("ref")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one ref that is assigned to");
STORM_LOG_THROW(transientValueEntry.count("ref")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one ref that is assigned to");
STORM_LOG_THROW(transientValueEntry.count("value")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one assigned value");
STORM_LOG_THROW(transientValueEntry.count("value")==1,storm::exceptions::InvalidJaniException,"Transient values in location "<<locName<<" need exactly one assigned value");
storm::jani::LValuelValue=parseLValue(transientValueEntry.at("ref"),scope.refine("LHS of assignment in location "+locName));
storm::jani::LValuelValue=parseLValue(transientValueEntry.at("ref"),scope.refine("LHS of assignment in location "+locName));
STORM_LOG_THROW(lValue.isTransient(),storm::exceptions::InvalidJaniException,"Assigned non-transient variable "<<lValue<<" in location "+locName+" (automaton: '"+name+"')");
STORM_LOG_THROW(lValue.isTransient(),storm::exceptions::InvalidJaniException,"Assigned non-transient variable "<<lValue<<" in location "+locName+" (automaton: '"+name+"').");
storm::expressions::Expressionrhs=parseExpression(transientValueEntry.at("value"),scope.refine("Assignment of lValue in location "+locName));
storm::expressions::Expressionrhs=parseExpression(transientValueEntry.at("value"),scope.refine("Assignment of lValue in location "+locName));