STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable '"<<expression->getVariableName()<<"' with unknown type while trying to create solver variables.");
STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable '"<<expression.getVariableName()<<"' with unknown type while trying to create solver variables.");
}
}
}else{
}else{
STORM_LOG_THROW(stringVariablePair!=variableToDeclarationMap.end(),storm::exceptions::InvalidArgumentException,"Expression refers to unknown variable '"<<expression->getVariableName()<<"'.");
STORM_LOG_THROW(stringVariablePair!=variableToDeclarationMap.end(),storm::exceptions::InvalidArgumentException,"Expression refers to unknown variable '"<<expression.getVariableName()<<"'.");
result=stringVariablePair->second;
result=stringVariablePair->second;
}
}
STORM_LOG_THROW(!MSAT_ERROR_DECL(result),storm::exceptions::ExpressionEvaluationException,"Unable to translate expression to MathSAT format, because a variable could not be translated.");
STORM_LOG_THROW(!MSAT_ERROR_DECL(result),storm::exceptions::ExpressionEvaluationException,"Unable to translate expression to MathSAT format, because a variable could not be translated.");
STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable '"<<expression->getVariableName()<<"' with unknown type while trying to create solver variables.");
STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable '"<<expression.getVariableName()<<"' with unknown type while trying to create solver variables.");
}
}
}else{
}else{
STORM_LOG_THROW(stringVariablePair!=variableToExpressionMap.end(),storm::exceptions::InvalidArgumentException,"Expression refers to unknown variable '"<<expression->getVariableName()<<"'.");
STORM_LOG_THROW(stringVariablePair!=variableToExpressionMap.end(),storm::exceptions::InvalidArgumentException,"Expression refers to unknown variable '"<<expression.getVariableName()<<"'.");
// If the expression is linear, either the left or the right side must not contain variables.
// If the expression is linear, either the left or the right side must not contain variables.
STORM_LOG_THROW(leftResult.first.getNumberOfIdentifiers()==0||rightResult.first.getNumberOfIdentifiers()==0,storm::exceptions::InvalidArgumentException,"Expression is non-linear.");
STORM_LOG_THROW(leftResult.first.getNumberOfIdentifiers()==0||rightResult.first.getNumberOfIdentifiers()==0,storm::exceptions::InvalidArgumentException,"Expression is non-linear.");
// If the expression is linear, either the left or the right side must not contain variables.
// If the expression is linear, either the left or the right side must not contain variables.
STORM_LOG_THROW(leftResult.first.getNumberOfIdentifiers()==0||rightResult.first.getNumberOfIdentifiers()==0,storm::exceptions::InvalidArgumentException,"Expression is non-linear.");
STORM_LOG_THROW(leftResult.first.getNumberOfIdentifiers()==0||rightResult.first.getNumberOfIdentifiers()==0,storm::exceptions::InvalidArgumentException,"Expression is non-linear.");
STORM_LOG_THROW(identifierTypePair!=this->identifierToTypeMap.end(),storm::exceptions::InvalidArgumentException,"No type available for identifier '"<<expression->getVariableName()<<"'.");
STORM_LOG_THROW(identifierTypePair->second==expression->getReturnType(),storm::exceptions::InvalidTypeException,"Type mismatch for variable '"<<expression->getVariableName()<<"': expected '"<<identifierTypePair->first<<"', but found '"<<expression->getReturnType()<<"'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": defining expression refers to unknown identifiers.");
STORM_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.
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": "<<e.what());
}
}
}
// Finally, register the type of the constant for later type checks.
// Finally, register the type of the constant for later type checks.
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 "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
}
// Register the type of the constant for later type checks.
// Register the type of the constant for later type checks.
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()<<": lower bound expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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()<<": upper bound expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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 "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
}
// Register the type of the constant for later type checks.
// Register the type of the constant for later type checks.
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 "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
}
// Register the type of the constant for later type checks.
// Register the type of the constant for later type checks.
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()<<": lower bound expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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()<<": upper bound expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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 "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": initial value expression refers to unknown constants.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": guard refers to unknown identifiers.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": guard refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": "<<e.what());
}
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().hasBooleanReturnType(),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(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": likelihood expression refers to unknown identifiers.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": likelihood expression refers to unknown identifiers.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": likelihood expression refers to unknown identifiers.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": "<<e.what());
}
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().hasBooleanReturnType(),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(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward value expression refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": "<<e.what());
}
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().hasNumericalReturnType(),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(isValid,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": "<<e.what());
}
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().hasBooleanReturnType(),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(isValid,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": state reward value expression refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": "<<e.what());
}
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().hasNumericalReturnType(),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.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<this->getInitialConstruct().getFilename()<<", line "<<this->getInitialConstruct().getLineNumber()<<": initial expression refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<this->getInitialConstruct().getFilename()<<", line "<<this->getInitialConstruct().getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label expression refers to unknown identifiers.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label expression refers to unknown identifiers.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": "<<e.what());
}
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().hasBooleanReturnType(),storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label predicate must evaluate to type 'bool'.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<formula.getFilename()<<", line "<<formula.getLineNumber()<<": formula expression refers to unknown identifiers.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<formula.getFilename()<<", line "<<formula.getLineNumber()<<": formula expression refers to unknown identifiers.");