STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable '"<<variable.getName()<<"' with unknown type while trying to create solver variables.");
STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable '"<<variableTypePair.first.getName()<<"' with unknown type while trying to create solver variables.");
STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable '"<<variable.getName()<<"' with unknown type while trying to create solver variables.");
STORM_LOG_THROW(allIdentifiers.find(constant.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": duplicate identifier '"<<constant.getName()<<"'.");
// Check defining expressions of defined constants.
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": defining expression refers to unknown identifiers.");
STORM_LOG_THROW(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": lower bound expression refers to unknown constants.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": upper bound expression refers to unknown constants.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": lower bound expression refers to unknown constants.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": upper bound expression refers to unknown constants.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": guard refers to unknown identifiers.");
STORM_LOG_THROW(command.getGuardExpression().hasBooleanReturnType(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": expression for guard must evaluate to type 'bool'.");
STORM_LOG_THROW(command.getGuardExpression().hasBooleanType(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": expression for guard must evaluate to type 'bool'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": likelihood expression refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": assignment illegally refers to variable '"<<assignment.getVariableName()<<"'.");
}else{
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": assignment refers to unknown variable '"<<assignment.getVariableName()<<"'.");
}
}
STORM_LOG_THROW(alreadyAssignedIdentifiers.find(assignment.getVariableName())==alreadyAssignedIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": duplicate assignment to variable '"<<assignment.getVariableName()<<"'.");
STORM_LOG_THROW(manager->getVariable(assignment.getVariableName()).getType()==assignment.getExpression().getType(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": illegally assigning a value of type '"<<assignment.getExpression().getType()<<"' to variable '"<<assignment.getVariableName()<<"' of type '"<<manager->getVariable(assignment.getVariableName()).getType()<<"'.");
STORM_LOG_THROW(alreadyAssignedVariables.find(assignedVariable)==alreadyAssignedVariables.end(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": duplicate assignment to variable '"<<assignment.getVariableName()<<"'.");
STORM_LOG_THROW(assignedVariable.getType()==assignment.getExpression().getType(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": illegally assigning a value of type '"<<assignment.getExpression().getType()<<"' to variable '"<<assignment.getVariableName()<<"' of type '"<<assignedVariable.getType()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": likelihood expression refers to unknown identifiers.");
// Add the current variable to the set of assigned variables (of this update).
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
STORM_LOG_THROW(stateReward.getStatePredicateExpression().hasBooleanReturnType(),storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state predicate must evaluate to type 'bool'.");
STORM_LOG_THROW(stateReward.getStatePredicateExpression().hasBooleanType(),storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state predicate must evaluate to type 'bool'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward value expression refers to unknown identifiers.");
STORM_LOG_THROW(stateReward.getRewardValueExpression().hasNumericalReturnType(),storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": reward value expression must evaluate to numerical type.");
STORM_LOG_THROW(stateReward.getRewardValueExpression().hasNumericalType(),storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": reward value expression must evaluate to numerical type.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
STORM_LOG_THROW(transitionReward.getStatePredicateExpression().hasBooleanReturnType(),storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state predicate must evaluate to type 'bool'.");
STORM_LOG_THROW(transitionReward.getStatePredicateExpression().hasBooleanType(),storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state predicate must evaluate to type 'bool'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state reward value expression refers to unknown identifiers.");
STORM_LOG_THROW(transitionReward.getRewardValueExpression().hasNumericalReturnType(),storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": reward value expression must evaluate to numerical type.");
STORM_LOG_THROW(transitionReward.getRewardValueExpression().hasNumericalType(),storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": reward value expression must evaluate to numerical type.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<this->getInitialConstruct().getFilename()<<", line "<<this->getInitialConstruct().getLineNumber()<<": initial expression refers to unknown identifiers.");
// Check the labels.
for(autoconst&label:this->getLabels()){
// Check for duplicate identifiers.
STORM_LOG_THROW(allIdentifiers.find(label.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": duplicate identifier '"<<label.getName()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label expression refers to unknown identifiers.");
STORM_LOG_THROW(label.getStatePredicateExpression().hasBooleanReturnType(),storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label predicate must evaluate to type 'bool'.");
STORM_LOG_THROW(label.getStatePredicateExpression().hasBooleanType(),storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label predicate must evaluate to type 'bool'.");
}
// Check the formulas.
for(autoconst&formula:this->getFormulas()){
// Check for duplicate identifiers.
STORM_LOG_THROW(allIdentifiers.find(formula.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<formula.getFilename()<<", line "<<formula.getLineNumber()<<": duplicate identifier '"<<formula.getName()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<formula.getFilename()<<", line "<<formula.getLineNumber()<<": formula expression refers to unknown identifiers.");