STORM_LOG_THROW(accStructure.is_array(),storm::exceptions::InvalidJaniException,"Accumulate should be an array");
for(autoconst&accEntry:accStructure){
if(accEntry=="steps"){
accSteps=true;
}elseif(accEntry=="time"){
accTime=true;
}elseif(accEntry=="exit"){
accExit=true;
}else{
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"One may only accumulate either 'steps' or 'time' or 'exit', got "<<accEntry.dump()<<" in "<<context);
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"One may only accumulate either 'steps' or 'time', got "<<accEntry.dump()<<" in "<<context);
STORM_LOG_THROW(propertyStructure.count("time-instant")==0,storm::exceptions::NotSupportedException,"Storm does not support to have a step-instant and a time-instant in "+context);
STORM_LOG_THROW(propertyStructure.count("time-instant")==0,storm::exceptions::NotSupportedException,"Storm does not support to have a step-instant and a time-instant in "+context);
STORM_LOG_THROW(propertyStructure.count("reward-instants")==0,storm::exceptions::NotSupportedException,"Storm does not support to have a step-instant and a reward-instant in "+context);
STORM_LOG_THROW(propertyStructure.count("reward-instants")==0,storm::exceptions::NotSupportedException,"Storm does not support to have a step-instant and a reward-instant in "+context);
storm::expressions::ExpressionstepInstantExpr=parseExpression(propertyStructure.at("step-instant"),"Step instant in "+context,globalVars,constants);
storm::expressions::ExpressionstepInstantExpr=parseExpression(propertyStructure.at("step-instant"),"Step instant in "+context,globalVars,constants);
storm::expressions::ExpressionrewInstExpression=parseExpression(rewInst.at("exp"),"Reward expression in "+context,globalVars,constants);
storm::expressions::ExpressionrewInstExpression=parseExpression(rewInst.at("exp"),"Reward expression in "+context,globalVars,constants);
STORM_LOG_THROW(!rewInstExpression.isVariable(),storm::exceptions::NotSupportedException,"Reward bounded cumulative reward formulas should only argue over reward expressions.");
STORM_LOG_THROW(!rewInstExpression.isVariable(),storm::exceptions::NotSupportedException,"Reward bounded cumulative reward formulas should only argue over reward expressions.");
STORM_LOG_THROW(false,storm::exceptions::InvalidJaniException,"One may only accumulate either 'steps' or 'time', got "<<accEntry.dump()<<" in "<<context);
}
}
STORM_LOG_THROW(rewInstAccSteps||rewInstAccTime,storm::exceptions::NotSupportedException,"Storm only allows to accumulate either over time or over steps in "+context);
subformula=std::make_shared<storm::logic::EventuallyFormula>(parseFormula(propertyStructure.at("reach"),context,globalVars,constants,"Reach-expression of operator "+opString),context);
subformula=std::make_shared<storm::logic::EventuallyFormula>(parseFormula(propertyStructure.at("reach"),context,globalVars,constants,"Reach-expression of operator "+opString),context,rewardAccumulation);
STORM_LOG_THROW(rbStructure.count("exp")==1,storm::exceptions::InvalidJaniException,"Expecting reward-expression for operator "<<opString<<" in "<<context);
STORM_LOG_THROW(rbStructure.count("exp")==1,storm::exceptions::InvalidJaniException,"Expecting reward-expression for operator "<<opString<<" in "<<context);
storm::expressions::ExpressionrewExpr=parseExpression(rbStructure.at("exp"),"Reward expression in "+context,globalVars,constants);
storm::expressions::ExpressionrewExpr=parseExpression(rbStructure.at("exp"),"Reward expression in "+context,globalVars,constants);
STORM_LOG_THROW(rewExpr.isVariable(),storm::exceptions::NotSupportedException,"Storm currently does not support complex reward expressions.");
STORM_LOG_THROW(rewExpr.isVariable(),storm::exceptions::NotSupportedException,"Storm currently does not support complex reward expressions.");
STORM_LOG_ASSERT(this->timeBoundReferences.size()==this->bounds.size(),"Number of time bounds and number of time bound references does not match.");
STORM_LOG_ASSERT(this->timeBoundReferences.size()==this->bounds.size(),"Number of time bounds and number of time bound references does not match.");
STORM_LOG_ASSERT(!this->timeBoundReferences.empty(),"No time bounds given.");
STORM_LOG_ASSERT(!this->timeBoundReferences.empty(),"No time bounds given.");
@ -137,12 +137,24 @@ namespace storm {
STORM_LOG_THROW(!bound.containsVariables(),storm::exceptions::InvalidOperationException,"Cannot evaluate time-bound '"<<bound<<"' as it contains undefined constants.");
STORM_LOG_THROW(!bound.containsVariables(),storm::exceptions::InvalidOperationException,"Cannot evaluate time-bound '"<<bound<<"' as it contains undefined constants.");
STORM_LOG_THROW(context==FormulaContext::Probability||context==FormulaContext::Reward||context==FormulaContext::Time,storm::exceptions::InvalidPropertyException,"Invalid context for formula.");
STORM_LOG_THROW(context==FormulaContext::Probability||context==FormulaContext::Reward||context==FormulaContext::Time,storm::exceptions::InvalidPropertyException,"Invalid context for formula.");
STORM_LOG_THROW(context!=FormulaContext::Probability||!rewardAccumulation.is_initialized(),storm::exceptions::InvalidPropertyException,"Reward accumulations should only be given for time- and reward formulas");
STORM_LOG_THROW(rewardModelName.is_initialized(),storm::exceptions::InvalidPropertyException,"Unable to find transient variable with for unique reward model.");
STORM_LOG_THROW(model.hasGlobalVariable(rewardModelName.get()),storm::exceptions::InvalidPropertyException,"Unable to find transient variable with name "<<rewardModelName.get()<<".");
STORM_LOG_THROW(edge.getSourceLocationIndex()<locations.size(),storm::exceptions::InvalidArgumentException,"Cannot add edge with unknown source location index '"<<edge.getSourceLocationIndex()<<"'.");
STORM_LOG_THROW(edge.getSourceLocationIndex()<locations.size(),storm::exceptions::InvalidArgumentException,"Cannot add edge with unknown source location index '"<<edge.getSourceLocationIndex()<<"'.");
STORM_LOG_THROW(model.hasGlobalVariable(rewardModelName),storm::exceptions::InvalidPropertyException,"Unable to find transient variable with name "<<rewardModelName<<".");
STORM_LOG_WARN_COND(!f.getSubformula().asCumulativeRewardFormula().getTimeBoundReference().isRewardBound(),"Export for reward bounded cumulative reward formulas currently unsupported.");
STORM_LOG_WARN_COND(!f.getSubformula().asCumulativeRewardFormula().getTimeBoundReference().isRewardBound(),"Export for reward bounded cumulative reward formulas currently unsupported.");