LOG_THROW(this->identifiers_.find(newConstant)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<newConstant<<"'.");
LOG_THROW(this->identifiers_.find(newConstant)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<newConstant<<"'.");
LOG_THROW(this->identifiers_.find(newConstant)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<newConstant<<"'.");
LOG_THROW(this->identifiers_.find(newConstant)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<newConstant<<"'.");
LOG_THROW(this->identifiers_.find(newConstant)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<newConstant<<"'.");
LOG_THROW(this->identifiers_.find(newConstant)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<newConstant<<"'.");
LOG_THROW(identifierTypePair!=this->identifierToTypeMap.end(),storm::exceptions::InvalidArgumentException,"No type available for identifier '"<<expression->getConstantName()<<"'.");
LOG_THROW(identifierTypePair->second==ExpressionReturnType::Bool,storm::exceptions::InvalidTypeException,"Type mismatch for constant '"<<expression->getConstantName()<<"': expected 'bool', but found '"<<expression->getReturnType()<<"'.");
LOG_THROW(identifierTypePair!=this->identifierToTypeMap.end(),storm::exceptions::InvalidArgumentException,"No type available for identifier '"<<expression->getConstantName()<<"'.");
LOG_THROW(identifierTypePair->second==ExpressionReturnType::Double,storm::exceptions::InvalidTypeException,"Type mismatch for constant '"<<expression->getConstantName()<<"': expected 'double', but found '"<<expression->getReturnType()<<"'.");
LOG_THROW(identifierTypePair!=this->identifierToTypeMap.end(),storm::exceptions::InvalidArgumentException,"No type available for identifier '"<<expression->getConstantName()<<"'.");
LOG_THROW(identifierTypePair->second==ExpressionReturnType::Int,storm::exceptions::InvalidTypeException,"Type mismatch for constant '"<<expression->getConstantName()<<"': expected 'int', but found '"<<expression->getReturnType()<<"'.");
// Check defining expressions of defined constants.
if(constant.isDefined()){
LOG_THROW(constant.getExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": definition of constant "<<constant.getName()<<" must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": defining expression refers to unknown constants.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": defining expression refers to unknown identifiers.");
// Now check that the constants appear with the right types.
try{
@ -373,12 +371,11 @@ namespace storm {
LOG_THROW(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
// Check the initial value of the variable.
LOG_THROW(variable.getInitialValueExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
}
@ -396,9 +393,8 @@ namespace storm {
LOG_THROW(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
// Check that bound expressions of the range.
LOG_THROW(variable.getLowerBoundExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": lower bound expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": lower bound expression refers to unknown constants.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
}
LOG_THROW(variable.getUpperBoundExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": upper bound expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": upper bound expression refers to unknown constants.");
LOG_THROW(variable.getInitialValueExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
LOG_THROW(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
// Check the initial value of the variable.
LOG_THROW(variable.getInitialValueExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
LOG_THROW(variable.getLowerBoundExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": lower bound expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": lower bound expression refers to unknown constants.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
}
LOG_THROW(variable.getUpperBoundExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": upper bound expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": upper bound expression refers to unknown constants.");
LOG_THROW(variable.getInitialValueExpression().getVariables().empty(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression must not refer to variables.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": guard refers to unknown identifiers.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": likelihood expression refers to unknown identifiers.");
LOG_THROW(variableTypePair->second==assignment.getExpression().getReturnType(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": illegally assigning a value of type '"<<assignment.getExpression().getReturnType()<<"' to variable '"<<variableTypePair->first<<"' of type '"<<variableTypePair->second<<"'.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": likelihood expression refers to unknown identifiers.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
try{
@ -585,7 +575,7 @@ namespace storm {
}
LOG_THROW(stateReward.getStatePredicateExpression().hasBooleanReturnType(),storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state predicate must evaluate to type 'bool'.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward value expression refers to unknown identifiers.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
try{
@ -607,7 +597,7 @@ namespace storm {
}
LOG_THROW(transitionReward.getStatePredicateExpression().hasBooleanReturnType(),storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state predicate must evaluate to type 'bool'.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state reward value expression refers to unknown identifiers.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<this->getInitialConstruct().getFilename()<<", line "<<this->getInitialConstruct().getLineNumber()<<": initial expression refers to unknown identifiers.");
try{
@ -634,7 +624,7 @@ namespace storm {
// Check for duplicate identifiers.
LOG_THROW(allIdentifiers.find(label.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": duplicate identifier '"<<label.getName()<<"'.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label expression refers to unknown identifiers.");
try{
@ -651,7 +641,7 @@ namespace storm {
// Check for duplicate identifiers.
LOG_THROW(allIdentifiers.find(formula.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<formula.getFilename()<<", line "<<formula.getLineNumber()<<": duplicate identifier '"<<formula.getName()<<"'.");
LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<formula.getFilename()<<", line "<<formula.getLineNumber()<<": formula expression refers to unknown identifiers.");