Modified pctl/csl/ltl options to now take formulas instead of files. Prefixed the macros with STORM_. Moved these macros into a file in the utilities. Modified architecture of the exception classes slightly. Threw away all the contents of main(). This will now be build from scratch.
LOG_THROW(boundsPair->second.first<=newValue&&newValue<=boundsPair->second.second,storm::exceptions::InvalidArgumentException,"Invalid value "<<newValue<<" for variable '"<<assignment.getVariableName()<<"'.");
STORM_LOG_THROW(boundsPair->second.first<=newValue&&newValue<=boundsPair->second.second,storm::exceptions::InvalidArgumentException,"Invalid value "<<newValue<<" for variable '"<<assignment.getVariableName()<<"'.");
LOG_THROW(std::abs(1-probabilitySum)<storm::settings::generalSettings().getPrecision(),storm::exceptions::WrongFormatException,"Probabilities do not sum to one for command '"<<command<<"'.");
STORM_LOG_THROW(std::abs(1-probabilitySum)<storm::settings::generalSettings().getPrecision(),storm::exceptions::WrongFormatException,"Probabilities do not sum to one for command '"<<command<<"'.");
LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable with ambigious type while trying to autocreate solver variables: "<<e);
STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable with ambigious type while trying to autocreate solver variables: "<<e);
LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable with unknown type while trying to autocreate solver variables: "<<variableAndType.first);
STORM_LOG_THROW(false,storm::exceptions::InvalidTypeException,"Encountered variable with unknown type while trying to autocreate solver variables: "<<variableAndType.first);
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant boolean, but value is undefined.");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant boolean, but value is undefined.");
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant integer and value does not fit into 64-bit integer.");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant integer and value does not fit into 64-bit integer.");
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant real and value does not fit into a fraction with 64-bit integer numerator and denominator.");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant real and value does not fit into a fraction with 64-bit integer numerator and denominator.");
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant integer and value does not fit into 64-bit integer.");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant integer and value does not fit into 64-bit integer.");
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant real and value does not fit into a fraction with 64-bit integer numerator and denominator.");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Expression is constant real and value does not fit into a fraction with 64-bit integer numerator and denominator.");
}
}
caseZ3_OP_UNINTERPRETED:
//stormonlysupportsuninterpretedconstantfunctions
LOG_THROW(expr.is_const(),storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered non constant uninterpreted function.");
STORM_LOG_THROW(expr.is_const(),storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered non constant uninterpreted function.");
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered constant uninterpreted function of unknown sort.");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered constant uninterpreted function of unknown sort.");
}
default:
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered unhandled Z3_decl_kind "<<expr.decl().kind()<<".");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered unhandled Z3_decl_kind "<<expr.decl().kind()<<".");
break;
}
}else{
LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered unknown expression type.");
STORM_LOG_THROW(false,storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered unknown expression type.");
// First, do some sanity checks to establish some required properties.
LOG_THROW(dtmc.getInitialStates().getNumberOfSetBits()==1,storm::exceptions::IllegalArgumentException,"Input model is required to have exactly one initial state.");
STORM_LOG_THROW(dtmc.getInitialStates().getNumberOfSetBits()==1,storm::exceptions::IllegalArgumentException,"Input model is required to have exactly one initial state.");
LOG_THROW(this->identifiers_!=nullptr,storm::exceptions::WrongFormatException,"Unable to substitute identifier expressions without given mapping.");
STORM_LOG_THROW(this->identifiers_!=nullptr,storm::exceptions::WrongFormatException,"Unable to substitute identifier expressions without given mapping.");
LOG_THROW(expression!=nullptr,storm::exceptions::WrongFormatException,"Parsing error in line "<<get_line(qi::_3)<<": Undeclared identifier '"<<identifier<<"'.");
STORM_LOG_THROW(expression!=nullptr,storm::exceptions::WrongFormatException,"Parsing error in line "<<get_line(qi::_3)<<": Undeclared identifier '"<<identifier<<"'.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Parsing error in line "<<get_line(where)<<": "<<" expecting "<<what<<".");
std::stringstreamwhatAsString;
whatAsString<<what;
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Parsing error in line "<<get_line(where)<<": "<<" expecting "<<whatAsString.str()<<".");
LOG_THROW(!globalProgramInformation.hasInitialConstruct,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Program must not define two initial constructs.");
STORM_LOG_THROW(!globalProgramInformation.hasInitialConstruct,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Program must not define two initial constructs.");
LOG_THROW(this->identifiers_.find(newConstant)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<newConstant<<"'.");
STORM_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<<"'.");
STORM_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<<"'.");
STORM_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<<"'.");
STORM_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<<"'.");
STORM_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<<"'.");
STORM_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(formulaName)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<formulaName<<"'.");
STORM_LOG_THROW(this->identifiers_.find(formulaName)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<formulaName<<"'.");
LOG_THROW(this->identifiers_.find(variableName)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<variableName<<"'.");
STORM_LOG_THROW(this->identifiers_.find(variableName)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<variableName<<"'.");
LOG_THROW(this->identifiers_.find(variableName)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<variableName<<"'.");
STORM_LOG_THROW(this->identifiers_.find(variableName)==nullptr,storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Duplicate identifier '"<<variableName<<"'.");
LOG_THROW(moduleIndexPair!=globalProgramInformation.moduleToIndexMap.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": No module named '"<<oldModuleName<<"' to rename.");
STORM_LOG_THROW(moduleIndexPair!=globalProgramInformation.moduleToIndexMap.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": No module named '"<<oldModuleName<<"' to rename.");
LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Boolean variable '"<<variable.getName()<<" was not renamed.");
STORM_LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Boolean variable '"<<variable.getName()<<" was not renamed.");
LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Integer variable '"<<variable.getName()<<" was not renamed.");
STORM_LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Integer variable '"<<variable.getName()<<" was not renamed.");
LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Boolean variable '"<<variable.getName()<<" was not renamed.");
STORM_LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Boolean variable '"<<variable.getName()<<" was not renamed.");
LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Integer variable '"<<variable.getName()<<" was not renamed.");
STORM_LOG_THROW(renamingPair!=renaming.end(),storm::exceptions::WrongFormatException,"Parsing error in "<<this->getFilename()<<", line "<<get_line(qi::_3)<<": Integer variable '"<<variable.getName()<<" was not renamed.");
LOG_THROW(this->getType()==other.getType(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getName()<<" and "<<other.getName()<<", because they have different types.");
LOG_THROW(this->getIsOptional()==other.getIsOptional(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments '"<<this->getName()<<"' and '"<<other.getName()<<"', because one of them is optional and the other one is not.");
LOG_THROW(this->getHasDefaultValue()==other.getHasDefaultValue(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getName()<<" and "<<other.getName()<<", because one of them has a default value and the other one does not.");
STORM_LOG_THROW(this->getType()==other.getType(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getName()<<" and "<<other.getName()<<", because they have different types.");
STORM_LOG_THROW(this->getIsOptional()==other.getIsOptional(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments '"<<this->getName()<<"' and '"<<other.getName()<<"', because one of them is optional and the other one is not.");
STORM_LOG_THROW(this->getHasDefaultValue()==other.getHasDefaultValue(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getName()<<" and "<<other.getName()<<", because one of them has a default value and the other one does not.");
returntrue;
}
@ -106,7 +106,7 @@ namespace storm {
*@returnThevalueoftheargument.
*/
Tconst&getArgumentValue()const{
LOG_THROW(this->getHasBeenSet()||this->getHasDefaultValue(),storm::exceptions::IllegalFunctionCallException,"Unable to retrieve value of argument, because it was neither set nor specifies a default value.");
STORM_LOG_THROW(this->getHasBeenSet()||this->getHasDefaultValue(),storm::exceptions::IllegalFunctionCallException,"Unable to retrieve value of argument, because it was neither set nor specifies a default value.");
if(this->getHasBeenSet()){
returnthis->argumentValue;
}else{
@ -119,9 +119,9 @@ namespace storm {
}
voidsetFromDefaultValue()override{
LOG_THROW(this->hasDefaultValue,storm::exceptions::IllegalFunctionCallException,"Unable to set value from default value, because the argument has none.");
STORM_LOG_THROW(this->hasDefaultValue,storm::exceptions::IllegalFunctionCallException,"Unable to set value from default value, because the argument has none.");
default:LOG_THROW(false,storm::exceptions::IllegalFunctionCallException,"Unable to retrieve argument value as boolean.");break;
default:STORM_LOG_THROW(false,storm::exceptions::IllegalFunctionCallException,"Unable to retrieve argument value as boolean.");break;
}
}
@ -200,7 +200,7 @@ namespace storm {
*@paramnewDefaultThenewdefaultvalueoftheargument.
*/
voidsetDefaultValue(Tconst&newDefault){
LOG_THROW(this->validate(newDefault),storm::exceptions::IllegalArgumentValueException,"The default value for the argument did not pass all validation functions.");
STORM_LOG_THROW(this->validate(newDefault),storm::exceptions::IllegalArgumentValueException,"The default value for the argument did not pass all validation functions.");
LOG_THROW(this->hasDefaultValue,storm::exceptions::IllegalFunctionCallException,"Unable to make argument '"<<this->name<<"' optional without default value.");
STORM_LOG_THROW(this->hasDefaultValue,storm::exceptions::IllegalFunctionCallException,"Unable to make argument '"<<this->name<<"' optional without default value.");
LOG_THROW(this->type==ArgumentType::funcName,storm::exceptions::IllegalFunctionCallException,"Illegal validation function for argument, because it takes arguments of different type.");\
STORM_LOG_THROW(this->type==ArgumentType::funcName,storm::exceptions::IllegalFunctionCallException,"Illegal validation function for argument, because it takes arguments of different type.");\
LOG_THROW(this->type==ArgumentType::funcName,storm::exceptions::IllegalFunctionCallException,"Illegal default value for argument"<<this->name<<", because it is of different type.");\
STORM_LOG_THROW(this->type==ArgumentType::funcName,storm::exceptions::IllegalFunctionCallException,"Illegal default value for argument"<<this->name<<", because it is of different type.");\
LOG_THROW(!this->hasBeenBuilt,storm::exceptions::IllegalFunctionCallException,"Cannot rebuild argument with builder that was already used to build an argument.");
STORM_LOG_THROW(!this->hasBeenBuilt,storm::exceptions::IllegalFunctionCallException,"Cannot rebuild argument with builder that was already used to build an argument.");
LOG_THROW(argumentType==ArgumentType::Integer,storm::exceptions::InternalTypeErrorException,"Unable to infer integer from non-integer argument.");
STORM_LOG_THROW(argumentType==ArgumentType::Integer,storm::exceptions::InternalTypeErrorException,"Unable to infer integer from non-integer argument.");
LOG_THROW(argumentType==ArgumentType::UnsignedInteger,storm::exceptions::InternalTypeErrorException,"Unable to infer integer from non-integer argument.");
STORM_LOG_THROW(argumentType==ArgumentType::UnsignedInteger,storm::exceptions::InternalTypeErrorException,"Unable to infer integer from non-integer argument.");
LOG_THROW(argumentType==ArgumentType::Boolean,storm::exceptions::InternalTypeErrorException,"Unable to infer boolean from non-boolean argument.");
STORM_LOG_THROW(argumentType==ArgumentType::Boolean,storm::exceptions::InternalTypeErrorException,"Unable to infer boolean from non-boolean argument.");
LOG_THROW(isFileGood,storm::exceptions::IllegalArgumentValueException,"The file "<<fileName<<" does not exist or is not readable.");
STORM_LOG_THROW(isFileGood,storm::exceptions::IllegalArgumentValueException,"The file "<<fileName<<" does not exist or is not readable.");
returnisFileGood;
};
}
@ -115,7 +115,7 @@ namespace storm {
}
}
LOG_THROW(false,storm::exceptions::IllegalArgumentValueException,"Value '"<<inputString<<"' does not match any entry in the list of valid items.");
STORM_LOG_THROW(false,storm::exceptions::IllegalArgumentValueException,"Value '"<<inputString<<"' does not match any entry in the list of valid items.");
LOG_THROW(this->getArgumentCount()==other.getArgumentCount(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their argument count differs.");
STORM_LOG_THROW(this->getArgumentCount()==other.getArgumentCount(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their argument count differs.");
LOG_THROW(firstArgument.getType()==secondArgument.getType(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their arguments are incompatible.");
STORM_LOG_THROW(firstArgument.getType()==secondArgument.getType(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their arguments are incompatible.");
LOG_THROW(argumentIterator!=this->argumentNameMap.end(),storm::exceptions::IllegalArgumentException,"Unable to retrieve argument with unknown name '"<<argumentName<<"'.");
STORM_LOG_THROW(argumentIterator!=this->argumentNameMap.end(),storm::exceptions::IllegalArgumentException,"Unable to retrieve argument with unknown name '"<<argumentName<<"'.");
LOG_THROW(!this->isBuild,storm::exceptions::IllegalFunctionCallException,"Cannot add an argument to an option builder that was already used to build the option.");
LOG_THROW(this->arguments.empty()||!argument->getIsOptional()||this->arguments.back()->getIsOptional(),storm::exceptions::IllegalArgumentException,"Unable to add non-optional argument after an option that is optional.");
STORM_LOG_THROW(!this->isBuild,storm::exceptions::IllegalFunctionCallException,"Cannot add an argument to an option builder that was already used to build the option.");
STORM_LOG_THROW(this->arguments.empty()||!argument->getIsOptional()||this->arguments.back()->getIsOptional(),storm::exceptions::IllegalArgumentException,"Unable to add non-optional argument after an option that is optional.");
LOG_THROW(argumentNameSet.find(lowerArgumentName)==argumentNameSet.end(),storm::exceptions::IllegalArgumentException,"Unable to add argument to option, because it already has an argument with the same name.");
STORM_LOG_THROW(argumentNameSet.find(lowerArgumentName)==argumentNameSet.end(),storm::exceptions::IllegalArgumentException,"Unable to add argument to option, because it already has an argument with the same name.");
argumentNameSet.insert(lowerArgumentName);
this->arguments.push_back(argument);
@ -85,7 +85,7 @@ namespace storm {
*@returnTheresultingoption.
*/
std::shared_ptr<Option>build(){
LOG_THROW(!this->isBuild,storm::exceptions::IllegalFunctionCallException,"Cannot rebuild an option with one builder.")
STORM_LOG_THROW(!this->isBuild,storm::exceptions::IllegalFunctionCallException,"Cannot rebuild an option with one builder.")
// Add the current argument to the list of arguments for the currently active options.
argumentCache.push_back(currentArgument);
}else{
LOG_THROW(false,storm::exceptions::OptionParserException,"Found stray argument '"<<currentArgument<<"' that is not preceeded by a matching option.");
STORM_LOG_THROW(false,storm::exceptions::OptionParserException,"Found stray argument '"<<currentArgument<<"' that is not preceeded by a matching option.");
LOG_THROW(moduleIterator!=moduleOptions.end(),storm::exceptions::IllegalFunctionCallException,"Cannot print help for unknown module '"<<moduleName<<"'.");
STORM_LOG_THROW(moduleIterator!=moduleOptions.end(),storm::exceptions::IllegalFunctionCallException,"Cannot print help for unknown module '"<<moduleName<<"'.");
LOG_THROW(moduleIterator!=modules.end(),storm::exceptions::IllegalFunctionCallException,"Unable to retrieve option length of unknown module '"<<moduleName<<"'.");
STORM_LOG_THROW(moduleIterator!=modules.end(),storm::exceptions::IllegalFunctionCallException,"Unable to retrieve option length of unknown module '"<<moduleName<<"'.");
LOG_THROW(moduleIterator==this->modules.end(),storm::exceptions::IllegalFunctionCallException,"Unable to register module '"<<moduleSettings->getModuleName()<<"' because a module with the same name already exists.");
STORM_LOG_THROW(moduleIterator==this->modules.end(),storm::exceptions::IllegalFunctionCallException,"Unable to register module '"<<moduleSettings->getModuleName()<<"' because a module with the same name already exists.");
LOG_THROW(isCompatible,storm::exceptions::IllegalFunctionCallException,"Unable to add option '"<<option->getLongName()<<"', because an option with the same name is incompatible with it.");
STORM_LOG_THROW(isCompatible,storm::exceptions::IllegalFunctionCallException,"Unable to add option '"<<option->getLongName()<<"', because an option with the same name is incompatible with it.");
LOG_THROW(isCompatible,storm::exceptions::IllegalFunctionCallException,"Unable to add option '"<<option->getLongName()<<"', because an option with the same name is incompatible with it.");
STORM_LOG_THROW(isCompatible,storm::exceptions::IllegalFunctionCallException,"Unable to add option '"<<option->getLongName()<<"', because an option with the same name is incompatible with it.");
// Iterate over all options and set the arguments.
for(auto&option:optionIterator->second){
option->setHasOptionBeenSet();
LOG_THROW(argumentCache.size()<=option->getArgumentCount(),storm::exceptions::OptionParserException,"Too many arguments for option '"<<optionName<<"'.");
STORM_LOG_THROW(argumentCache.size()<=option->getArgumentCount(),storm::exceptions::OptionParserException,"Too many arguments for option '"<<optionName<<"'.");
// Now set the provided argument values one by one.
LOG_THROW(false,storm::exceptions::IllegalArgumentValueException,"Illegal value '"<<reorderingTechniqueAsString<<"' set as reordering technique of Cudd.");
STORM_LOG_THROW(false,storm::exceptions::IllegalArgumentValueException,"Illegal value '"<<reorderingTechniqueAsString<<"' set as reordering technique of Cudd.");
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("labeling filename","The name of the file from which to read the state labeling.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,symbolicOptionName,false,"Parses the model given in a symbolic representation.").setShortName(symbolicOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the symbolic model.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,pctlOptionName,false,"Specifies the PCTL formulas that are to be checked on the model.")
this->addOption(storm::settings::OptionBuilder(moduleName,pctlOptionName,false,"Specifies a PCTL formula that is to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("formula","The formula to check.").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,pctlFileOptionName,false,"Specifies the PCTL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the PCTL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,cslOptionName,false,"Specifies the CSL formulas that are to be checked on the model.")
this->addOption(storm::settings::OptionBuilder(moduleName,cslOptionName,false,"Specifies a CSL formula that is to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("formula","The formula to check.").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,cslFileOptionName,false,"Specifies the CSL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the CSL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,ltlOptionName,false,"Specifies the LTL formulas that are to be checked on the model.")
this->addOption(storm::settings::OptionBuilder(moduleName,ltlOptionName,false,"Specifies an LTL formula that is to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("formula","The formula to check.").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,ltlFileOptionName,false,"Specifies the LTL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the LTL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,counterexampleOptionName,false,"Generates a counterexample for the given PRCTL formulas if not satisfied by the model")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file to which the counterexample is to be written.").build()).build());
LOG_THROW(optionIterator==this->optionMap.end(),storm::exceptions::IllegalFunctionCallException,"Unable to register the option '"<<option->getLongName()<<"' in module '"<<this->getModuleName()<<"', because an option with this name already exists.");
STORM_LOG_THROW(optionIterator==this->optionMap.end(),storm::exceptions::IllegalFunctionCallException,"Unable to register the option '"<<option->getLongName()<<"' in module '"<<this->getModuleName()<<"', because an option with this name already exists.");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
STORM_LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
STORM_LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
doublevalue=0;
if(this->modelContainsIntegerVariables){
@ -285,20 +285,20 @@ namespace storm {
}
// Now check the desired precision was actually achieved.
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::glpkSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in glpk solution ("<<value<<").");
STORM_LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::glpkSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in glpk solution ("<<value<<").");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
STORM_LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::glpkSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for binary variable in glpk solution ("<<value<<").");
STORM_LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::glpkSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for binary variable in glpk solution ("<<value<<").");
returnstatic_cast<bool>(value);
}
doubleGlpkLpSolver::getObjectiveValue()const{
if(!this->isOptimal()){
LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get glpk solution from infeasible model.");
LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get glpk solution from unbounded model.");
LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get glpk solution from unoptimized model.");
STORM_LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get glpk solution from infeasible model.");
STORM_LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get glpk solution from unbounded model.");
STORM_LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get glpk solution from unoptimized model.");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi Parameter OutputFlag ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi Parameter OutputFlag ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
// Enable the following line to restrict Gurobi to one thread only.
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi Parameter Threads ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi Parameter Threads ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
// Enable the following line to force Gurobi to be as precise about the binary variables as required by the given precision option.
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi Parameter IntFeasTol ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi Parameter IntFeasTol ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
}
voidGurobiLpSolver::update()const{
interror=GRBupdatemodel(model);
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to update Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to update Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
// Since the model changed, we erase the optimality flag.
LOG_ASSERT(variableType==GRB_CONTINUOUS||variableType==GRB_INTEGER||variableType==GRB_BINARY,"Illegal type '"<<variableType<<"' for Gurobi variable.");
STORM_LOG_ASSERT(variableType==GRB_CONTINUOUS||variableType==GRB_INTEGER||variableType==GRB_BINARY,"Illegal type '"<<variableType<<"' for Gurobi variable.");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi model sense ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi model sense ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
// Then we actually optimize the model.
error=GRBoptimize(model);
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to optimize Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to optimize Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
// By default, Gurobi may tell us only that the model is either infeasible or unbounded. To decide which one
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
// By default, Gurobi may tell us only that the model is either infeasible or unbounded. To decide which one
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi parameter ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to retrieve optimization status of Gurobi model ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
STORM_LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
STORM_LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::gurobiSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::gurobiSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
STORM_LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
if(value>0.5){
LOG_THROW(std::abs(static_cast<int>(value)-1)<=storm::settings::gurobiSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(std::abs(static_cast<int>(value)-1)<=storm::settings::gurobiSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
}else{
LOG_THROW(value<=storm::settings::gurobiSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(value<=storm::settings::gurobiSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
}
returnstatic_cast<bool>(value);
@ -318,14 +318,14 @@ namespace storm {
doubleGurobiLpSolver::getObjectiveValue()const{
if(!this->isOptimal()){
LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from infeasible model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unbounded model ("<<GRBgeterrormsg(env)<<").");
STORM_LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Gurobi solution from unoptimized model ("<<GRBgeterrormsg(env)<<").");
LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
STORM_LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
#endif
}
@ -104,7 +104,7 @@ namespace storm {
}
returnthis->lastResult;
#else
LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
STORM_LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
#endif
}
@ -131,7 +131,7 @@ namespace storm {
}
returnthis->lastResult;
#else
LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
STORM_LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
#endif
}
@ -158,7 +158,7 @@ namespace storm {
}
returnthis->lastResult;
#else
LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
STORM_LOG_THROW(false,storm::exceptions::NotImplementedException,"StoRM is compiled without Z3 support.");
#endif
}
@ -166,11 +166,11 @@ namespace storm {
{
#ifdef STORM_HAVE_Z3
LOG_THROW(this->lastResult==SmtSolver::CheckResult::SAT,storm::exceptions::InvalidStateException,"Requested Model but last check result was not SAT.");
STORM_LOG_THROW(this->lastResult==SmtSolver::CheckResult::SAT,storm::exceptions::InvalidStateException,"Requested Model but last check result was not SAT.");
// In case we did not expect this value, we throw an exception.
if(forceInitialDimensions){
LOG_THROW(!initialRowCountSet||lastRow<initialRowCount,storm::exceptions::OutOfRangeException,"Cannot insert value at illegal row "<<lastRow<<".");
LOG_THROW(!initialColumnCountSet||lastColumn<initialColumnCount,storm::exceptions::OutOfRangeException,"Cannot insert value at illegal column "<<lastColumn<<".");
LOG_THROW(!initialEntryCountSet||currentEntryCount<=initialEntryCount,storm::exceptions::OutOfRangeException,"Too many entries in matrix, expected only "<<initialEntryCount<<".");
STORM_LOG_THROW(!initialRowCountSet||lastRow<initialRowCount,storm::exceptions::OutOfRangeException,"Cannot insert value at illegal row "<<lastRow<<".");
STORM_LOG_THROW(!initialColumnCountSet||lastColumn<initialColumnCount,storm::exceptions::OutOfRangeException,"Cannot insert value at illegal column "<<lastColumn<<".");
STORM_LOG_THROW(!initialEntryCountSet||currentEntryCount<=initialEntryCount,storm::exceptions::OutOfRangeException,"Too many entries in matrix, expected only "<<initialEntryCount<<".");
LOG_THROW(hasCustomRowGrouping,storm::exceptions::InvalidStateException,"Matrix was not created to have a custom row grouping.");
LOG_THROW(rowGroupIndices.empty()||startingRow>=rowGroupIndices.back(),storm::exceptions::InvalidStateException,"Illegal row group with negative size.");
STORM_LOG_THROW(hasCustomRowGrouping,storm::exceptions::InvalidStateException,"Matrix was not created to have a custom row grouping.");
STORM_LOG_THROW(rowGroupIndices.empty()||startingRow>=rowGroupIndices.back(),storm::exceptions::InvalidStateException,"Illegal row group with negative size.");
LOG_THROW(rowCount<=initialRowCount,storm::exceptions::InvalidStateException,"Expected not more than "<<initialRowCount<<" rows, but got "<<rowCount<<".");
STORM_LOG_THROW(rowCount<=initialRowCount,storm::exceptions::InvalidStateException,"Expected not more than "<<initialRowCount<<" rows, but got "<<rowCount<<".");
LOG_THROW(columnCount<=initialColumnCount,storm::exceptions::InvalidStateException,"Expected not more than "<<initialColumnCount<<" columns, but got "<<columnCount<<".");
STORM_LOG_THROW(columnCount<=initialColumnCount,storm::exceptions::InvalidStateException,"Expected not more than "<<initialColumnCount<<" columns, but got "<<columnCount<<".");
LOG_THROW(rowGroupCount<=initialRowGroupCount,storm::exceptions::InvalidStateException,"Expected not more than "<<initialRowGroupCount<<" row groups, but got "<<rowGroupCount<<".");
STORM_LOG_THROW(rowGroupCount<=initialRowGroupCount,storm::exceptions::InvalidStateException,"Expected not more than "<<initialRowGroupCount<<" row groups, but got "<<rowGroupCount<<".");
LOG_THROW(value>=metaVariable.getLow()&&value<=metaVariable.getHigh(),storm::exceptions::InvalidArgumentException,"Illegal value "<<value<<" for meta variable '"<<metaVariableName<<"'.");
STORM_LOG_THROW(value>=metaVariable.getLow()&&value<=metaVariable.getHigh(),storm::exceptions::InvalidArgumentException,"Illegal value "<<value<<" for meta variable '"<<metaVariableName<<"'.");
// Now compute the encoding relative to the low value of the meta variable.
LOG_THROW(nameVariablePair!=metaVariableMap.end(),storm::exceptions::InvalidArgumentException,"Unknown meta variable name '"<<metaVariableName<<"'.");
STORM_LOG_THROW(nameVariablePair!=metaVariableMap.end(),storm::exceptions::InvalidArgumentException,"Unknown meta variable name '"<<metaVariableName<<"'.");
LOG_THROW(this->hasBooleanReturnType(),storm::exceptions::InvalidTypeException,"Condition of if-then-else operator must be of boolean type.");
LOG_THROW(thenExpression.hasBooleanReturnType()&&elseExpression.hasBooleanReturnType()||thenExpression.hasNumericalReturnType()&&elseExpression.hasNumericalReturnType(),storm::exceptions::InvalidTypeException,"'then' and 'else' expression of if-then-else operator must have equal return type.");
STORM_LOG_THROW(this->hasBooleanReturnType(),storm::exceptions::InvalidTypeException,"Condition of if-then-else operator must be of boolean type.");
STORM_LOG_THROW(thenExpression.hasBooleanReturnType()&&elseExpression.hasBooleanReturnType()||thenExpression.hasNumericalReturnType()&&elseExpression.hasNumericalReturnType(),storm::exceptions::InvalidTypeException,"'then' and 'else' expression of if-then-else operator must have equal return type.");
// If the expression is linear, either the left or the right side must not contain variables.
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.
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.");
LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
STORM_LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
STORM_LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
STORM_LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
STORM_LOG_THROW(nameValuePair!=this->identifierToValueMap.end(),storm::exceptions::InvalidAccessException,"Access to unkown identifier '"<<name<<"'.");
LOG_THROW(identifierTypePair!=this->identifierToTypeMap.end(),storm::exceptions::InvalidArgumentException,"No type available for identifier '"<<expression->getVariableName()<<"'.");
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(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()<<"'.");
LOG_ASSERT(valuation!=nullptr,"Evaluating expressions with unknowns without valuation.");
LOG_THROW(this->hasBooleanReturnType(),storm::exceptions::InvalidTypeException,"Cannot evaluate expression as boolean: return type is not a boolean.");
STORM_LOG_ASSERT(valuation!=nullptr,"Evaluating expressions with unknowns without valuation.");
STORM_LOG_THROW(this->hasBooleanReturnType(),storm::exceptions::InvalidTypeException,"Cannot evaluate expression as boolean: return type is not a boolean.");
LOG_ASSERT(valuation!=nullptr,"Evaluating expressions with unknowns without valuation.");
LOG_THROW(this->hasIntegralReturnType(),storm::exceptions::InvalidTypeException,"Cannot evaluate expression as integer: return type is not an integer.");
STORM_LOG_ASSERT(valuation!=nullptr,"Evaluating expressions with unknowns without valuation.");
STORM_LOG_THROW(this->hasIntegralReturnType(),storm::exceptions::InvalidTypeException,"Cannot evaluate expression as integer: return type is not an integer.");
LOG_ASSERT(valuation!=nullptr,"Evaluating expressions with unknowns without valuation.");
LOG_THROW(this->hasNumericalReturnType(),storm::exceptions::InvalidTypeException,"Cannot evaluate expression as double: return type is not a double.");
STORM_LOG_ASSERT(valuation!=nullptr,"Evaluating expressions with unknowns without valuation.");
STORM_LOG_THROW(this->hasNumericalReturnType(),storm::exceptions::InvalidTypeException,"Cannot evaluate expression as double: return type is not a double.");
LOG_THROW(this->isRenamedFromModule(),storm::exceptions::InvalidAccessException,"Unable to retrieve base module of module that was not created by renaming.");
STORM_LOG_THROW(this->isRenamedFromModule(),storm::exceptions::InvalidAccessException,"Unable to retrieve base module of module that was not created by renaming.");
LOG_THROW(this->isRenamedFromModule(),storm::exceptions::InvalidAccessException,"Unable to retrieve renaming of module that was not created by renaming.");
STORM_LOG_THROW(this->isRenamedFromModule(),storm::exceptions::InvalidAccessException,"Unable to retrieve renaming of module that was not created by renaming.");
returnthis->renaming;
}
@ -96,7 +96,7 @@ namespace storm {
returnactionsCommandSetPair->second;
}
LOG_THROW(false,storm::exceptions::OutOfRangeException,"Action name '"<<action<<"' does not exist in module.");
STORM_LOG_THROW(false,storm::exceptions::OutOfRangeException,"Action name '"<<action<<"' does not exist in module.");
LOG_THROW(actionModuleSetPair!=this->actionsToModuleIndexMap.end(),storm::exceptions::OutOfRangeException,"Action name '"<<action<<"' does not exist.");
STORM_LOG_THROW(actionModuleSetPair!=this->actionsToModuleIndexMap.end(),storm::exceptions::OutOfRangeException,"Action name '"<<action<<"' does not exist.");
LOG_THROW(variableNameToModuleIndexPair!=this->variableToModuleIndexMap.end(),storm::exceptions::OutOfRangeException,"Variable '"<<variableName<<"' does not exist.");
STORM_LOG_THROW(variableNameToModuleIndexPair!=this->variableToModuleIndexMap.end(),storm::exceptions::OutOfRangeException,"Variable '"<<variableName<<"' does not exist.");
LOG_THROW(variableExpressionPair->second.getReturnType()==constant.getType(),storm::exceptions::InvalidArgumentException,"Illegal type of expression defining constant '"<<constant.getName()<<"'.");
STORM_LOG_THROW(variableExpressionPair->second.getReturnType()==constant.getType(),storm::exceptions::InvalidArgumentException,"Illegal type of expression defining constant '"<<constant.getName()<<"'.");
LOG_THROW(definedUndefinedConstants.find(constantExpressionPair.first)!=definedUndefinedConstants.end(),storm::exceptions::InvalidArgumentException,"Unable to define non-existant constant.");
STORM_LOG_THROW(definedUndefinedConstants.find(constantExpressionPair.first)!=definedUndefinedConstants.end(),storm::exceptions::InvalidArgumentException,"Unable to define non-existant constant.");
LOG_THROW(constant.isDefined(),storm::exceptions::InvalidArgumentException,"Cannot substitute constants in program that contains undefined constants.");
STORM_LOG_THROW(constant.isDefined(),storm::exceptions::InvalidArgumentException,"Cannot substitute constants in program that contains undefined constants.");
// Put the corresponding expression in the substitution.
LOG_THROW(allIdentifiers.find(constant.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": duplicate identifier '"<<constant.getName()<<"'.");
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.
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.
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<constant.getFilename()<<", line "<<constant.getLineNumber()<<": "<<e.what());
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(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.
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(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.
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(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.
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(allIdentifiers.find(variable.getName())==allIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": duplicate identifier '"<<variable.getName()<<"'.");
// Register the type of the constant for later type checks.
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<variable.getFilename()<<", line "<<variable.getLineNumber()<<": "<<e.what());
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": "<<e.what());
}
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'.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": assignment illegally refers to variable '"<<assignment.getVariableName()<<"'.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": assignment illegally refers to variable '"<<assignment.getVariableName()<<"'.");
}else{
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": assignment refers to unknown variable '"<<assignment.getVariableName()<<"'.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": assignment refers to unknown variable '"<<assignment.getVariableName()<<"'.");
}
}
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(alreadyAssignedIdentifiers.find(assignment.getVariableName())==alreadyAssignedIdentifiers.end(),storm::exceptions::WrongFormatException,"Error in "<<command.getFilename()<<", line "<<command.getLineNumber()<<": duplicate assignment to variable '"<<assignment.getVariableName()<<"'.");
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<<"'.");
STORM_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.");
STORM_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.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": state reward expression refers to unknown identifiers.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": "<<e.what());
}
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'.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<stateReward.getFilename()<<", line "<<stateReward.getLineNumber()<<": "<<e.what());
}
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.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": "<<e.what());
}
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'.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<transitionReward.getFilename()<<", line "<<transitionReward.getLineNumber()<<": "<<e.what());
}
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.");
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.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<this->getInitialConstruct().getFilename()<<", line "<<this->getInitialConstruct().getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<this->getInitialConstruct().getFilename()<<", line "<<this->getInitialConstruct().getLineNumber()<<": "<<e.what());
}
// Check the labels.
for(autoconst&label:this->getLabels()){
// 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()<<"'.");
STORM_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.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": label expression refers to unknown identifiers.");
LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": "<<e.what());
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Error in "<<label.getFilename()<<", line "<<label.getLineNumber()<<": "<<e.what());
}
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'.");
}
// Check the formulas.
for(autoconst&formula:this->getFormulas()){
// 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()<<"'.");
STORM_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.");
STORM_LOG_THROW(isValid,storm::exceptions::WrongFormatException,"Error in "<<formula.getFilename()<<", line "<<formula.getLineNumber()<<": formula expression refers to unknown identifiers.");
LOG_THROW(variableIndexPair!=this->variableToAssignmentIndexMap.end(),storm::exceptions::OutOfRangeException,"Variable '"<<variableName<<"' is not assigned in update.");
STORM_LOG_THROW(variableIndexPair!=this->variableToAssignmentIndexMap.end(),storm::exceptions::OutOfRangeException,"Variable '"<<variableName<<"' is not assigned in update.");
std::cout<<"Parsing the given model took "<<std::chrono::duration_cast<std::chrono::milliseconds>(parsingEnd-executionStart).count()<<" milliseconds."<<std::endl;
std::cout<<"Generating the counterexample took "<<std::chrono::duration_cast<std::chrono::milliseconds>(counterexampleEnd-counterexampleStart).count()<<" milliseconds."<<std::endl;
}else{
// Depending on the model type, the appropriate model checking procedure is chosen.
std::cout<<"Running the ModelChecker took "<<std::chrono::duration_cast<std::chrono::milliseconds>(modelcheckingEnd-modelcheckingStart).count()<<" milliseconds."<<std::endl;
std::cout<<"Parsing and translating the Symbolic Input took "<<std::chrono::duration_cast<std::chrono::milliseconds>(programTranslationEnd-programTranslationStart).count()<<" milliseconds."<<std::endl;
std::cout<<"Running the PRCTL ModelChecker took "<<std::chrono::duration_cast<std::chrono::milliseconds>(modelcheckingEnd-modelcheckingStart).count()<<" milliseconds."<<std::endl;
std::cout<<"Complete execution took "<<std::chrono::duration_cast<std::chrono::milliseconds>(executionEnd-executionStart).count()<<" milliseconds."<<std::endl;
// From this point on we are ready to carry out the actual computations.
storm::utility::cli::processOptions();
// Perform clean-up and terminate.
cleanUp();
printUsage();
LOG4CPLUS_INFO(logger,"StoRM terminating.");
return0;
// } catch (std::exception& e) {
// LOG4CPLUS_FATAL(logger, "An exception was thrown. Terminating.");
// LOG4CPLUS_FATAL(logger, "\t" << e.what());
// }
return1;
// All operations have now been performed, so we clean up everything and terminate.
std::cout<<" build from revision "<<STORM_CPP_VERSION_HASH;
if(STORM_CPP_VERSION_DIRTY==1){
std::cout<<" (DIRTY)";
}
std::cout<<"."<<std::endl;
#ifdef STORM_HAVE_INTELTBB
std::cout<<"Linked with Intel Threading Building Blocks v"<<TBB_VERSION_MAJOR<<"."<<TBB_VERSION_MINOR<<" (Interface version "<<TBB_INTERFACE_VERSION<<")."<<std::endl;
#endif
#ifdef STORM_HAVE_GLPK
std::cout<<"Linked with GNU Linear Programming Kit v"<<GLP_MAJOR_VERSION<<"."<<GLP_MINOR_VERSION<<"."<<std::endl;
#endif
#ifdef STORM_HAVE_GUROBI
std::cout<<"Linked with Gurobi Optimizer v"<<GRB_VERSION_MAJOR<<"."<<GRB_VERSION_MINOR<<"."<<GRB_VERSION_TECHNICAL<<"."<<std::endl;
LOG_THROW(!constant.isDefined(),storm::exceptions::InvalidArgumentException,"Illegally trying to define already defined constant '"<<constantName<<"'.");
LOG_THROW(definedConstants.find(constantName)==definedConstants.end(),storm::exceptions::InvalidArgumentException,"Illegally trying to define constant '"<<constantName<<"' twice.");
STORM_LOG_THROW(!constant.isDefined(),storm::exceptions::InvalidArgumentException,"Illegally trying to define already defined constant '"<<constantName<<"'.");
STORM_LOG_THROW(definedConstants.find(constantName)==definedConstants.end(),storm::exceptions::InvalidArgumentException,"Illegally trying to define constant '"<<constantName<<"' twice.");
std::cout<<" build from revision "<<STORM_CPP_VERSION_HASH;
if(STORM_CPP_VERSION_DIRTY==1){
std::cout<<" (DIRTY)";
}
std::cout<<"."<<std::endl;
#ifdef STORM_HAVE_INTELTBB
std::cout<<"Linked with Intel Threading Building Blocks v"<<TBB_VERSION_MAJOR<<"."<<TBB_VERSION_MINOR<<" (Interface version "<<TBB_INTERFACE_VERSION<<")."<<std::endl;
#endif
#ifdef STORM_HAVE_GLPK
std::cout<<"Linked with GNU Linear Programming Kit v"<<GLP_MAJOR_VERSION<<"."<<GLP_MINOR_VERSION<<"."<<std::endl;
#endif
#ifdef STORM_HAVE_GUROBI
std::cout<<"Linked with Gurobi Optimizer v"<<GRB_VERSION_MAJOR<<"."<<GRB_VERSION_MINOR<<"."<<GRB_VERSION_TECHNICAL<<"."<<std::endl;
xxxxxxxxxx