message(WARNING"Storm - Git version information not available, statically assuming version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}.")
@ -419,15 +433,6 @@ if (NOT "${STORM_GIT_VERSION_STRING}" STREQUAL "")
endif()
endif()
#nowcheckwhetherthegitversionlookupfailed
set(STORM_VERSION_SOURCE"VersionSource::Git")
if(STORM_GIT_VERSION_STRINGMATCHES"NOTFOUND")
set(STORM_VERSION_SOURCE"VersionSource::Static")
set(STORM_VERSION_COMMITS_AHEAD"boost::none")
include(version.cmake)
message(WARNING"Storm - git version information not available, statically assuming version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}.")
message(STATUS"Storm - version is ${STORM_VERSION_STRING} (version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}${STORM_VERSION_LABEL_STRING} + ${STORM_VERSION_COMMITS_AHEAD} commits), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY}).")
message(STATUS"Storm - Version is ${STORM_VERSION_STRING} (version ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}${STORM_VERSION_LABEL_STRING} + ${STORM_VERSION_COMMITS_AHEAD} commits), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY}).")
The following steps should be performed before releasing a new storm version.
Note that in most case a simultaneous release of [carl](https://github.com/smtrat/carl), [storm](https://github.com/moves-rwth/storm), [pycarl](https://github.com/moves-rwth/pycarl/) and [stormpy](https://github.com/moves-rwth/stormpy/) is preferred.
Note that in most cases a simultaneous release of [carl](https://github.com/smtrat/carl), [storm](https://github.com/moves-rwth/storm), [pycarl](https://github.com/moves-rwth/pycarl/) and [stormpy](https://github.com/moves-rwth/stormpy/) is preferred.
1. Update `CHANGELOG.md`
To get all the commits from an author since the last tag execute:
STORM_LOG_THROW(propertyIt!=janiPropertyInput.end(),storm::exceptions::InvalidArgumentException,"No JANI property with name '"<<propName<<"' is known.");
STORM_LOG_THROW(result,storm::exceptions::NotSupportedException,"The translation to a sparse model is not supported for the given model type.");
}
return*result;
@ -419,6 +422,9 @@ namespace storm {
STORM_LOG_THROW(model->isSparseModel(),storm::exceptions::NotSupportedException,"Counterexample generation is currently only supported for sparse models.");
STORM_LOG_THROW(sparseModel->isOfType(storm::models::ModelType::Dtmc)||sparseModel->isOfType(storm::models::ModelType::Mdp),storm::exceptions::NotSupportedException,"Counterexample is currently only supported for discrete-time models.");
STORM_LOG_THROW(false,storm::exceptions::InvalidSettingsException,"There is either no outputformat specified or the provided combination of input and output format is not compatible.");
}
}
voidprocessOptions(){
// Start by setting some urgent options (log levels, etc.)
this->addOption(storm::settings::OptionBuilder(moduleName,helpOptionName,false,"Shows all available options, arguments and descriptions.").setShortName(helpOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("hint","A regular expression to show help for all matching entities or 'all' for the complete help.").setDefaultValueString("all").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,versionOptionName,false,"Prints the version information.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,verboseOptionName,false,"Enables more verbose output.").setShortName(verboseOptionShortName).build());
this->addOption(storm::settings::OptionBuilder(moduleName,debugOptionName,false,"Enables verbose and debug output.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,traceOptionName,false,"Enables verbose and debug and trace output.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,configOptionName,false,"If given, this file will be read and parsed for additional configuration settings.").setShortName(configOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the configuration.").addValidatorString(ArgumentValidatorFactory::createExistingFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,propertyOptionName,false,"Specifies the properties to be checked on the model.").setShortName(propertyOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("property or filename","The formula or the file containing the formulas.").build())
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filter","The names of the properties to check.").setDefaultValueString("all").build())
.build());
this->addOption(storm::settings::OptionBuilder(moduleName,constantsOptionName,false,"Specifies the constant replacements to use in symbolic models. Note that this requires the model to be given as an symbolic model (i.e., via --"+prismInputOptionName+").").setShortName(constantsOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("values","A comma separated list of constants and their value, e.g. a=1,b=2,c=3.").setDefaultValueString("").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,prismInputOptionName,false,"Parses the model given in the PRISM format.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the PRISM input.").addValidatorString(ArgumentValidatorFactory::createExistingFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,prismCompatibilityOptionName,false,"Enables PRISM compatibility. This may be necessary to process some PRISM models.").setShortName(prismCompatibilityOptionShortName).build());
this->addOption(storm::settings::OptionBuilder(moduleName,stdoutOptionName,false,"If set, the output will be printed to stdout.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,janiOutputOptionName,false,"converts the input model to Jani.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","the name of the output file (if not empty).").setDefaultValueString("").build()).build());
STORM_LOG_THROW(isJaniOutputFilenameSet(),storm::exceptions::InvalidOperationException,"Tried to get the jani output name although none was specified.");
STORM_LOG_THROW(!isJaniOutputFilenameSet()||ArgumentValidatorFactory::createWritableFileValidator()->isValid(getJaniOutputFilename()),storm::exceptions::InvalidSettingsException,"Unable to write at file "+getJaniOutputFilename());
this->addOption(storm::settings::OptionBuilder(moduleName,locationVariablesOptionName,true,"Variables to export in the location").addArgument(storm::settings::ArgumentBuilder::createStringArgument("variables","A comma separated list of automaton and local variable names seperated by a dot, e.g. A.x,B.y.").setDefaultValueString("").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,standardCompliantOptionName,false,"Export in standard compliant variant.").setShortName(standardCompliantOptionShortName).build());
this->addOption(storm::settings::OptionBuilder(moduleName,exportFlattenOptionName,false,"Flattens the composition of Automata to obtain an equivalent model that contains exactly one automaton").build());
this->addOption(storm::settings::OptionBuilder(moduleName,globalVariablesOptionName,false,"If set, variables will preferably be made global, e.g., to guarantee the same variable order as in the input file.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,compactJsonOptionName,false,"If set, the size of the resulting jani file will be reduced at the cost of (human-)readability.").build());
STORM_LOG_THROW(keyvaluepair.size()==2,storm::exceptions::IllegalArgumentException,"Expected a name of the form AUTOMATON.VARIABLE (with no further dots) but got "<<pair);
STORM_LOG_THROW(!symbolicModel.isJaniModel()||!symbolicModel.asJaniModel().usesAssignmentLevels(),storm::exceptions::NotSupportedException,"Counterexample generation with backward implications is not supported for indexed assignments");
STORM_LOG_ERROR_COND(backwardImplicationAdded,"Error in adding cuts for counterexample generation (backward implication misses a label set).");
}else{
STORM_LOG_DEBUG("Selection is enabled in initial state.");
}
}
}elseif(symbolicModel.isJaniModel()){
STORM_LOG_WARN("Model uses assignment levels, did not assert backward implications.");
@ -717,6 +742,8 @@ namespace storm {
}
}
if(addBackwardImplications){
STORM_LOG_DEBUG("Asserting taken labels are followed and preceeded by another label if they are not a target label or an initial label, respectively.");
STORM_LOG_THROW(rewardName!=boost::none,storm::exceptions::NotSupportedException,"Reward property counterexample generation is currently only supported for DTMCs.");
STORM_LOG_THROW(propertyThreshold.size()>0,storm::exceptions::InvalidArgumentException,"At least one threshold has to be specified.");
STORM_LOG_THROW(propertyThreshold.size()==1||(rewardName&&rewardName.get().size()==propertyThreshold.size()),storm::exceptions::InvalidArgumentException,"Multiple thresholds is only supported for multiple reward structures");
STORM_LOG_THROW((strictBound&&maximalReachabilityProbability[i]>=propertyThreshold[i])||(!strictBound&&maximalReachabilityProbability[i]>propertyThreshold[i]),storm::exceptions::InvalidArgumentException,"Given probability threshold "<<propertyThreshold[i]<<" can not be "<<(strictBound?"achieved":"exceeded")<<" in model with maximal reachability probability of "<<maximalReachabilityProbability[i]<<".");
std::cout<<std::endl<<"Maximal property value in model is "<<maximalReachabilityProbability[i]<<"."<<std::endl<<std::endl;
}
STORM_LOG_THROW((strictBound&&maximalReachabilityProbability>=probabilityThreshold)||(!strictBound&&maximalReachabilityProbability>probabilityThreshold),storm::exceptions::InvalidArgumentException,"Given probability threshold "<<probabilityThreshold<<" can not be "<<(strictBound?"achieved":"exceeded")<<" in model with maximal reachability probability of "<<maximalReachabilityProbability<<".");
std::cout<<std::endl<<"Maximal reachability in model is "<<maximalReachabilityProbability<<"."<<std::endl<<std::endl;
STORM_LOG_DEBUG("Computed minimal command set of size "<<(commandSet.size()+relevancyInformation.knownLabels.size())<<".");
if(smallest==boost::none){
STORM_LOG_DEBUG("No further counterexamples.");
break;
}else{
commandSet=smallest.get();
}
STORM_LOG_DEBUG("Computed minimal command with bound "<<currentBound<<" and set of size "<<commandSet.size()+relevancyInformation.knownLabels.size()<<" ("<<commandSet.size()<<" + "<<relevancyInformation.knownLabels.size()<<") ");
std::cout<<"Improved lower bound to "<<commandSet.size()<<" after "<<milliseconds<<"ms."<<std::endl;
std::cout<<"Improved lower bound to "<<currentBound<<" after "<<milliseconds<<"ms."<<std::endl;
lastSize=commandSet.size();
}else{
std::cout<<"Lower bound on label set size is "<<commandSet.size()<<" after "<<milliseconds<<"ms (checked "<<iterations<<" models, "<<zeroProbabilityCount<<" could not reach the target set)."<<std::endl;
std::cout<<"Lower bound on label set size is "<<currentBound<<" after "<<milliseconds<<"ms (checked "<<iterations<<" models, "<<zeroProbabilityCount<<" could not reach the target set)."<<std::endl;
std::cout<<" * all labels: "<<allLabels.size()<<std::endl;
std::cout<<" * known labels: "<<relevancyInformation.knownLabels.size()<<std::endl;
@ -1843,7 +1887,7 @@ namespace storm {
std::cout<<" * number of models that could not reach a target state: "<<zeroProbabilityCount<<" ("<<100*static_cast<double>(zeroProbabilityCount)/iterations<<"%)"<<std::endl<<std::endl;
}
returncommandSet;
returnresult;
#else
throwstorm::exceptions::NotImplementedException()<<"This functionality is unavailable since storm has been compiled without support for Z3.";
STORM_LOG_THROW(model.isOfType(storm::models::ModelType::Dtmc)||model.isOfType(storm::models::ModelType::Mdp),storm::exceptions::NotSupportedException,"MaxSAT-based counterexample generation is supported only for discrete-time models.");
if(!options.silent){
std::cout<<std::endl<<"Generating minimal label counterexample for formula "<<*formula<<std::endl;
STORM_LOG_THROW(formula->isProbabilityOperatorFormula(),storm::exceptions::InvalidPropertyException,"Counterexample generation does not support this kind of formula. Expecting a probability operator as the outermost formula element.");
CexInputresult;
STORM_LOG_THROW(formula->isProbabilityOperatorFormula()||formula->isRewardOperatorFormula(),storm::exceptions::InvalidPropertyException,"Counterexample generation does not support this kind of formula. Expecting a probability operator as the outermost formula element.");
STORM_LOG_THROW(probabilityOperator.hasBound(),storm::exceptions::InvalidPropertyException,"Counterexample generation only supports bounded formulas.");
STORM_LOG_THROW(probabilityOperator.getSubformula().isUntilFormula()||probabilityOperator.getSubformula().isEventuallyFormula(),storm::exceptions::InvalidPropertyException,"Path formula is required to be of the form 'phi U psi' for counterexample generation.");
STORM_LOG_THROW(rewardOperator.hasBound(),storm::exceptions::InvalidPropertyException,"Counterexample generation only supports bounded formulas.");
STORM_LOG_THROW(rewardOperator.getSubformula().isEventuallyFormula(),storm::exceptions::InvalidPropertyException,"Path formula is required to be of the form 'F phi' for counterexample generation.");
STORM_LOG_THROW(!storm::logic::isLowerBound(result.comparisonType),storm::exceptions::NotSupportedException,"Lower bounds in counterexamples are only supported for probability formulas.");
STORM_LOG_THROW(model.hasRewardModel(result.rewardName.get().front()),storm::exceptions::InvalidPropertyException,"Property refers to reward "<<result.rewardName.get().front()<<" but model does not contain such a reward model.");
STORM_LOG_THROW(model.getRewardModel(result.rewardName.get().front()).hasOnlyStateRewards(),storm::exceptions::NotSupportedException,"We only support state-based rewards at the moment.");
STORM_LOG_THROW(!storm::logic::isLowerBound(comparisonType),storm::exceptions::NotSupportedException,"Lower bounds in counterexamples are only supported for eventually formulas.");
STORM_LOG_THROW(!storm::logic::isLowerBound(result.comparisonType),storm::exceptions::NotSupportedException,"Lower bounds in counterexamples are only supported for eventually formulas.");
STORM_LOG_THROW(model.isOfType(storm::models::ModelType::Dtmc)||model.isOfType(storm::models::ModelType::Mdp),storm::exceptions::NotSupportedException,"MaxSAT-based counterexample generation is supported only for discrete-time models.");
std::cout<<std::endl<<"Computed minimal label set of size "<<labelSet.size()<<" in "<<std::chrono::duration_cast<std::chrono::milliseconds>(endTime-startTime).count()<<"ms."<<std::endl;
for(autoconst&labelSet:labelSets){
std::cout<<std::endl<<"Computed minimal label set of size "<<labelSet.size();
}
std::cout<<std::endl<<" in "<<std::chrono::duration_cast<std::chrono::milliseconds>(endTime-startTime).count()<<"ms."<<std::endl;
// Ensure that the model was given either symbolically or explicitly.
STORM_LOG_THROW(!isMinimalCommandSetGenerationSet()||storm::settings::getModule<storm::settings::modules::IOSettings>().isPrismInputSet(),storm::exceptions::InvalidSettingsException,"For the generation of a minimal command set, the model has to be specified in the PRISM format.");
STORM_LOG_THROW(!isMinimalCommandSetGenerationSet()||storm::settings::getModule<storm::settings::modules::IOSettings>().isPrismInputSet()||storm::settings::getModule<storm::settings::modules::IOSettings>().isJaniInputSet(),storm::exceptions::InvalidSettingsException,"For the generation of a minimal command set, the model has to be specified in the PRISM/JANI format.");
if(isMinimalCommandSetGenerationSet()){
STORM_LOG_WARN_COND(isUseMaxSatBasedMinimalCommandSetGenerationSet()||!isEncodeReachabilitySet(),"Encoding reachability is only available for the MaxSat-based minimal command set generation, so selecting it has no effect.");
STORM_LOG_THROW(parameters.empty()||(std::is_same<ValueType,storm::RationalFunction>::value),storm::exceptions::NotSupportedException,"Parameters only allowed when using rational functions.");
STORM_LOG_THROW((std::is_same<ValueType,storm::RationalFunction>::value),storm::exceptions::NotSupportedException,"Parameters only allowed when using rational functions.");
STORM_LOG_THROW(trans.hasKServerSemantics()||!trans.getInputPlaces().empty(),storm::exceptions::InvalidModelException,"Unclear semantics: Found a transition with infinite-server semantics and without input place.");
standardProperties.emplace_back("MaxPrReachDeadlockTB",maxReachDeadlockTimeBounded,"The maximal probability to reach a deadlock within 'TIME_BOUND' steps.");
STORM_LOG_THROW(!manager->hasVariable(identifier),storm::exceptions::NotSupportedException,"Multiple definitions of constant '"<<identifier<<"' were found.");
this->addOption(storm::settings::OptionBuilder(moduleName,writeToPnmlOptionName,false,"Destination for the pnml output").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","path to file").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,writeToPnproOptionName,false,"Destination for the pnpro output").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","path to file").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,writeToJsonOptionName,false,"Destination for the json output").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","path to file").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,writeToJaniOptionName,false,"Destination for the jani output").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","path to file").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,addJaniPropertiesOptionName,false,"If set, a set of standard properties is added to the exported jani model.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,writeStatsOptionName,false,"Destination for the stats file").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","path to file").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,displayStatsOptionName,false,"Print stats to stdout").build());
this->addOption(storm::settings::OptionBuilder(moduleName,gspnFileOptionName,false,"Parses the GSPN.").setShortName(gspnFileOptionShortName).addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","path to file").addValidatorString(ArgumentValidatorFactory::createExistingFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,gspnToJaniOptionName,false,"Transform to JANI.").setShortName(gspnToJaniOptionShortName).build());
this->addOption(storm::settings::OptionBuilder(moduleName,capacitiesFileOptionName,false,"Capacaties as invariants for places.").setShortName(capacitiesFileOptionShortName).addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","path to file").addValidatorString(ArgumentValidatorFactory::createExistingFileValidator()).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,capacityOptionName,false,"Global capacity as invariants for all places.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("value","capacity").addValidatorUnsignedInteger(ArgumentValidatorFactory::createUnsignedGreaterValidator(0)).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,constantsOptionName,false,"Specifies the constant replacements to use.").setShortName(constantsOptionShortName).addArgument(storm::settings::ArgumentBuilder::createStringArgument("values","A comma separated list of constants and their value, e.g. a=1,b=2,c=3.").setDefaultValueString("").build()).build());
STORM_LOG_THROW(encounteredParameters==modelParameters,storm::exceptions::WrongFormatException,"Variables for all parameters are required when providing samples.");
STORM_LOG_THROW(this->currentCheckTask,storm::exceptions::InvalidStateException,"Checking has been invoked but no property has been specified before.");
STORM_LOG_THROW(this->currentCheckTask,storm::exceptions::InvalidStateException,"Checking has been invoked but no property has been specified before.");
STORM_LOG_ASSERT(instantiatedModel.getTransitionMatrix().isProbabilistic(),"Instantiated matrix is not probabilistic!");
STORM_LOG_THROW(instantiatedModel.getTransitionMatrix().isProbabilistic(),storm::exceptions::InvalidArgumentException,"Instantiation point is invalid as the transition matrix becomes non-stochastic.");
STORM_LOG_THROW(this->currentCheckTask,storm::exceptions::InvalidStateException,"Checking has been invoked but no property has been specified before.");
STORM_LOG_ASSERT(instantiatedModel.getTransitionMatrix().isProbabilistic(),"Instantiated matrix is not probabilistic!");
STORM_LOG_THROW(instantiatedModel.getTransitionMatrix().isProbabilistic(),storm::exceptions::InvalidArgumentException,"Instantiation point is invalid as the transition matrix becomes non-stochastic.");
this->addOption(storm::settings::OptionBuilder(moduleName,exportResultOptionName,false,"A path to a file where the parametric result should be saved.")
@ -25,6 +28,10 @@ namespace storm {
this->addOption(storm::settings::OptionBuilder(moduleName,derivativesOptionName,false,"Sets whether to generate the derivatives of the resulting rational function.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,transformContinuousOptionName,false,"Sets whether to transform a continuous time input model to a discrete time model.").setShortName(transformContinuousShortOptionName).build());
this->addOption(storm::settings::OptionBuilder(moduleName,onlyWellformednessConstraintsOptionName,false,"Sets whether you only want to obtain the wellformedness constraints").build());
this->addOption(storm::settings::OptionBuilder(moduleName,samplesOptionName,false,"The points at which to sample the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("samples","The samples are semicolon-separated entries of the form 'Var1=Val1:Val2:...:Valk,Var2=... that span the sample spaces.").setDefaultValueString("").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,samplesGraphPreservingOptionName,false,"Sets whether it can be assumed that the samples are graph-preserving.").build());
this->addOption(storm::settings::OptionBuilder(moduleName,sampleExactOptionName,false,"Sets whether to sample using exact arithmetic.").build());