3#include <boost/algorithm/string/join.hpp>
54 boost::optional<storm::languages::SymbolicModelDescription>
model;
71 boost::optional<std::vector<std::string>> propertyFilter;
76 propertyFilter = boost::none;
79 propertyFilter = std::vector<std::string>();
82 input.
model = std::move(janiInput.first);
84 input.
properties = std::move(janiInput.second);
87 modelParsingWatch.
stop();
88 STORM_PRINT(
"Time for model input parsing: " << modelParsingWatch <<
".\n\n");
93 boost::optional<std::set<std::string>>
const& propertyFilter) {
95 std::vector<storm::jani::Property> newProperties;
113 input.
model = std::move(janiInput.first);
114 input.
properties = std::move(janiInput.second);
115 modelParsingWatch.
stop();
116 STORM_PRINT(
"Time for model input parsing: " << modelParsingWatch <<
".\n\n");
124 input.
model = input.
model.get().preprocess(constantDefinitions);
134 if (ioSettings.isQvbsInputSet()) {
177 STORM_LOG_THROW(input.
model.is_initialized(), storm::exceptions::InvalidArgumentException,
"Automatic engine requires a JANI input model.");
178 STORM_LOG_THROW(input.
model->isJaniModel(), storm::exceptions::InvalidArgumentException,
"Automatic engine requires a JANI input model.");
179 std::vector<storm::jani::Property>
const& properties =
181 STORM_LOG_THROW(!properties.empty(), storm::exceptions::InvalidArgumentException,
"Automatic engine requires a property.");
183 "Automatic engine does not support decisions based on multiple properties. Only the first property will be considered.");
186 if (hints.isNumberStatesSet()) {
187 as.
predict(input.
model->asJaniModel(), properties.front(), hints.getNumberStates());
189 as.
predict(input.
model->asJaniModel(), properties.front());
210 std::shared_ptr<SymbolicInput>
const& transformedJaniInput =
nullptr) {
219 mpi.
engine = coreSettings.getEngine();
225 if (generalSettings.isParametricSet()) {
227 }
else if (generalSettings.isExactSet()) {
237 if (input.
model->isJaniModel()) {
248 janiInput.
model = modelAndProperties.first;
249 if (!modelAndProperties.second.empty()) {
255 if (transformedJaniInput) {
257 *transformedJaniInput = std::move(janiInput);
264 auto checkCompatibleSettings = [&mpi, &input] {
283 STORM_LOG_WARN(
"The settings picked by the automatic engine (engine="
285 <<
") are incompatible with this model. Falling back to default settings.");
304 (!input.
model->isJaniModel());
306 "Dd-based model builder for Markov Automata is only available for JANI models, automatically converting the input model.");
312 if (bisimulationSettings.useExactArithmeticInDdBisimulation()) {
318 STORM_LOG_WARN(
"Requested using exact arithmetic in Dd bisimulation but no dd bisimulation is applied.");
323 mpi.
ddType = coreSettings.getDdLibraryType();
327 STORM_LOG_INFO(
"Switching to DD library sylvan to allow for rational arithmetic.");
334auto castAndApply(std::shared_ptr<storm::models::ModelBase>
const& model,
auto const& callback) {
338 auto castAndApplyImpl = [&model, &callback]<
typename TargetModelType> {
339 auto res = model->template as<TargetModelType>();
341 return callback(res);
345 auto castAndApplyVT = [&]<
typename ValueType> {
346 if (model->isSparseModel()) {
349 auto ddType = model->getDdType();
350 STORM_LOG_ASSERT(model->isSymbolicModel() && ddType.has_value(),
"Unexpected model representation.");
353 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Symbolic interval models are currently not supported.");
363 if (model->supportsParameters()) {
365 }
else if (model->supportsUncertainty()) {
366 if (model->isExact()) {
372 if (model->isExact()) {
373 return castAndApplyVT.template operator()<storm::RationalNumber>();
375 return castAndApplyVT.template operator()<
double>();
383 case FinitePrecision:
384 return callback.template operator()<
double>();
386 return callback.template operator()<storm::RationalNumber>();
390 STORM_LOG_THROW(
false, storm::exceptions::UnexpectedException,
"Unexpected value type.");
396 [&](
auto ddTag) {
return callback.template operator()<
decltype(ddTag)::value, ValueType>(); });
402 for (
auto const& property : properties) {
403 std::set<storm::expressions::Variable> usedUndefinedConstants =
property.getUndefinedConstants();
404 if (!usedUndefinedConstants.empty()) {
405 std::vector<std::string> undefinedConstantsNames;
406 for (
auto const& constant : usedUndefinedConstants) {
407 undefinedConstantsNames.emplace_back(constant.getName());
410 false, storm::exceptions::InvalidArgumentException,
411 "The property '" << property <<
" still refers to the undefined constants " << boost::algorithm::join(undefinedConstantsNames,
",") <<
".");
422 if (ioSettings.isPropertiesAsMultiSet()) {
424 "Can not translate properties to multi-objective formula because no properties were specified.");
431 std::string constantDefinitionString = ioSettings.getConstantDefinitionString();
432 std::map<storm::expressions::Variable, storm::expressions::Expression> constantDefinitions;
434 constantDefinitions = output.
model.get().parseConstantDefinitions(constantDefinitionString);
435 output.
model = output.
model.get().preprocess(constantDefinitions);
441 auto transformedJani = std::make_shared<SymbolicInput>();
445 if (output.
model && output.
model.get().isPrismProgram()) {
447 if (transformedJani->model) {
449 output = std::move(*transformedJani);
454 output.
model = modelAndProperties.first;
456 if (!modelAndProperties.second.empty()) {
463 if (output.
model && output.
model.get().isJaniModel()) {
468 if (buildSettings.isLocationEliminationSet()) {
469 auto locationHeuristic = buildSettings.getLocationEliminationLocationHeuristic();
470 auto edgesHeuristic = buildSettings.getLocationEliminationEdgesHeuristic();
472 locationHeuristic, edgesHeuristic));
476 return {output, mpi};
479inline std::vector<std::shared_ptr<storm::logic::Formula const>>
createFormulasToRespect(std::vector<storm::jani::Property>
const& properties) {
482 for (
auto const& property : properties) {
483 if (!property.getFilter().getStatesFormula()->isInitialFormula()) {
484 result.push_back(property.getFilter().getStatesFormula());
491template<storm::dd::DdType DdType,
typename ValueType>
499 buildSettings.isBuildFullModelSet(), !buildSettings.isApplyNoMaximumProgressAssumptionSet(),
500 !buildSettings.isDontFixDeadlocksSet());
513 if (counterexampleGeneratorSettings.isCounterexampleSet()) {
514 buildChoiceOrigins |= counterexampleGeneratorSettings.isMinimalCommandSetGenerationSet();
519 if (buildSettings.isApplyNoMaximumProgressAssumptionSet()) {
523 if (buildSettings.isExplorationChecksSet()) {
529 if (buildSettings.isBuildFullModelSet()) {
536 if (buildSettings.isAddOverlappingGuardsLabelSet()) {
541 if (ioSettings.isComputeExpectedVisitingTimesSet() || ioSettings.isComputeSteadyStateDistributionSet()) {
553template<
typename ValueType>
558 explorationOptions.
fixDeadlocks = !buildSettings.isDontFixDeadlocksSet();
559 if (buildSettings.isExplorationStateLimitSet()) {
562 return explorationOptions;
565template<
typename ValueType>
569 input.
model->asPrismProgram().hasIntervalUpdates()) {
571 bool constexpr IsDoubleInterval = std::is_same_v<ValueType, storm::IntervalBaseType<storm::Interval>>;
572 bool constexpr IsRationalInterval = std::is_same_v<ValueType, storm::IntervalBaseType<storm::RationalInterval>>;
573 STORM_LOG_THROW(IsDoubleInterval || IsRationalInterval, storm::exceptions::NotSupportedException,
574 "Can not build interval model for the provided value type.");
575 using IntervalType = std::conditional_t<IsDoubleInterval, storm::Interval, storm::RationalInterval>;
582template<
typename ValueType>
585 std::shared_ptr<storm::models::ModelBase> result;
600 if constexpr (std::is_same_v<ValueType, double>) {
602 }
else if constexpr (std::is_same_v<ValueType, storm::RationalNumber>) {
603 valueType = Rational;
605 static_assert(std::is_same_v<ValueType, storm::RationalFunction>,
"Unexpected value type.");
606 valueType = Parametric;
614 if constexpr (std::is_same_v<ValueType, storm::RationalFunction>) {
615 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"RationalFunction currently not supported for UMB models.");
616 }
else if constexpr (std::is_same_v<ValueType, storm::RationalNumber>) {
619 static_assert(std::is_same_v<ValueType, double>,
"Unhandled value type.");
637 std::shared_ptr<storm::models::ModelBase> result;
642 [&input, &mpi]<
storm::dd::DdType DD,
typename VT>() { return buildModelDd<DD, VT>(mpi.env, input); });
645 auto options = createBuildOptionsSparseFromSettings(input);
646 return buildModelSparse<VT>(input, options);
651 "Can only use sparse engine with explicit input.");
653 return buildModelExplicit<VT>(ioSettings, storm::settings::getModule<storm::settings::modules::BuildSettings>());
657 modelBuildingWatch.
stop();
659 STORM_PRINT(
"Time for model construction: " << modelBuildingWatch <<
".\n\n");
665template<
typename ValueType>
671 std::shared_ptr<storm::models::sparse::Model<ValueType>> result = model;
673 STORM_LOG_WARN_COND(!buildSettings.isCheckZenoSet() || !model->containsZenoCycle(),
"MA contains a Zeno cycle. Model checking results cannot be trusted.");
675 if (model->isConvertibleToCtmc()) {
677 result = model->convertToCtmc();
680 if (transformationSettings.isChainEliminationSet()) {
683 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Chain elimination not supported for interval models.");
687 transformationSettings.getLabelBehavior())
695template<
typename ValueType>
710 <<
", tolerance: " << options.
tolerance.value() << (options.
actionSensitive ?
", action-sensitive" :
"") <<
")...");
714template<
typename ValueType>
718 "Converting value types for sparse engine is not supported.");
723 std::pair<std::shared_ptr<storm::models::sparse::Model<ValueType>>,
bool> result = std::make_pair(model,
false);
725 if (
auto order = transformationSettings.getModelPermutation(); order.has_value()) {
726 auto seed = transformationSettings.getModelPermutationSeed();
728 << (seed.has_value() ?
" with seed " + std::to_string(seed.value()) :
"") <<
".\n");
730 result.second =
true;
731 STORM_PRINT_AND_LOG(
"Transition matrix hash after permuting: " << result.first->getTransitionMatrix().hash() <<
".\n");
735 if (transformationSettings.isMergeEquivalentStatesSet()) {
737 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Merging equivalent states not supported for interval models.");
740 if (formulas.size() == 1) {
743 STORM_LOG_INFO(
"Merged equivalent states for the considered property '" << *formulas.front() <<
"'.");
744 result.first = mergedModel;
745 result.second =
true;
747 STORM_LOG_WARN(
"Merging equivalent states is not supported for the considered " << result.first->getType() <<
" model and property '"
748 << *formulas.front() <<
"'.");
751 STORM_LOG_WARN(
"Skipping merging of equivalent states as it requires exactly one input property. " << formulas.size()
752 <<
" properties given instead.");
759 result.second =
true;
764 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Bisimulation not supported for interval models.");
767 result.second =
true;
771 if (transformationSettings.isToDiscreteTimeModelSet()) {
773 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Transformation to discrete time model not supported for interval models.");
777 !model->hasRewardModel(
"_time"),
778 "Scheduled transformation to discrete time model, but a reward model named '_time' is already present in this model. We might take "
779 "the wrong reward model later.");
783 result.second =
true;
787 if (transformationSettings.isToNondeterministicModelSet()) {
789 result.second =
true;
795template<
typename ValueType>
799 if (ioSettings.isExportBuildSet()) {
801 modelExportWatch.
start();
802 STORM_PRINT(
"\nExporting model to '" << ioSettings.getExportBuildFilename() <<
"'.\n");
803 switch (ioSettings.getExportBuildFormat()) {
810 options.
compression = ioSettings.getCompressionMode();
811 if (ioSettings.isExportDigitsSet()) {
815 input.
model ? input.
model.get().getParameterNames() : std::vector<std::string>());
823 options.
compression = ioSettings.getCompressionMode();
829 "Exporting sparse models in " <<
storm::io::toString(ioSettings.getExportBuildFormat()) <<
" format is not supported.");
831 modelExportWatch.
stop();
832 STORM_PRINT(
"Time for model export: " << modelExportWatch <<
".\n\n");
837 if (ioSettings.isExportExplicitSet()) {
839 input.
model ? input.
model.get().getParameterNames() : std::vector<std::string>(),
840 !ioSettings.isExplicitExportPlaceholdersDisabled());
843 STORM_LOG_THROW(!ioSettings.isExportDdSet(), storm::exceptions::NotSupportedException,
"Exporting in drdd format is only supported for DDs.");
845 if (ioSettings.isExportDotSet()) {
850template<storm::dd::DdType DdType,
typename ValueType>
854 if (ioSettings.isExportBuildSet()) {
855 switch (ioSettings.getExportBuildFormat()) {
864 "Exporting symbolic models in " <<
storm::io::toString(ioSettings.getExportBuildFormat()) <<
" format is not supported.");
870 STORM_LOG_THROW(!ioSettings.isExportExplicitSet(), storm::exceptions::NotSupportedException,
871 "Exporting in drn format is only supported for sparse models.");
873 if (ioSettings.isExportDdSet()) {
877 if (ioSettings.isExportDotSet()) {
882template<storm::dd::DdType DdType,
typename ValueType>
883typename std::enable_if<!storm::dd::BackendTraits<DdType>::template supportsValueType<ValueType>, std::shared_ptr<storm::models::Model<ValueType>>>::type
888template<storm::dd::DdType DdType,
typename ValueType>
889typename std::enable_if<storm::dd::BackendTraits<DdType>::template supportsValueType<ValueType>, std::shared_ptr<storm::models::Model<ValueType>>>::type
891 auto ma = model->template as<storm::models::symbolic::MarkovAutomaton<DdType, ValueType>>();
892 if (!ma->isClosed()) {
893 return std::make_shared<storm::models::symbolic::MarkovAutomaton<DdType, ValueType>>(ma->close());
899template<storm::dd::DdType DdType,
typename ValueType,
typename ExportValueType = ValueType>
904 "Weak bisimulation is currently not supported on DDs. Falling back to strong bisimulation.");
909 STORM_LOG_INFO(
"Setting bisimulation quotient format to 'sparse'.");
923 quotientFormat, ddBisimulationOptions);
926template<
typename ExportValueType, storm::dd::DdType DdType,
typename ValueType>
930 std::pair<std::shared_ptr<storm::models::Model<ValueType>>,
bool> intermediateResult = std::make_pair(model,
false);
934 intermediateResult.second =
true;
937 std::unique_ptr<std::pair<std::shared_ptr<storm::models::Model<ExportValueType>>,
bool>> result;
938 auto symbolicModel = intermediateResult.first->template as<storm::models::symbolic::Model<DdType, ValueType>>();
940 std::shared_ptr<storm::models::Model<ExportValueType>> newModel =
942 result = std::make_unique<std::pair<std::shared_ptr<storm::models::Model<ExportValueType>>,
bool>>(newModel,
true);
944 result = std::make_unique<std::pair<std::shared_ptr<storm::models::Model<ExportValueType>>,
bool>>(
945 symbolicModel->template toValueType<ExportValueType>(), !std::is_same<ValueType, ExportValueType>::value);
950 result->second =
true;
952 std::shared_ptr<storm::models::symbolic::Model<DdType, ExportValueType>> symbolicModel =
953 result->first->template as<storm::models::symbolic::Model<DdType, ExportValueType>>();
954 std::vector<std::shared_ptr<storm::logic::Formula const>> formulas;
955 for (
auto const& property : input.
properties) {
956 formulas.emplace_back(property.getRawFormula());
959 STORM_LOG_THROW(result, storm::exceptions::NotSupportedException,
"The translation to a sparse model is not supported for the given model type.");
965template<storm::dd::DdType DdType,
typename ValueType>
970 if constexpr (std::is_same_v<ValueType, VT> || (storm::dd::BackendTraits<DdType>::template supportsValueType<storm::RationalNumber> &&
971 std::is_same_v<ValueType, storm::RationalNumber> && std::is_same_v<VT, double>)) {
972 return preprocessDdModelImpl<VT>(model, input, mpi);
974 STORM_LOG_THROW_UNCONDITIONALLY(storm::exceptions::NotSupportedException,
975 "Unexpected combination of DD library, build value type, and verification value type.");
988 std::shared_ptr<storm::models::ModelBase> model;
989 if (!buildSettings.isNoBuildModelSet()) {
996 model->printModelInformationToStream(std::cout);
1000 preprocessingWatch.
stop();
1001 if (preprocessingResult.second) {
1002 STORM_PRINT(
"\nTime for model preprocessing: " << preprocessingWatch <<
".\n\n");
1003 model = preprocessingResult.first;
1004 model->printModelInformationToStream(std::cout);
SylvanDdManagerEnvironment & sylvan()
uint64_t getNumberOfThreads() const
Retrieves the number of threads used by Sylvan.
BuilderOptions & setBuildAllLabels(bool newValue=true)
Should all reward models be built?
BuilderOptions & setExplorationChecks(bool newValue=true)
Should extra checks be performed during exploration.
void clearTerminalStates()
BuilderOptions & setAddOutOfBoundsState(bool newValue=true)
Should a state for out of bounds be constructed.
BuilderOptions & setReservedBitsForUnboundedVariables(uint64_t value)
Sets the number of bits that will be reserved for unbounded integer variables.
BuilderOptions & setBuildChoiceLabels(bool newValue=true)
Should the choice labels be built?
bool isBuildStateValuationsSet() const
BuilderOptions & setBuildAllRewardModels(bool newValue=true)
Should all reward models be built?
bool isBuildChoiceLabelsSet() const
bool isBuildChoiceOriginsSet() const
BuilderOptions & setBuildChoiceOrigins(bool newValue=true)
Should the origins the different choices be built?
BuilderOptions & setShowProgressDelay(uint64_t newValue)
Sets the delay (in seconds) between progress reports during state space exploration.
BuilderOptions & setBuildStateValuations(bool newValue=true)
Should the state valuation mapping be built?
bool isBuildAllLabelsSet() const
BuilderOptions & setApplyMaximalProgressAssumption(bool newValue=true)
Should the maximal progress assumption be applied when building a Markov Automaton?
BuilderOptions & setStochasticTolerance(double newValue)
Sets the tolerance used for checking whether a distribution sums to one.
BuilderOptions & setBuildObservationValuations(bool newValue=true)
Should a observation valuation mapping be built?
BuilderOptions & setAddOverlappingGuardsLabel(bool newValue=true)
Should a state be labelled for overlapping guards.
bool isBuildObservationValuationsSet() const
BuilderOptions & setShowProgress(bool newValue=true)
Sets whether the progress of state space exploration should be printed.
This class provides easy access to a benchmark of the Quantitative Verification Benchmark Set http://...
std::string const & getJaniFile(uint64_t instanceIndex=0) const
std::string const & getConstantDefinition(uint64_t instanceIndex=0) const
std::string getInfo(uint64_t instanceIndex=0, boost::optional< std::vector< std::string > > propertyFilter=boost::none) const
static Model eliminateAutomatically(const Model &model, std::vector< jani::Property > properties, uint64_t locationHeuristic, uint64_t edgesHeuristic)
std::shared_ptr< storm::logic::Formula const > getRawFormula() const
std::string const & getName() const
Get the provided name.
This class represents a Markov automaton.
Base class for all sparse models.
Base class for all symbolic models.
storm::jani::Model toJani(bool allVariablesGlobal=true, std::string suffix="") const
Converts the PRISM model into an equivalent JANI model.
static storm::Environment buildEnvironment()
This class represents the bisimulation settings.
storm::dd::bisimulation::ReuseMode getReuseMode() const
Retrieves the selected reuse mode.
bool isActionSensitiveSet() const
Retrieves whether action-sensitive bisimulation is to be used, i.e., choices are only lumped together...
storm::dd::bisimulation::QuotientFormat getQuotientFormat() const
Retrieves the format in which the quotient is to be extracted.
storm::dd::bisimulation::SignatureMode getSignatureMode() const
Retrieves the mode to compute signatures.
double getTolerance() const
Retrieves the tolerance to use for bisimulation minimization.
bool isUseOriginalVariablesSet() const
Retrieves whether the extracted quotient model is supposed to use the same variables as the original ...
storm::dd::bisimulation::InitialPartitionMode getInitialPartitionMode() const
Retrieves the initial partition mode.
bool isQuotientFormatSetFromDefaultValue() const
Retrieves whether the format in which the quotient is to be extracted has been set from its default v...
bool isUseRepresentativesSet() const
Retrieves whether representatives for blocks are to be used instead of the block numbers.
storm::dd::bisimulation::RefinementMode getRefinementMode() const
Retrieves the refinement mode to use.
bool isWeakBisimulationSet() const
Retrieves whether weak bisimulation is to be used.
bool isToleranceSet() const
Retrieves whether the tolerance to use for (approximate) bisimulation minimization has been set expli...
bool isBuildStateValuationsSet() const
Retrieves whether the choice labels should be build.
bool isDontFixDeadlocksSet() const
Retrieves whether the dont-fix-deadlocks option was set.
bool isBuildObservationValuationsSet() const
Retrieves whether the observation valuations should be build.
bool isBuildChoiceLabelsSet() const
Retrieves whether the choice labels should be build.
static const std::string moduleName
This class represents the markov chain settings.
bool isJaniPropertiesSet() const
Retrieves whether the jani-property option was set.
std::string getExplicitIMCAFilename() const
Retrieves the name of the file that contains the model in the IMCA format.
bool areJaniPropertiesSelected() const
Retrieves whether one or more jani-properties have been selected.
std::string getChoiceLabelingFilename() const
Retrieves the name of the file that contains the choice labeling if the model was given using the exp...
bool isStateRewardsSet() const
Retrieves whether the state reward option was set.
std::string getProperty() const
Retrieves the property specified with the property option.
std::string getJaniInputFilename() const
Retrieves the name of the file that contains the JANI model specification if the model was given usin...
bool isChoiceLabelingSet() const
Retrieves whether the choice labeling option was set.
bool isPrismOrJaniInputSet() const
Retrieves whether the JANI or PRISM input option was set.
std::string getPropertyFilter() const
Retrieves the property filter.
std::string getPrismInputFilename() const
Retrieves the name of the file that contains the PRISM model specification if the model was given usi...
bool isExplicitDRNSet() const
Retrieves whether the explicit option with DRN was set.
std::string getExplicitDRNFilename() const
Retrieves the name of the file that contains the model in the DRN format.
std::string getLabelingFilename() const
Retrieves the name of the file that contains the state labeling if the model was given using the expl...
boost::optional< std::vector< std::string > > getQvbsPropertyFilter() const
Retrieves the selected property names.
std::string getStateRewardsFilename() const
Retrieves the name of the file that contains the state rewards if the model was given using the expli...
bool isExplicitUmbSet() const
Retrieves whether the explicit option with UMB was set.
std::string getTransitionRewardsFilename() const
Retrieves the name of the file that contains the transition rewards if the model was given using the ...
bool isPropertySet() const
Retrieves whether the property option was set.
std::string getQvbsModelName() const
Retrieves the specified model (short-)name of the QVBS.
std::vector< std::string > getSelectedJaniProperties() const
std::string getTransitionFilename() const
Retrieves the name of the file that contains the transitions if the model was given using the explici...
uint64_t getQvbsInstanceIndex() const
Retrieves the selected model instance (file + open parameters of the model).
bool isExplicitIMCASet() const
Retrieves whether the explicit option with IMCA was set.
bool isPrismInputSet() const
Retrieves whether the PRISM language option was set.
bool isTransitionRewardsSet() const
Retrieves whether the transition reward option was set.
std::string getExplicitUmbFilename() const
Retrieves the name of the file that contains the model in the UMB format.
bool isExplicitSet() const
Retrieves whether the explicit option was set.
bool enableBisimulation() const
storm::utility::Engine getEngine() const
Retrieve "good" settings after calling predict.
void predict(storm::jani::Model const &model, storm::jani::Property const &property)
Predicts "good" settings for the provided model checking query.
A class that provides convenience operations to display run times.
void start()
Start stopwatch (again) and start measuring time.
void stop()
Stop stopwatch and add measured time to total time.
#define STORM_LOG_INFO(message)
#define STORM_LOG_WARN(message)
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_WARN_COND(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
std::shared_ptr< storm::models::sparse::Model< ValueType > > transformToNondeterministicModel(storm::models::sparse::Model< ValueType > &&model)
std::shared_ptr< storm::models::symbolic::Model< LibraryType, ValueType > > buildSymbolicModel(storm::Environment const &env, storm::languages::SymbolicModelDescription const &model, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas, bool buildFullModel=false, bool applyMaximumProgress=true, bool fixDeadlocks=true)
std::shared_ptr< storm::models::sparse::Model< ValueType > > mergeEquivalentStatesForFormula(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, storm::logic::Formula const &formula)
Identifies states of the given model that are equivalent w.r.t.
void exportSymbolicModelAsDot(std::shared_ptr< storm::models::symbolic::Model< Type, ValueType > > const &model, std::string const &filename)
void exportSparseModelAsUmb(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::string const &filename, storm::umb::ExportOptions const &options={})
std::shared_ptr< storm::models::ModelBase > buildExplicitUmbModel(std::string const &umbLocation, storm::umb::ImportOptions const &options={})
std::shared_ptr< storm::models::sparse::Model< ValueType > > permuteModelStates(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, storm::utility::permutation::OrderKind order, std::optional< uint64_t > seed=std::nullopt)
Permutes the order of the states of the model according to the given order.
storm::jani::Property createMultiObjectiveProperty(std::vector< storm::jani::Property > const &properties, bool lexicographic)
std::shared_ptr< storm::models::sparse::Model< ValueType > > buildExplicitIMCAModel(std::string const &imcaFile, storm::parser::ExplicitModelParserOptions const &options=storm::parser::ExplicitModelParserOptions())
std::pair< std::shared_ptr< storm::models::sparse::Model< ValueType > >, std::vector< std::shared_ptr< storm::logic::Formula const > > > eliminateNonMarkovianChains(std::shared_ptr< storm::models::sparse::MarkovAutomaton< ValueType > > const &ma, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas, storm::transformer::EliminationLabelBehavior labelBehavior)
Eliminates chains of non-Markovian states from a given Markov Automaton.
std::shared_ptr< storm::models::sparse::Model< ValueType > > transformSymbolicToSparseModel(std::shared_ptr< storm::models::symbolic::Model< Type, ValueType > > const &symbolicModel, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas=std::vector< std::shared_ptr< storm::logic::Formula const > >())
Transforms the given symbolic model to a sparse model.
std::pair< std::shared_ptr< storm::models::sparse::Model< ValueType > >, std::vector< std::shared_ptr< storm::logic::Formula const > > > transformContinuousToDiscreteTimeSparseModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas)
Transforms the given continuous model to a discrete time model.
void exportSymbolicModelAsDrdd(std::shared_ptr< storm::models::symbolic::Model< Type, ValueType > > const &model, std::string const &filename)
storm::prism::Program parseProgram(std::string const &filename, bool prismCompatibility, bool simplify)
std::vector< storm::jani::Property > parsePropertiesForSymbolicModelDescription(std::string const &inputString, storm::languages::SymbolicModelDescription const &modelDescription, boost::optional< std::set< std::string > > const &propertyFilter)
boost::optional< std::set< std::string > > parsePropertyFilter(std::string const &propertyFilter)
std::vector< std::shared_ptr< storm::logic::Formula const > > extractFormulasFromProperties(std::vector< storm::jani::Property > const &properties)
std::shared_ptr< storm::models::sparse::Model< ValueType > > buildExplicitDRNModel(std::string const &drnFile, storm::parser::DirectEncodingParserOptions const &options=storm::parser::DirectEncodingParserOptions())
storm::jani::ModelFeatures getSupportedJaniFeatures(storm::builder::BuilderType const &builderType)
void exportSparseModelAsDrn(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::string const &filename, std::vector< std::string > const ¶meterNames={}, bool allowPlaceholders=true)
std::shared_ptr< storm::models::sparse::Model< ValueType > > buildExplicitModel(std::string const &transitionsFile, std::string const &labelingFile, boost::optional< std::string > const &stateRewardsFile, boost::optional< std::string > const &transitionRewardsFile, boost::optional< std::string > const &choiceLabelingFile, storm::parser::ExplicitModelParserOptions const &options=storm::parser::ExplicitModelParserOptions())
void simplifyJaniModel(storm::jani::Model &model, std::vector< storm::jani::Property > &properties, storm::jani::ModelFeatures const &supportedFeatures)
void exportSparseModelAsJson(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::string const &filename)
void exportSparseModelAsDot(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::string const &filename, size_t maxWidth=30)
std::vector< storm::jani::Property > parseProperties(storm::parser::FormulaParser &formulaParser, std::string const &inputString, boost::optional< std::set< std::string > > const &propertyFilter)
std::shared_ptr< storm::models::sparse::Model< ValueType > > performBisimulationMinimization(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas={}, storm::bisimulation::Options const &options={})
std::pair< storm::jani::Model, std::vector< storm::jani::Property > > parseJaniModel(std::string const &filename, boost::optional< std::vector< std::string > > const &propertyFilter)
std::vector< storm::jani::Property > substituteConstantsInProperties(std::vector< storm::jani::Property > const &properties, std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution)
std::shared_ptr< storm::models::sparse::Model< ValueType > > buildSparseModel(storm::languages::SymbolicModelDescription const &model, storm::builder::BuilderOptions const &options, typename storm::builder::ExplicitModelBuilder< ValueType >::Options const &explorationOptions=typename storm::builder::ExplicitModelBuilder< ValueType >::Options())
void exportModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, SymbolicInput const &input)
void parseSymbolicModelDescription(storm::settings::modules::IOSettings const &ioSettings, SymbolicInput &input)
std::shared_ptr< storm::models::ModelBase > buildModelExplicit(storm::settings::modules::IOSettings const &ioSettings, storm::settings::modules::BuildSettings const &buildSettings)
auto castAndApply(std::shared_ptr< storm::models::ModelBase > const &model, auto const &callback)
SymbolicInput parseSymbolicInputQvbs(storm::settings::modules::IOSettings const &ioSettings)
void getModelProcessingInformationAutomatic(SymbolicInput const &input, ModelProcessingInformation &mpi)
auto applyValueType(ModelProcessingInformation::ValueType vt, auto const &callback)
std::shared_ptr< storm::models::ModelBase > buildPreprocessExportModel(SymbolicInput const &input, ModelProcessingInformation const &mpi)
SymbolicInput parseSymbolicInput()
std::shared_ptr< storm::models::ModelBase > buildModelSparse(SymbolicInput const &input, storm::builder::BuilderOptions const &options)
std::shared_ptr< storm::models::sparse::Model< ValueType > > preprocessSparseMarkovAutomaton(std::shared_ptr< storm::models::sparse::MarkovAutomaton< ValueType > > const &model)
std::shared_ptr< storm::models::ModelBase > buildModelDd(storm::Environment const &env, SymbolicInput const &input)
std::pair< SymbolicInput, ModelProcessingInformation > preprocessSymbolicInput(SymbolicInput const &input)
std::shared_ptr< storm::models::ModelBase > buildModel(SymbolicInput const &input, storm::settings::modules::IOSettings const &ioSettings, ModelProcessingInformation const &mpi)
void printModelCheckingProperty(storm::jani::Property const &property)
std::enable_if<!storm::dd::BackendTraits< DdType >::templatesupportsValueType< ValueType >, std::shared_ptr< storm::models::Model< ValueType > > >::type preprocessDdMarkovAutomaton(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &model)
void parseProperties(storm::settings::modules::IOSettings const &ioSettings, SymbolicInput &input, boost::optional< std::set< std::string > > const &propertyFilter)
ModelProcessingInformation getModelProcessingInformation(SymbolicInput const &input, std::shared_ptr< SymbolicInput > const &transformedJaniInput=nullptr)
Sets the model processing information based on the given input.
std::shared_ptr< storm::models::Model< ExportValueType > > preprocessDdModelBisimulation(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &model, SymbolicInput const &input, storm::settings::modules::BisimulationSettings const &bisimulationSettings, ModelProcessingInformation const &mpi)
auto applyDdLibValueType(storm::dd::DdType dd, ModelProcessingInformation::ValueType vt, auto const &callback)
std::shared_ptr< storm::models::ModelBase > buildPreprocessModel(SymbolicInput const &input, ModelProcessingInformation const &mpi)
std::shared_ptr< storm::models::sparse::Model< ValueType > > preprocessSparseModelBisimulation(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, SymbolicInput const &input, storm::settings::modules::BisimulationSettings const &bisimulationSettings)
storm::builder::BuilderOptions createBuildOptionsSparseFromSettings(SymbolicInput const &input)
void ensureNoUndefinedPropertyConstants(std::vector< storm::jani::Property > const &properties)
std::vector< std::shared_ptr< storm::logic::Formula const > > createFormulasToRespect(std::vector< storm::jani::Property > const &properties)
std::pair< std::shared_ptr< storm::models::ModelBase >, bool > preprocessModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, SymbolicInput const &input, ModelProcessingInformation const &mpi)
std::pair< std::shared_ptr< storm::models::ModelBase >, bool > preprocessDdModelImpl(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &model, SymbolicInput const &input, ModelProcessingInformation const &mpi)
storm::builder::ExplicitModelBuilder< ValueType >::Options createExplorationOptionsFromSettings()
auto dispatchDdTypeSupporting(DdType type, F &&f)
Like dispatchDdType, but only considers backends that support the ValueType.
std::string toString(CompressionMode const &input)
SettingsType const & getModule()
Get module.
SettingsManager const & manager()
Retrieves the settings manager.
std::string orderKindtoString(OrderKind order)
Converts the given order to a string.
template bool canHandle< double >(storm::utility::Engine const &, std::vector< storm::jani::Property > const &, storm::languages::SymbolicModelDescription const &)
Engine
An enumeration of all engines.
template bool canHandle< storm::RationalNumber >(storm::utility::Engine const &, std::vector< storm::jani::Property > const &, storm::languages::SymbolicModelDescription const &)
storm::builder::BuilderType getBuilderType(Engine const &engine)
Returns the builder type used for the given engine.
bool canHandle< storm::RationalFunction >(storm::utility::Engine const &engine, storm::languages::SymbolicModelDescription::ModelType const &modelType, storm::modelchecker::CheckTask< storm::logic::Formula, storm::RationalFunction > const &checkTask)
TargetType convertNumber(SourceType const &number)
The contract of a DD backend.
carl::Interval< storm::RationalNumber > RationalInterval
carl::Interval< double > Interval
Interval type.
constexpr bool IsIntervalType
Helper to check if a type is an interval.
carl::RationalFunction< Polynomial, true > RationalFunction
#define STORM_PRINT_AND_LOG(message)
#define STORM_PRINT(message)
Define the macros that print information to stdout and optionally also log it.
static const bool IsExact
BisimulationType bisimulationType
std::optional< storm::RationalNumber > tolerance
std::optional< StateType > explorationStateLimit
ExplorationOrder explorationOrder
RefinementMode refinementMode
bool useOriginalVariables
InitialPartitionMode initialPartitionMode
bool allowPlaceholders
Allow placeholders for rational functions in the exported DRN file.
storm::io::CompressionMode compression
The type of compression used for the exported DRN file.
std::optional< std::size_t > outputPrecision
If set, the output precision for floating point numbers in the exported DRN file is set to the given ...
storm::io::CompressionMode compression
The type of compression used for the exported UMB model.
bool buildChoiceLabeling
Controls building of choice labelings.
bool buildObservationValuations
Controls building of observation valuations.
bool buildStateValuations
Controls building of state valuations.