52 boost::optional<storm::storage::SymbolicModelDescription>
model;
62 auto buildSettings = storm::settings::getModule<storm::settings::modules::BuildSettings>();
69 boost::optional<std::vector<std::string>> propertyFilter;
74 propertyFilter = boost::none;
77 propertyFilter = std::vector<std::string>();
80 input.
model = std::move(janiInput.first);
82 input.
properties = std::move(janiInput.second);
85 modelParsingWatch.
stop();
86 STORM_PRINT(
"Time for model input parsing: " << modelParsingWatch <<
".\n\n");
91 boost::optional<std::set<std::string>>
const& propertyFilter) {
93 std::vector<storm::jani::Property> newProperties;
111 input.
model = std::move(janiInput.first);
112 input.
properties = std::move(janiInput.second);
113 modelParsingWatch.
stop();
114 STORM_PRINT(
"Time for model input parsing: " << modelParsingWatch <<
".\n\n");
122 input.
model = input.
model.get().preprocess(constantDefinitions);
131 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
132 if (ioSettings.isQvbsInputSet()) {
172 auto hints = storm::settings::getModule<storm::settings::modules::HintSettings>();
174 STORM_LOG_THROW(input.
model.is_initialized(), storm::exceptions::InvalidArgumentException,
"Automatic engine requires a JANI input model.");
175 STORM_LOG_THROW(input.
model->isJaniModel(), storm::exceptions::InvalidArgumentException,
"Automatic engine requires a JANI input model.");
176 std::vector<storm::jani::Property>
const& properties =
178 STORM_LOG_THROW(!properties.empty(), storm::exceptions::InvalidArgumentException,
"Automatic engine requires a property.");
180 "Automatic engine does not support decisions based on multiple properties. Only the first property will be considered.");
183 if (hints.isNumberStatesSet()) {
184 as.
predict(input.
model->asJaniModel(), properties.front(), hints.getNumberStates());
186 as.
predict(input.
model->asJaniModel(), properties.front());
207 std::shared_ptr<SymbolicInput>
const& transformedJaniInput =
nullptr) {
209 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
210 auto coreSettings = storm::settings::getModule<storm::settings::modules::CoreSettings>();
211 auto generalSettings = storm::settings::getModule<storm::settings::modules::GeneralSettings>();
212 auto bisimulationSettings = storm::settings::getModule<storm::settings::modules::BisimulationSettings>();
215 mpi.
engine = coreSettings.getEngine();
221 if (generalSettings.isParametricSet()) {
223 }
else if (generalSettings.isExactSet()) {
233 if (input.
model->isJaniModel()) {
244 janiInput.
model = modelAndProperties.first;
245 if (!modelAndProperties.second.empty()) {
251 if (transformedJaniInput) {
253 *transformedJaniInput = std::move(janiInput);
260 auto checkCompatibleSettings = [&mpi, &input] {
279 STORM_LOG_WARN(
"The settings picked by the automatic engine (engine="
281 <<
") are incompatible with this model. Falling back to default settings.");
301 "Dd-based model builder for Markov Automata is only available for JANI models, automatically converting the input model.");
307 if (bisimulationSettings.useExactArithmeticInDdBisimulation()) {
313 STORM_LOG_WARN(
"Requested using exact arithmetic in Dd bisimulation but no dd bisimulation is applied.");
318 mpi.
ddType = coreSettings.getDdLibraryType();
322 STORM_LOG_INFO(
"Switching to DD library sylvan to allow for rational arithmetic.");
329auto castAndApply(std::shared_ptr<storm::models::ModelBase>
const& model,
auto const& callback) {
333 auto castAndApplyImpl = [&model, &callback]<
typename TargetModelType> {
334 auto res = model->template as<TargetModelType>();
336 return callback(res);
340 auto castAndApplyVT = [&]<
typename ValueType> {
341 if (model->isSparseModel()) {
345 STORM_LOG_ASSERT(model->isSymbolicModel() && ddType.has_value(),
"Unexpected model representation");
346 if constexpr (storm::IsIntervalType<ValueType>) {
348 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Symbolic interval models are currently not supported.");
351 if (*ddType == CUDD) {
352 if constexpr (std::is_same_v<ValueType, double>) {
363 if (model->supportsParameters()) {
365 }
else if (model->isExact()) {
366 return castAndApplyVT.template operator()<storm::RationalNumber>();
367 }
else if (model->supportsUncertainty()) {
370 return castAndApplyVT.template operator()<
double>();
377 case FinitePrecision:
378 return callback.template operator()<
double>();
380 return callback.template operator()<storm::RationalNumber>();
384 STORM_LOG_THROW(
false, storm::exceptions::UnexpectedException,
"Unexpected value type.");
392 STORM_LOG_THROW(vt == FinitePrecision, storm::exceptions::UnexpectedException,
"Unexpected value type for DD library Cudd.");
393 return callback.template operator()<CUDD,
double>();
396 case FinitePrecision:
397 return callback.template operator()<
Sylvan,
double>();
399 return callback.template operator()<
Sylvan, storm::RationalNumber>();
404 STORM_LOG_THROW(
false, storm::exceptions::UnexpectedException,
"Unexpected DDType or value type.");
409 for (
auto const& property : properties) {
410 std::set<storm::expressions::Variable> usedUndefinedConstants =
property.getUndefinedConstants();
411 if (!usedUndefinedConstants.empty()) {
412 std::vector<std::string> undefinedConstantsNames;
413 for (
auto const& constant : usedUndefinedConstants) {
414 undefinedConstantsNames.emplace_back(constant.getName());
417 false, storm::exceptions::InvalidArgumentException,
418 "The property '" << property <<
" still refers to the undefined constants " << boost::algorithm::join(undefinedConstantsNames,
",") <<
".");
424 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
429 if (ioSettings.isPropertiesAsMultiSet()) {
431 "Can not translate properties to multi-objective formula because no properties were specified.");
436 std::string constantDefinitionString = ioSettings.getConstantDefinitionString();
437 std::map<storm::expressions::Variable, storm::expressions::Expression> constantDefinitions;
439 constantDefinitions = output.
model.get().parseConstantDefinitions(constantDefinitionString);
440 output.
model = output.
model.get().preprocess(constantDefinitions);
446 auto transformedJani = std::make_shared<SymbolicInput>();
450 if (output.
model && output.
model.get().isPrismProgram()) {
452 if (transformedJani->model) {
454 output = std::move(*transformedJani);
459 output.
model = modelAndProperties.first;
461 if (!modelAndProperties.second.empty()) {
468 if (output.
model && output.
model.get().isJaniModel()) {
472 const auto& buildSettings = storm::settings::getModule<storm::settings::modules::BuildSettings>();
473 if (buildSettings.isLocationEliminationSet()) {
474 auto locationHeuristic = buildSettings.getLocationEliminationLocationHeuristic();
475 auto edgesHeuristic = buildSettings.getLocationEliminationEdgesHeuristic();
477 locationHeuristic, edgesHeuristic));
481 return {output, mpi};
485 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
486 if (input.
model && input.
model.get().isJaniModel()) {
488 if (ioSettings.isExportJaniDotSet()) {
494inline std::vector<std::shared_ptr<storm::logic::Formula const>>
createFormulasToRespect(std::vector<storm::jani::Property>
const& properties) {
497 for (
auto const& property : properties) {
498 if (!property.getFilter().getStatesFormula()->isInitialFormula()) {
499 result.push_back(property.getFilter().getStatesFormula());
506template<storm::dd::DdType DdType,
typename ValueType>
509 auto numThreads = storm::settings::getModule<storm::settings::modules::SylvanSettings>().getNumberOfThreads();
512 auto buildSettings = storm::settings::getModule<storm::settings::modules::BuildSettings>();
514 !buildSettings.isApplyNoMaximumProgressAssumptionSet());
518 auto buildSettings = storm::settings::getModule<storm::settings::modules::BuildSettings>();
526 auto counterexampleGeneratorSettings = storm::settings::getModule<storm::settings::modules::CounterexampleGeneratorSettings>();
527 if (counterexampleGeneratorSettings.isCounterexampleSet()) {
528 buildChoiceOrigins |= counterexampleGeneratorSettings.isMinimalCommandSetGenerationSet();
533 if (buildSettings.isApplyNoMaximumProgressAssumptionSet()) {
537 if (buildSettings.isExplorationChecksSet()) {
543 if (buildSettings.isBuildFullModelSet()) {
550 if (buildSettings.isAddOverlappingGuardsLabelSet()) {
554 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
555 if (ioSettings.isComputeExpectedVisitingTimesSet() || ioSettings.isComputeSteadyStateDistributionSet()) {
561template<
typename ValueType>
564 if (!storm::IsIntervalType<ValueType> && input.
model.is_initialized() && input.
model->isPrismProgram() &&
565 input.
model->asPrismProgram().hasIntervalUpdates()) {
567 "Can not build interval model for the provided value type.");
568 return storm::api::buildSparseModel<storm::Interval>(input.
model.get(), options);
570 return storm::api::buildSparseModel<ValueType>(input.
model.get(), options);
574template<
typename ValueType>
577 std::shared_ptr<storm::models::ModelBase> result;
579 result = storm::api::buildExplicitModel<ValueType>(
599 std::shared_ptr<storm::models::ModelBase> result;
606 auto options = createBuildOptionsSparseFromSettings(input);
607 return buildModelSparse<VT>(input, options);
612 "Can only use sparse engine with explicit input.");
614 return buildModelExplicit<VT>(ioSettings, storm::settings::getModule<storm::settings::modules::BuildSettings>());
618 modelBuildingWatch.
stop();
620 STORM_PRINT(
"Time for model construction: " << modelBuildingWatch <<
".\n\n");
626template<
typename ValueType>
629 auto transformationSettings = storm::settings::getModule<storm::settings::modules::TransformationSettings>();
630 auto debugSettings = storm::settings::getModule<storm::settings::modules::DebugSettings>();
632 std::shared_ptr<storm::models::sparse::Model<ValueType>> result = model;
635 "MA contains a Zeno cycle. Model checking results cannot be trusted.");
637 if (model->isConvertibleToCtmc()) {
639 result = model->convertToCtmc();
642 if (transformationSettings.isChainEliminationSet()) {
643 if constexpr (storm::IsIntervalType<ValueType>) {
645 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Chain elimination not supported for interval models.");
649 transformationSettings.getLabelBehavior())
657template<
typename ValueType>
670template<
typename ValueType>
674 "Converting value types for sparse engine is not supported.");
675 auto bisimulationSettings = storm::settings::getModule<storm::settings::modules::BisimulationSettings>();
676 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
677 auto transformationSettings = storm::settings::getModule<storm::settings::modules::TransformationSettings>();
679 std::pair<std::shared_ptr<storm::models::sparse::Model<ValueType>>,
bool> result = std::make_pair(model,
false);
681 if (
auto order = transformationSettings.getModelPermutation(); order.has_value()) {
682 auto seed = transformationSettings.getModelPermutationSeed();
684 << (seed.has_value() ?
" with seed " + std::to_string(seed.value()) :
"") <<
".\n");
686 result.second =
true;
687 STORM_PRINT_AND_LOG(
"Transition matrix hash after permuting: " << result.first->getTransitionMatrix().hash() <<
".\n");
692 result.second =
true;
696 if constexpr (storm::IsIntervalType<ValueType>) {
697 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Bisimulation not supported for interval models.");
700 result.second =
true;
704 if (transformationSettings.isToDiscreteTimeModelSet()) {
705 if constexpr (storm::IsIntervalType<ValueType>) {
706 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Transformation to discrete time model not supported for interval models.");
710 !model->hasRewardModel(
"_time"),
711 "Scheduled transformation to discrete time model, but a reward model named '_time' is already present in this model. We might take "
712 "the wrong reward model later.");
716 result.second =
true;
720 if (transformationSettings.isToNondeterministicModelSet()) {
721 result.first = storm::api::transformToNondeterministicModel<ValueType>(std::move(*result.first));
722 result.second =
true;
728template<
typename ValueType>
730 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
732 if (ioSettings.isExportBuildSet()) {
733 switch (ioSettings.getExportBuildFormat()) {
739 input.
model ? input.
model.get().getParameterNames() : std::vector<std::string>(),
740 !ioSettings.isExplicitExportPlaceholdersDisabled());
747 "Exporting sparse models in " <<
storm::io::toString(ioSettings.getExportBuildFormat()) <<
" format is not supported.");
753 if (ioSettings.isExportExplicitSet()) {
755 input.
model ? input.
model.get().getParameterNames() : std::vector<std::string>(),
756 !ioSettings.isExplicitExportPlaceholdersDisabled());
759 if (ioSettings.isExportDdSet()) {
760 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Exporting in drdd format is only supported for DDs.");
763 if (ioSettings.isExportDotSet()) {
768template<storm::dd::DdType DdType,
typename ValueType>
770 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
772 if (ioSettings.isExportBuildSet()) {
773 switch (ioSettings.getExportBuildFormat()) {
782 "Exporting symbolic models in " <<
storm::io::toString(ioSettings.getExportBuildFormat()) <<
" format is not supported.");
788 if (ioSettings.isExportExplicitSet()) {
789 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Exporting in drn format is only supported for sparse models.");
792 if (ioSettings.isExportDdSet()) {
796 if (ioSettings.isExportDotSet()) {
801template<storm::dd::DdType DdType,
typename ValueType>
802typename std::enable_if<DdType != storm::dd::DdType::Sylvan && !std::is_same<ValueType, double>::value, std::shared_ptr<storm::models::Model<ValueType>>>::type
807template<storm::dd::DdType DdType,
typename ValueType>
808typename std::enable_if<DdType == storm::dd::DdType::Sylvan || std::is_same<ValueType, double>::value, std::shared_ptr<storm::models::Model<ValueType>>>::type
810 auto ma = model->template as<storm::models::symbolic::MarkovAutomaton<DdType, ValueType>>();
811 if (!ma->isClosed()) {
812 return std::make_shared<storm::models::symbolic::MarkovAutomaton<DdType, ValueType>>(ma->close());
818template<storm::dd::DdType DdType,
typename ValueType,
typename ExportValueType = ValueType>
823 "Weak bisimulation is currently not supported on DDs. Falling back to strong bisimulation.");
828 STORM_LOG_INFO(
"Setting bisimulation quotient format to 'sparse'.");
832 return storm::api::performBisimulationMinimization<DdType, ValueType, ExportValueType>(
836template<
typename ExportValueType, storm::dd::DdType DdType,
typename ValueType>
839 auto bisimulationSettings = storm::settings::getModule<storm::settings::modules::BisimulationSettings>();
840 std::pair<std::shared_ptr<storm::models::Model<ValueType>>,
bool> intermediateResult = std::make_pair(model,
false);
844 intermediateResult.second =
true;
847 std::unique_ptr<std::pair<std::shared_ptr<storm::models::Model<ExportValueType>>,
bool>> result;
848 auto symbolicModel = intermediateResult.first->template as<storm::models::symbolic::Model<DdType, ValueType>>();
850 std::shared_ptr<storm::models::Model<ExportValueType>> newModel =
851 preprocessDdModelBisimulation<DdType, ValueType, ExportValueType>(symbolicModel, input, bisimulationSettings, mpi);
852 result = std::make_unique<std::pair<std::shared_ptr<storm::models::Model<ExportValueType>>,
bool>>(newModel,
true);
854 result = std::make_unique<std::pair<std::shared_ptr<storm::models::Model<ExportValueType>>,
bool>>(
855 symbolicModel->template toValueType<ExportValueType>(), !std::is_same<ValueType, ExportValueType>::value);
860 result->second =
true;
862 std::shared_ptr<storm::models::symbolic::Model<DdType, ExportValueType>> symbolicModel =
863 result->first->template as<storm::models::symbolic::Model<DdType, ExportValueType>>();
864 std::vector<std::shared_ptr<storm::logic::Formula const>> formulas;
865 for (
auto const& property : input.
properties) {
866 formulas.emplace_back(property.getRawFormula());
869 STORM_LOG_THROW(result, storm::exceptions::NotSupportedException,
"The translation to a sparse model is not supported for the given model type.");
875template<storm::dd::DdType DdType,
typename ValueType>
880 if constexpr (std::is_same_v<ValueType, VT> ||
881 (DdType == storm::dd::DdType::Sylvan && std::is_same_v<ValueType, storm::RationalNumber> && std::is_same_v<VT, double>)) {
882 return preprocessDdModelImpl<VT>(model, input, mpi);
884 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException,
885 "Unexpected combination of DD library, build value type, and verification value type.");
895 if (counterexample) {
898 STORM_PRINT(
"Time for computation: " << *watch <<
".\n");
905template<
typename ModelType>
906 requires(!std::derived_from<ModelType, storm::models::sparse::Model<double>>)
908 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Counterexample generation is not supported for this data-type.");
911template<
typename ModelType>
912 requires(std::derived_from<ModelType, storm::models::sparse::Model<double>>)
914 using ValueType =
typename ModelType::ValueType;
916 for (
auto& rewModel : sparseModel->getRewardModels()) {
917 rewModel.second.reduceToStateBasedRewards(sparseModel->getTransitionMatrix(),
true);
921 storm::exceptions::NotSupportedException,
"Counterexample is currently only supported for discrete-time models.");
923 auto counterexampleSettings = storm::settings::getModule<storm::settings::modules::CounterexampleGeneratorSettings>();
924 if (counterexampleSettings.isMinimalCommandSetGenerationSet()) {
925 bool useMilp = counterexampleSettings.isUseMilpBasedMinimalCommandSetGenerationSet();
926 for (
auto const& property : input.
properties) {
927 std::shared_ptr<storm::counterexamples::Counterexample> counterexample;
932 "Counterexample generation using MILP is currently only supported for MDPs.");
937 storm::exceptions::NotSupportedException,
938 "Counterexample generation using MaxSAT is currently only supported for discrete-time models.");
951 }
else if (counterexampleSettings.isShortestPathGenerationSet()) {
952 for (
auto const& property : input.
properties) {
953 std::shared_ptr<storm::counterexamples::Counterexample> counterexample;
957 "Counterexample generation using shortest paths is currently only supported for DTMCs.");
959 property.getRawFormula(), counterexampleSettings.getShortestPathMaxK());
964 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"The selected counterexample formalism is unsupported.");
968template<
typename ValueType>
969 requires(!storm::IsIntervalType<ValueType>)
971 if (result->isQuantitative()) {
975 ValueType resultValue;
978 resultValue = result->asQuantitativeCheckResult<ValueType>().sum();
981 resultValue = result->asQuantitativeCheckResult<ValueType>().average();
984 resultValue = result->asQuantitativeCheckResult<ValueType>().getMin();
987 resultValue = result->asQuantitativeCheckResult<ValueType>().getMax();
991 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Outputting states is not supported.");
995 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"Filter type only defined for qualitative results.");
997 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"Unhandled filter type.");
1000 STORM_PRINT(resultValue <<
" (approx. " << storm::utility::convertNumber<double>(resultValue) <<
")");
1011 STORM_PRINT(result->asQualitativeCheckResult().existsTrue());
1014 STORM_PRINT(result->asQualitativeCheckResult().forallTrue());
1017 STORM_PRINT(result->asQualitativeCheckResult().count());
1021 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Outputting states is not supported.");
1026 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"Filter type only defined for quantitative results.");
1036template<
typename ValueType>
1037 requires(!storm::IsIntervalType<ValueType>)
1041 std::stringstream ss;
1042 ss <<
"'" << filterStatesFormula <<
"'";
1044 <<
" (for " << (filterStatesFormula.isInitialFormula() ?
"initial" : ss.str()) <<
" states): ");
1045 printFilteredResult<ValueType>(result, filterType);
1047 STORM_PRINT(
"Time for model checking: " << *watch <<
".\n");
1050 STORM_LOG_ERROR(
"Property is unsupported by selected engine/settings.\n");
1054template<
typename ValueType>
1060using VerificationCallbackType = std::function<std::unique_ptr<storm::modelchecker::CheckResult>(std::shared_ptr<storm::logic::Formula const>
const& formula,
1061 std::shared_ptr<storm::logic::Formula const>
const& states)>;
1065 void operator()(std::unique_ptr<storm::modelchecker::CheckResult>
const&) {
1076template<
typename ValueType>
1077std::unique_ptr<storm::modelchecker::CheckResult>
verifyProperty(std::shared_ptr<storm::logic::Formula const>
const& formula,
1078 std::shared_ptr<storm::logic::Formula const>
const& statesFilter,
1080 auto transformationSettings = storm::settings::getModule<storm::settings::modules::TransformationSettings>();
1083 if constexpr (storm::IsIntervalType<ValueType>) {
1084 STORM_LOG_ASSERT(!transformationSettings.isChainEliminationSet() && !transformationSettings.isToNondeterministicModelSet(),
1085 "Unsupported transformation has been invoked.");
1086 return verificationCallback(formula, statesFilter);
1089 STORM_LOG_WARN(
"Property is not preserved by elimination of non-markovian states.");
1090 }
else if (transformationSettings.isToDiscreteTimeModelSet()) {
1091 auto transformedFormula = storm::api::checkAndTransformContinuousToDiscreteTimeFormula<ValueType>(*formula);
1092 auto transformedStatesFilter = storm::api::checkAndTransformContinuousToDiscreteTimeFormula<ValueType>(*statesFilter);
1093 if (transformedFormula && transformedStatesFilter) {
1095 return verificationCallback(transformedFormula, transformedStatesFilter);
1097 STORM_LOG_WARN(
"Property is not preserved by transformation to discrete time model.");
1101 return verificationCallback(formula, statesFilter);
1115template<
typename ValueType>
1119 for (
auto const& property : properties) {
1122 auto result = verifyProperty<ValueType>(property.getRawFormula(), property.getFilter().getStatesFormula(), verificationCallback);
1125 postprocessingCallback(result);
1127 printResult<storm::IntervalBaseType<ValueType>>(result, property, &watch);
1140template<
typename ValueType>
1141void computeStateValues(std::string
const& description, std::function<std::unique_ptr<storm::modelchecker::CheckResult>()>
const& computationCallback,
1146 STORM_PRINT(
"\nComputing " << description <<
" ...\n");
1147 std::unique_ptr<storm::modelchecker::CheckResult> result;
1149 result = computationCallback();
1160 postprocessingCallback(result);
1165 for (uint64_t propertyIndex = 0; propertyIndex < properties.size(); ++propertyIndex) {
1166 auto const&
property = properties[propertyIndex];
1168 if (!property.getRawFormula()->hasQualitativeResult()) {
1170 <<
"' can not be used for filtering states as it does not have a qualitative result.");
1177 if (propertyFilter) {
1179 std::unique_ptr<storm::modelchecker::CheckResult> filteredResult = result->clone();
1180 filteredResult->filter(propertyFilter->asQualitativeCheckResult());
1181 postprocessingCallback(filteredResult);
1182 printResult<ValueType>(filteredResult, *property.getRawFormula(), property.getFilter().getFilterType(),
1183 propertyIndex == properties.size() - 1 ? &watch :
nullptr);
1190 std::string
const& constraintsString) {
1191 std::vector<storm::expressions::Expression> constraints;
1193 std::vector<std::string> constraintsAsStrings;
1194 boost::split(constraintsAsStrings, constraintsString, boost::is_any_of(
","));
1197 std::unordered_map<std::string, storm::expressions::Expression> variableMapping;
1198 for (
auto const& variableTypePair : expressionManager) {
1199 variableMapping[variableTypePair.first.getName()] = variableTypePair.first;
1203 for (
auto const& constraintString : constraintsAsStrings) {
1204 if (constraintString.empty()) {
1209 STORM_LOG_TRACE(
"Adding special (user-provided) constraint " << constraint <<
".");
1210 constraints.emplace_back(constraint);
1218 std::vector<std::vector<storm::expressions::Expression>> injectedRefinementPredicates;
1221 std::unordered_map<std::string, storm::expressions::Expression> variableMapping;
1222 for (
auto const& variableTypePair : expressionManager) {
1223 variableMapping[variableTypePair.first.getName()] = variableTypePair.first;
1227 std::vector<std::string> predicateGroupsAsStrings;
1228 boost::split(predicateGroupsAsStrings, refinementPredicatesString, boost::is_any_of(
";"));
1230 if (!predicateGroupsAsStrings.empty()) {
1231 for (
auto const& predicateGroupString : predicateGroupsAsStrings) {
1232 if (predicateGroupString.empty()) {
1236 std::vector<std::string> predicatesAsStrings;
1237 boost::split(predicatesAsStrings, predicateGroupString, boost::is_any_of(
":"));
1239 if (!predicatesAsStrings.empty()) {
1240 injectedRefinementPredicates.emplace_back();
1241 for (
auto const& predicateString : predicatesAsStrings) {
1243 STORM_LOG_TRACE(
"Adding special (user-provided) refinement predicate " << predicateString <<
".");
1244 injectedRefinementPredicates.back().emplace_back(predicate);
1247 STORM_LOG_THROW(!injectedRefinementPredicates.back().empty(), storm::exceptions::InvalidArgumentException,
1248 "Expecting non-empty list of predicates to inject for each (mentioned) refinement step.");
1251 std::reverse(injectedRefinementPredicates.back().begin(), injectedRefinementPredicates.back().end());
1256 std::reverse(injectedRefinementPredicates.begin(), injectedRefinementPredicates.end());
1259 return injectedRefinementPredicates;
1262template<storm::dd::DdType DdType,
typename ValueType>
1270 verifyProperties<ValueType>(input, [&input, &options, &mpi](std::shared_ptr<storm::logic::Formula const>
const& formula,
1271 std::shared_ptr<storm::logic::Formula const>
const& states) {
1272 STORM_LOG_THROW(states->isInitialFormula(), storm::exceptions::NotSupportedException,
"Abstraction-refinement can only filter initial states.");
1273 return storm::gbar::api::verifyWithAbstractionRefinementEngine<DdType, ValueType>(mpi.
env, input.
model.get(),
1274 storm::api::createTask<ValueType>(formula,
true), options);
1278template<
typename ValueType>
1281 STORM_LOG_THROW((std::is_same<ValueType, double>::value), storm::exceptions::NotSupportedException,
1282 "Exploration does not support other data-types than floating points.");
1283 verifyProperties<ValueType>(
1284 input, [&input, &mpi](std::shared_ptr<storm::logic::Formula const>
const& formula, std::shared_ptr<storm::logic::Formula const>
const& states) {
1285 STORM_LOG_THROW(states->isInitialFormula(), storm::exceptions::NotSupportedException,
"Exploration can only filter initial states.");
1286 return storm::api::verifyWithExplorationEngine<ValueType>(mpi.
env, input.
model.get(), storm::api::createTask<ValueType>(formula,
true));
1290template<
typename ValueType>
1293 auto const& ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
1294 auto verificationCallback = [&sparseModel, &ioSettings, &mpi](std::shared_ptr<storm::logic::Formula const>
const& formula,
1295 std::shared_ptr<storm::logic::Formula const>
const& states) {
1296 bool filterForInitialStates = states->isInitialFormula();
1297 auto task = storm::api::createTask<ValueType>(formula, filterForInitialStates);
1298 if (ioSettings.isExportSchedulerSet()) {
1299 task.setProduceSchedulers(
true);
1301 std::unique_ptr<storm::modelchecker::CheckResult> result = storm::api::verifyWithSparseEngine<ValueType>(mpi.
env, sparseModel, task);
1303 std::unique_ptr<storm::modelchecker::CheckResult> filter;
1304 if (filterForInitialStates) {
1305 filter = std::make_unique<storm::modelchecker::ExplicitQualitativeCheckResult>(sparseModel->getInitialStates());
1306 }
else if (!states->isTrueFormula()) {
1307 filter = storm::api::verifyWithSparseEngine<ValueType>(mpi.
env, sparseModel, storm::api::createTask<ValueType>(states,
false));
1309 if (result && filter) {
1310 result->filter(filter->asQualitativeCheckResult());
1314 uint64_t exportCount = 0;
1315 auto postprocessingCallback = [&sparseModel, &ioSettings, &input, &exportCount](std::unique_ptr<storm::modelchecker::CheckResult>
const& result) {
1317 STORM_LOG_WARN_COND(!ioSettings.isExportSchedulerSet() || result->hasScheduler(),
"Scheduler requested but could not be generated.");
1318 if (ioSettings.isExportSchedulerSet() && result->hasScheduler()) {
1319 std::filesystem::path schedulerExportPath = ioSettings.getExportSchedulerFilename();
1320 if (exportCount > 0) {
1321 STORM_LOG_WARN(
"Prepending " << exportCount <<
" to scheduler file name for this property because there are multiple properties.");
1322 schedulerExportPath.replace_filename(std::to_string(exportCount) + schedulerExportPath.filename().string());
1327 "No information of state valuations available. The scheduler output will use internal state ids. You might be "
1328 "interested in building the model with state valuations using --buildstateval.");
1330 sparseModel->hasChoiceLabeling() || sparseModel->hasChoiceOrigins(),
1331 "No symbolic choice information is available. The scheduler output will use internal choice ids. You might be interested in "
1332 "building the model with choice labels or choice origins using --buildchoicelab or --buildchoiceorig.");
1334 "Only partial choice information is available. You might want to build the model with choice origins using "
1335 "--buildchoicelab or --buildchoiceorig.");
1337 if (result->isExplicitQuantitativeCheckResult()) {
1338 if constexpr (storm::IsIntervalType<ValueType>) {
1339 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Scheduler export for interval models is not supported.");
1342 schedulerExportPath.string());
1344 }
else if (result->isExplicitParetoCurveCheckResult()) {
1345 if constexpr (std::is_same_v<ValueType, storm::RationalFunction> || storm::IsIntervalType<ValueType>) {
1346 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Scheduler export for models of this value type is not supported.");
1348 auto const& paretoRes = result->template asExplicitParetoCurveCheckResult<ValueType>();
1352 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Scheduler export not supported for this value type.");
1357 if (ioSettings.isExportCheckResultSet()) {
1358 if constexpr (storm::IsIntervalType<ValueType>) {
1359 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Result export for interval models is not supported.");
1361 std::filesystem::path resultExportPath = ioSettings.getExportCheckResultFilename();
1362 if (exportCount > 0) {
1363 STORM_LOG_WARN(
"Prepending " << exportCount <<
" to result file name for this property because there are multiple properties.");
1364 resultExportPath.replace_filename(std::to_string(exportCount) + resultExportPath.filename().string());
1367 "No information of state valuations available. The result output will use internal state ids. You might be interested in "
1368 "building the model with state valuations using --buildstateval.");
1374 if (!(ioSettings.isComputeSteadyStateDistributionSet() || ioSettings.isComputeExpectedVisitingTimesSet())) {
1375 verifyProperties<ValueType>(input, verificationCallback, postprocessingCallback);
1377 if (ioSettings.isComputeSteadyStateDistributionSet()) {
1378 if constexpr (storm::IsIntervalType<ValueType>) {
1379 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Computing steady state distribution is not supported for interval models.");
1381 computeStateValues<ValueType>(
1382 "steady-state probabilities",
1383 [&mpi, &sparseModel]() {
return storm::api::computeSteadyStateDistributionWithSparseEngine<ValueType>(mpi.
env, sparseModel); }, input,
1384 verificationCallback, postprocessingCallback);
1387 if (ioSettings.isComputeExpectedVisitingTimesSet()) {
1388 if constexpr (storm::IsIntervalType<ValueType>) {
1389 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Computing expected visiting times is not supported for interval models.");
1391 computeStateValues<ValueType>(
1392 "expected visiting times",
1393 [&mpi, &sparseModel]() {
return storm::api::computeExpectedVisitingTimesWithSparseEngine<ValueType>(mpi.
env, sparseModel); }, input,
1394 verificationCallback, postprocessingCallback);
1399template<storm::dd::DdType DdType,
typename ValueType>
1402 verifyProperties<ValueType>(
1403 input, [&symbolicModel, &mpi](std::shared_ptr<storm::logic::Formula const>
const& formula, std::shared_ptr<storm::logic::Formula const>
const& states) {
1404 bool filterForInitialStates = states->isInitialFormula();
1405 auto task = storm::api::createTask<ValueType>(formula, filterForInitialStates);
1407 std::unique_ptr<storm::modelchecker::CheckResult> result = storm::api::verifyWithHybridEngine<DdType, ValueType>(mpi.
env, symbolicModel, task);
1409 std::unique_ptr<storm::modelchecker::CheckResult> filter;
1410 if (filterForInitialStates) {
1411 filter = std::make_unique<storm::modelchecker::SymbolicQualitativeCheckResult<DdType>>(symbolicModel->getReachableStates(),
1412 symbolicModel->getInitialStates());
1413 }
else if (!states->isTrueFormula()) {
1414 filter = storm::api::verifyWithHybridEngine<DdType, ValueType>(mpi.
env, symbolicModel, storm::api::createTask<ValueType>(states,
false));
1416 if (result && filter) {
1417 result->filter(filter->asQualitativeCheckResult());
1423template<storm::dd::DdType DdType,
typename ValueType>
1426 verifyProperties<ValueType>(
1427 input, [&symbolicModel, &mpi](std::shared_ptr<storm::logic::Formula const>
const& formula, std::shared_ptr<storm::logic::Formula const>
const& states) {
1428 bool filterForInitialStates = states->isInitialFormula();
1429 auto task = storm::api::createTask<ValueType>(formula, filterForInitialStates);
1431 std::unique_ptr<storm::modelchecker::CheckResult> result =
1432 storm::api::verifyWithDdEngine<DdType, ValueType>(mpi.
env, symbolicModel, storm::api::createTask<ValueType>(formula,
true));
1434 std::unique_ptr<storm::modelchecker::CheckResult> filter;
1435 if (filterForInitialStates) {
1436 filter = std::make_unique<storm::modelchecker::SymbolicQualitativeCheckResult<DdType>>(symbolicModel->getReachableStates(),
1437 symbolicModel->getInitialStates());
1438 }
else if (!states->isTrueFormula()) {
1439 filter = storm::api::verifyWithDdEngine<DdType, ValueType>(mpi.
env, symbolicModel, storm::api::createTask<ValueType>(states,
false));
1441 if (result && filter) {
1442 result->filter(filter->asQualitativeCheckResult());
1448template<storm::dd::DdType DdType,
typename ValueType>
1451 verifyProperties<ValueType>(
1452 input, [&symbolicModel, &mpi](std::shared_ptr<storm::logic::Formula const>
const& formula, std::shared_ptr<storm::logic::Formula const>
const& states) {
1453 STORM_LOG_THROW(states->isInitialFormula(), storm::exceptions::NotSupportedException,
"Abstraction-refinement can only filter initial states.");
1454 return storm::gbar::api::verifyWithAbstractionRefinementEngine<DdType, ValueType>(mpi.
env, symbolicModel,
1455 storm::api::createTask<ValueType>(formula,
true));
1459template<storm::dd::DdType DdType,
typename ValueType>
1460typename std::enable_if<DdType != storm::dd::DdType::CUDD || std::is_same<ValueType, double>::value,
void>::type
verifyModel(
1464 verifyWithHybridEngine<DdType, ValueType>(symbolicModel, input, mpi);
1466 verifyWithDdEngine<DdType, ValueType>(symbolicModel, input, mpi);
1468 verifyWithAbstractionRefinementEngine<DdType, ValueType>(symbolicModel, input, mpi);
1472template<storm::dd::DdType DdType,
typename ValueType>
1473typename std::enable_if<DdType == storm::dd::DdType::CUDD && !std::is_same<ValueType, double>::value,
void>::type
verifySymbolicModel(
1475 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"CUDD does not support the selected data-type.");
1479 auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
1480 auto buildSettings = storm::settings::getModule<storm::settings::modules::BuildSettings>();
1482 std::shared_ptr<storm::models::ModelBase> model;
1483 if (!buildSettings.isNoBuildModelSet()) {
1490 model->printModelInformationToStream(std::cout);
1494 preprocessingWatch.
stop();
1495 if (preprocessingResult.second) {
1496 STORM_PRINT(
"\nTime for model preprocessing: " << preprocessingWatch <<
".\n\n");
1497 model = preprocessingResult.first;
1498 model->printModelInformationToStream(std::cout);
1513 auto abstractionSettings = storm::settings::getModule<storm::settings::modules::AbstractionSettings>();
1514 auto counterexampleSettings = storm::settings::getModule<storm::settings::modules::CounterexampleGeneratorSettings>();
1520 [&input, &mpi]<
storm::dd::DdType DD,
typename VT>() { verifyWithAbstractionRefinementEngine<DD, VT>(input, mpi); });
1526 if (counterexampleSettings.isCounterexampleSet()) {
BuilderOptions & setBuildAllLabels(bool newValue=true)
Should all reward models be built? If not set, only required reward models are build.
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? If not set, only required reward models are build.
bool isBuildChoiceLabelsSet() const
bool isBuildChoiceOriginsSet() const
BuilderOptions & setBuildChoiceOrigins(bool newValue=true)
Should the origins the different choices be built?
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 & 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
This class represents the base class of all exception classes.
virtual const char * what() const noexcept override
Retrieves the message associated with this exception.
This class is responsible for managing a set of typed variables and all expressions using these varia...
std::shared_ptr< storm::logic::Formula const > const & getStatesFormula() const
storm::modelchecker::FilterType getFilterType() 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.
FilterExpression const & getFilter() const
virtual std::optional< storm::dd::DdType > getDdType() const
This class represents a discrete-time Markov chain.
This class represents a Markov automaton.
This class represents a (discrete-time) Markov decision process.
Base class for all sparse models.
Base class for all symbolic models.
storm::expressions::Expression parseFromString(std::string const &expressionString, bool ignoreError=false) const
Parses an expression from the given string.
void setIdentifierMapping(qi::symbols< char, storm::expressions::Expression > const *identifiers_)
Sets an identifier mapping that is used to determine valid variables in the expression.
storm::jani::Model toJani(bool allVariablesGlobal=true, std::string suffix="") const
Converts the PRISM model into an equivalent JANI model.
This class represents the settings for the abstraction procedures.
std::string getInjectedRefinementPredicates() const
Retrieves a string containing refinement predicates to inject (if there are any).
std::string getConstraintString() const
Retrieves the string that specifies additional constraints.
This class represents the bisimulation settings.
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.
bool isQuotientFormatSetFromDefaultValue() const
Retrieves whether the format in which the quotient is to be extracted has been set from its default v...
bool isWeakBisimulationSet() const
Retrieves whether weak bisimulation is to be used.
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...
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.
bool isExplicitSet() const
Retrieves whether the explicit option was set.
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 getInfo(uint64_t instanceIndex=0, boost::optional< std::vector< std::string > > propertyFilter=boost::none) const
std::string const & getConstantDefinition(uint64_t instanceIndex=0) const
storm::jani::Model const & asJaniModel() const
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 stop()
Stop stopwatch and add measured time to total time.
#define STORM_LOG_INFO(message)
#define STORM_LOG_WARN(message)
#define STORM_LOG_TRACE(message)
#define STORM_LOG_ERROR(message)
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_WARN_COND(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
#define STORM_PRINT_AND_LOG(message)
#define STORM_PRINT(message)
Define the macros that print information and optionally also log it.
void exportScheduler(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, storm::storage::Scheduler< ValueType > const &scheduler, std::string const &filename)
void exportSymbolicModelAsDot(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::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.
std::shared_ptr< storm::counterexamples::Counterexample > computeHighLevelCounterexampleMilp(storm::storage::SymbolicModelDescription const &symbolicModel, std::shared_ptr< storm::models::sparse::Mdp< double > > mdp, std::shared_ptr< storm::logic::Formula const > const &formula)
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.
storm::jani::Property createMultiObjectiveProperty(std::vector< storm::jani::Property > const &properties)
std::pair< storm::jani::Model, std::vector< storm::jani::Property > > parseJaniModel(std::string const &filename, boost::optional< std::vector< std::string > > const &propertyFilter)
void exportJaniModelAsDot(storm::jani::Model const &model, std::string const &filename)
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 > > 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)
std::shared_ptr< storm::counterexamples::Counterexample > computeHighLevelCounterexampleMaxSmt(storm::storage::SymbolicModelDescription const &symbolicModel, std::shared_ptr< storm::models::sparse::Model< double > > model, std::shared_ptr< storm::logic::Formula const > const &formula)
std::vector< storm::jani::Property > parsePropertiesForSymbolicModelDescription(std::string const &inputString, storm::storage::SymbolicModelDescription const &modelDescription, boost::optional< std::set< std::string > > const &propertyFilter)
std::vector< std::shared_ptr< storm::logic::Formula const > > extractFormulasFromProperties(std::vector< storm::jani::Property > const &properties)
void simplifyJaniModel(storm::jani::Model &model, std::vector< storm::jani::Property > &properties, storm::jani::ModelFeatures const &supportedFeatures)
boost::optional< std::set< std::string > > parsePropertyFilter(std::string const &propertyFilter)
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)
void exportCheckResultToJson(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::unique_ptr< storm::modelchecker::CheckResult > const &checkResult, std::string const &filename)
std::shared_ptr< storm::counterexamples::Counterexample > computeKShortestPathCounterexample(std::shared_ptr< storm::models::sparse::Model< double > > model, std::shared_ptr< storm::logic::Formula const > const &formula, size_t maxK)
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)
void exportParetoScheduler(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::vector< PointType > const &points, std::vector< storm::storage::Scheduler< ValueType > > const &schedulers, std::string const &baseFilenameStr)
std::vector< storm::jani::Property > substituteConstantsInProperties(std::vector< storm::jani::Property > const &properties, std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution)
void exportModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, SymbolicInput const &input)
void exportSymbolicInput(SymbolicInput const &input)
void parseSymbolicModelDescription(storm::settings::modules::IOSettings const &ioSettings, SymbolicInput &input)
void verifyWithAbstractionRefinementEngine(SymbolicInput const &input, ModelProcessingInformation const &mpi)
std::shared_ptr< storm::models::ModelBase > buildModelExplicit(storm::settings::modules::IOSettings const &ioSettings, storm::settings::modules::BuildSettings const &buildSettings)
std::enable_if< DdType==storm::dd::DdType::CUDD &&!std::is_same< ValueType, double >::value, void >::type verifySymbolicModel(std::shared_ptr< storm::models::ModelBase > const &, SymbolicInput const &, ModelProcessingInformation const &)
void verifyModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &sparseModel, SymbolicInput const &input, ModelProcessingInformation const &mpi)
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)
void verifyWithExplorationEngine(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, bool graphPreserving=true)
void printResult(std::unique_ptr< storm::modelchecker::CheckResult > const &result, storm::logic::Formula const &filterStatesFormula, storm::modelchecker::FilterType const &filterType, storm::utility::Stopwatch *watch=nullptr)
auto applyValueType(ModelProcessingInformation::ValueType vt, auto const &callback)
std::shared_ptr< storm::models::ModelBase > buildPreprocessExportModel(SymbolicInput const &input, ModelProcessingInformation const &mpi)
void verifyProperties(SymbolicInput const &input, VerificationCallbackType const &verificationCallback, PostprocessingCallbackType const &postprocessingCallback=PostprocessingIdentity())
Verifies all (potentially preprocessed) properties given in input.
std::vector< storm::expressions::Expression > parseConstraints(storm::expressions::ExpressionManager const &expressionManager, std::string const &constraintsString)
std::vector< std::vector< storm::expressions::Expression > > parseInjectedRefinementPredicates(storm::expressions::ExpressionManager const &expressionManager, std::string const &refinementPredicatesString)
SymbolicInput parseSymbolicInput()
void verifyWithDdEngine(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &symbolicModel, SymbolicInput const &input, ModelProcessingInformation const &mpi)
std::function< std::unique_ptr< storm::modelchecker::CheckResult >(std::shared_ptr< storm::logic::Formula const > const &formula, std::shared_ptr< storm::logic::Formula const > const &states)> VerificationCallbackType
std::shared_ptr< storm::models::ModelBase > buildModelSparse(SymbolicInput const &input, storm::builder::BuilderOptions const &options)
std::enable_if< DdType!=storm::dd::DdType::Sylvan &&!std::is_same< ValueType, double >::value, std::shared_ptr< storm::models::Model< ValueType > > >::type preprocessDdMarkovAutomaton(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &model)
std::shared_ptr< storm::models::sparse::Model< ValueType > > preprocessSparseMarkovAutomaton(std::shared_ptr< storm::models::sparse::MarkovAutomaton< ValueType > > const &model)
void printFilteredResult(std::unique_ptr< storm::modelchecker::CheckResult > const &result, storm::modelchecker::FilterType ft)
void computeStateValues(std::string const &description, std::function< std::unique_ptr< storm::modelchecker::CheckResult >()> const &computationCallback, SymbolicInput const &input, VerificationCallbackType const &verificationCallback, PostprocessingCallbackType const &postprocessingCallback=PostprocessingIdentity())
Computes values for each state (such as the steady-state probability distribution).
void printCounterexample(std::shared_ptr< storm::counterexamples::Counterexample > const &counterexample, storm::utility::Stopwatch *watch=nullptr)
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)
void parseProperties(storm::settings::modules::IOSettings const &ioSettings, SymbolicInput &input, boost::optional< std::set< std::string > > const &propertyFilter)
void verifyWithHybridEngine(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &symbolicModel, SymbolicInput const &input, ModelProcessingInformation const &mpi)
ModelProcessingInformation getModelProcessingInformation(SymbolicInput const &input, std::shared_ptr< SymbolicInput > const &transformedJaniInput=nullptr)
Sets the model processing information based on the given input.
void printComputingCounterexample(storm::jani::Property const &property)
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::function< void(std::unique_ptr< storm::modelchecker::CheckResult > const &)> PostprocessingCallbackType
std::shared_ptr< storm::models::ModelBase > buildPreprocessModel(SymbolicInput const &input, ModelProcessingInformation const &mpi)
storm::builder::BuilderOptions createBuildOptionsSparseFromSettings(SymbolicInput const &input)
void processInput(SymbolicInput const &input, ModelProcessingInformation const &mpi)
void ensureNoUndefinedPropertyConstants(std::vector< storm::jani::Property > const &properties)
void generateCounterexamples(std::shared_ptr< ModelType > const &, SymbolicInput const &)
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::shared_ptr< storm::models::ModelBase > buildModelDd(SymbolicInput const &input)
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)
std::unique_ptr< storm::modelchecker::CheckResult > verifyProperty(std::shared_ptr< storm::logic::Formula const > const &formula, std::shared_ptr< storm::logic::Formula const > const &statesFilter, VerificationCallbackType const &verificationCallback)
Verifies the given formula plus a filter formula to identify relevant states and warns the user in ca...
std::string toString(ModelExportFormat const &input)
SettingsManager const & manager()
Retrieves the settings manager.
std::string orderKindtoString(OrderKind order)
Converts the given order to a string.
bool isTerminate()
Check whether the program should terminate (due to some abort signal).
bool isConstant(ValueType const &)
bool canHandle< storm::RationalFunction >(storm::utility::Engine const &engine, storm::storage::SymbolicModelDescription::ModelType const &modelType, storm::modelchecker::CheckTask< storm::logic::Formula, storm::RationalFunction > const &checkTask)
Engine
An enumeration of all engines.
template bool canHandle< storm::RationalNumber >(storm::utility::Engine const &, std::vector< storm::jani::Property > const &, storm::storage::SymbolicModelDescription const &)
template bool canHandle< double >(storm::utility::Engine const &, std::vector< storm::jani::Property > const &, storm::storage::SymbolicModelDescription const &)
storm::builder::BuilderType getBuilderType(Engine const &engine)
Returns the builder type used for the given engine.
typename detail::IntervalMetaProgrammingHelper< ValueType >::BaseType IntervalBaseType
Helper to access the type in which interval boundaries are stored.
void operator()(std::unique_ptr< storm::modelchecker::CheckResult > const &)