51template<
typename ValueType>
55 bool preprocessingPerformed =
false;
56 if (pomdpSettings.isSelfloopReductionSet()) {
60 uint64_t oldChoiceCount =
pomdp->getNumberOfChoices();
62 STORM_PRINT_AND_LOG(oldChoiceCount -
pomdp->getNumberOfChoices() <<
" choices eliminated through self-loop elimination.\n");
63 preprocessingPerformed =
true;
65 STORM_PRINT_AND_LOG(
"Not eliminating self-loop choices as it does not preserve the formula.\n");
81 preprocessingPerformed =
true;
83 return preprocessingPerformed;
86template<
typename ValueType>
87void printResult(std::optional<ValueType>
const& lowerBound, std::optional<ValueType>
const& upperBound) {
88 if (lowerBound.has_value() && upperBound.has_value()) {
89 if (*lowerBound == *upperBound) {
100 STORM_PRINT_AND_LOG(
"[" << *lowerBound <<
", " << *upperBound <<
"] (width=" << ValueType(*upperBound - *lowerBound) <<
")");
102 }
else if (lowerBound.has_value()) {
104 }
else if (upperBound.has_value()) {
109 std::optional<double> roundedLowerBound = std::nullopt;
110 std::optional<double> roundedUpperBound = std::nullopt;
111 if (lowerBound.has_value()) {
114 if (upperBound.has_value()) {
122template<
typename Statistics>
124 STORM_PRINT_AND_LOG(
"Belief exploration " << (statistics.completedExploration ?
"completed" :
"stopped early") <<
": " << statistics.discoveredBeliefs
125 <<
" beliefs discovered, " << statistics.exploredBeliefs <<
" beliefs explored.\n");
126 STORM_PRINT_AND_LOG(
"Constructed belief MDP: " << statistics.beliefMdpStates <<
" states, " << statistics.beliefMdpChoices <<
" choices, "
127 << statistics.beliefMdpTransitions <<
" transitions.\n");
128 if (statistics.processedMdpStates && statistics.processedMdpChoices && statistics.processedMdpTransitions) {
129 STORM_PRINT_AND_LOG(
"Processed belief MDP: " << *statistics.processedMdpStates <<
" states, " << *statistics.processedMdpChoices <<
" choices, "
130 << *statistics.processedMdpTransitions <<
" transitions.\n");
132 STORM_PRINT_AND_LOG(
"Time for exploring beliefs: " << statistics.explorationTimeMilliseconds <<
"ms.\n");
133 STORM_PRINT_AND_LOG(
"Time for building the belief MDP: " << statistics.beliefMdpBuildTimeMilliseconds <<
"ms.\n");
134 STORM_PRINT_AND_LOG(
"Time for analyzing the belief MDP: " << statistics.beliefMdpAnalysisTimeMilliseconds <<
"ms.\n");
142 uint64_t loglevel = 0;
157 if (qualSettings.isExportSATCallsSet()) {
164template<
typename ValueType>
169 std::stringstream sstr;
170 origpomdp->printModelInformationToStream(sstr);
173 "Qualitative memoryless scheduler search is not implemented for this property type.");
179 pomdp.getTransitionMatrix().makeRowGroupsAbsorbing(surelyNotAlmostSurelyReachTarget);
181 bool computedSomething =
false;
182 if (qualSettings.isMemlessSearchSet()) {
183 computedSomething =
true;
184 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory = std::make_shared<storm::utility::solver::SmtSolverFactory>();
185 uint64_t lookahead = qualSettings.getLookahead();
186 if (lookahead == 0) {
187 lookahead =
pomdp.getNumberOfStates();
189 if (qualSettings.getMemlessSearchMethod() ==
"one-shot") {
191 if (qualSettings.isWinningRegionSet()) {
192 STORM_LOG_ERROR(
"Computing winning regions is not supported by the one-shot method.");
201 }
else if (qualSettings.getMemlessSearchMethod() ==
"iterative") {
204 if (qualSettings.isWinningRegionSet()) {
216 if (qualSettings.isPrintWinningRegionSet()) {
220 if (qualSettings.isExportWinningRegionSet()) {
221 std::size_t hash =
pomdp.hash();
226 if (
pomdp.getInitialStates().getNumberOfSetBits() == 1) {
227 uint64_t initialState =
pomdp.getInitialStates().getNextSetIndex(0);
228 uint64_t initialObservation =
pomdp.getObservation(initialState);
231 for (uint64_t state = 0; state <
pomdp.getNumberOfStates(); ++state) {
232 if (state == initialState) {
235 if (
pomdp.getObservation(state) == initialObservation) {
246 STORM_LOG_WARN(
"Output for multiple initial states is incomplete");
249 if (coreSettings.isShowStatisticsSet()) {
251 if (qualSettings.computeExpensiveStats()) {
253 STORM_PRINT_AND_LOG(
"#STATS Number of winning belief support states: [" << wbss.first <<
"," << wbss.second <<
"]");
262 if (qualSettings.isComputeOnBeliefSupportSet()) {
263 computedSomething =
true;
265 janicreator.
generate(targetStates, surelyNotAlmostSurelyReachTarget);
266 bool initialOnly = !qualSettings.isWinningRegionSet();
270 STORM_LOG_THROW(computedSomething, storm::exceptions::InvalidSettingsException,
"Nothing to be done, did you forget to set a method?");
273template<
typename ValueType,
typename BeliefType,
typename BeliefMDPType>
278 STORM_LOG_THROW(!formulaInfo.
isBounded() || !belExplSettings.isUseClippingSet(), storm::exceptions::NotSupportedException,
279 "Grid clipping is not supported for reward-bounded POMDP properties.");
284 if (belExplSettings.getExplorationTimeLimit() != 0) {
287 revisedOptions.
cutZeroGap = belExplSettings.isCutZeroGapSet();
289 std::shared_ptr<storm::models::sparse::Pomdp<ValueType>> preprocessedPomdpPtr =
pomdp;
291 std::optional<std::string> rewardModelName;
292 std::set<uint32_t> targetObservations;
303 components.
stateLabeling = preprocessedPomdpPtr->getStateLabeling();
304 components.
rewardModels = preprocessedPomdpPtr->getRewardModels();
305 auto matrix = preprocessedPomdpPtr->getTransitionMatrix();
308 STORM_LOG_ASSERT(matrix.hasOnlyPositiveEntries(),
"Resulting transition matrix has non-positive entries.");
311 if (preprocessedPomdpPtr->hasChoiceLabeling()) {
312 components.
choiceLabeling = preprocessedPomdpPtr->getChoiceLabeling();
314 if (preprocessedPomdpPtr->hasObservationValuations()) {
317 preprocessedPomdpPtr = std::make_shared<storm::models::sparse::Pomdp<ValueType>>(std::move(components),
true);
318 auto reachableFromSinkStates =
321 reachableFromSinkStates &= ~formulaInfo.getSinkStates().states;
322 STORM_LOG_THROW(reachableFromSinkStates.empty(), storm::exceptions::NotSupportedException,
323 "There are sink states that can reach non-sink states. This is currently not supported");
330 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Unsupported formula '" << formula <<
"'.");
332 std::optional<storm::storage::BitVector> optionalTargetStates;
342 if (belExplSettings.isInexactPreprocessingSet()) {
343 STORM_LOG_WARN(
"Using inexact preprocessing for belief exploration can lead to inaccurate results.");
344 std::shared_ptr<storm::models::sparse::Pomdp<double>> preprocessedPomdpDouble;
345 if constexpr (std::is_same_v<ValueType, storm::RationalNumber>) {
348 ->template as<storm::models::sparse::Pomdp<double>>();
350 STORM_LOG_WARN(
"Inexact preprocessing option has no effect for floating-point models.");
351 preprocessedPomdpDouble = preprocessedPomdpPtr;
353 auto inExactPreProcessingMC =
355 beliefExplorationBounds.
preprocessingBounds = inExactPreProcessingMC.getValueBounds(env, formula).template toValueType<ValueType>();
356 if (belExplSettings.isUseClippingSet() && rewardModelName) {
357 beliefExplorationBounds.
extremeBounds = inExactPreProcessingMC.getExtremeValueBound(env, formula).template toValueType<ValueType>();
361 beliefExplorationBounds.
preprocessingBounds = preProcessingMC.getValueBounds(env, formula);
362 if (belExplSettings.isUseClippingSet() && rewardModelName) {
363 beliefExplorationBounds.
extremeBounds = preProcessingMC.getExtremeValueBound(env, formula);
375 uint64_t initialPomdpState = preprocessedPomdpPtr->getInitialStates().getNextSetIndex(0);
377 std::optional<ExtendedBeliefMDPType> lowerBound =
379 std::optional<ExtendedBeliefMDPType> upperBound =
381 STORM_LOG_INFO(
"Initial value bounds are [" << *lowerBound <<
", " << *upperBound <<
"]");
383 auto updateLowerBound = [&lowerBound](ExtendedBeliefMDPType
const& value) {
384 if (!lowerBound || value > *lowerBound) {
388 auto updateUpperBound = [&upperBound](ExtendedBeliefMDPType
const& value) {
389 if (!upperBound || value < *upperBound) {
395 if (rewardModelName) {
402 for (uint64_t i = 0; i < boundedFormula.getDimension(); ++i) {
403 const auto& tbRef = boundedFormula.getTimeBoundReference(i);
404 if (tbRef.isRewardBound()) {
405 propertyInfo.
rewardBounds.push_back({.rewardModelName = tbRef.getOptionalRewardModelName().get_value_or(
""),
406 .lowerBound = boundedFormula.getLowerBoundAsOptionalTimeBound(i),
407 .upperBound = boundedFormula.getUpperBoundAsOptionalTimeBound(i)});
417 ExtendedBeliefMDPType overResultValue;
418 ExtendedBeliefMDPType underResultValue;
419 bool isOverApproximation{
false};
420 bool isUnderApproximation{
false};
421 bool completedExploration{
false};
422 if (pomdpSettings.isBeliefExplorationDiscretizeSet()) {
423 isOverApproximation =
true;
426 "The size threshold is ignored for discretization, which requires complete exploration.");
428 "The exploration time threshold is ignored for discretization, which requires complete exploration.");
433 std::vector<std::string> relevantRewardModelNames;
434 for (
auto const& rewardBound : propertyInfo.
rewardBounds) {
435 relevantRewardModelNames.push_back(rewardBound.rewardModelName);
439 belExplSettings.isDynamicTriangulationModeSet(), beliefExplorationBounds, relevantRewardModelNames);
440 overResultValue = checkResult.value;
443 auto checkResult = checker.
checkDiscretize(env, propertyInfo, revisedOptions, belExplSettings.getResolutionInit(),
444 belExplSettings.isDynamicTriangulationModeSet(), beliefExplorationBounds);
445 overResultValue = checkResult.value;
450 if (pomdpSettings.isBeliefExplorationUnfoldSet()) {
452 if (belExplSettings.getExplorationTimeLimit() != 0) {
455 if (belExplSettings.getSizeThresholdInit() == 0) {
456 revisedOptions.
maxExplorationSize = preprocessedPomdpPtr->getNumberOfStates() * preprocessedPomdpPtr->getMaxNrStatesWithSameObservation();
461 if (belExplSettings.isUseClippingSet()) {
463 revisedOptions.
clippingResolutions = std::vector<uint64_t>(preprocessedPomdpPtr->getNrObservations(), belExplSettings.getClippingGridResolution());
465 isUnderApproximation =
true;
468 std::vector<std::string> relevantRewardModelNames;
469 for (
auto const& rewardBound : propertyInfo.
rewardBounds) {
470 relevantRewardModelNames.push_back(rewardBound.rewardModelName);
472 return checker.
checkRewardAwareUnfold(env, propertyInfo, revisedOptions, beliefExplorationBounds, relevantRewardModelNames);
474 return checker.
checkUnfold(env, propertyInfo, revisedOptions, beliefExplorationBounds);
476 underResultValue = checkResult.
value;
477 completedExploration = checkResult.completedExploration;
479 isOverApproximation = (completedExploration && !belExplSettings.isUseClippingSet()) || isOverApproximation;
482 if (completedExploration && !belExplSettings.isUseClippingSet()) {
483 updateLowerBound(underResultValue);
484 updateUpperBound(underResultValue);
486 if (isOverApproximation) {
488 updateUpperBound(overResultValue);
489 if (!isUnderApproximation) {
493 updateLowerBound(overResultValue);
494 if (!isUnderApproximation) {
499 if (isUnderApproximation) {
501 updateLowerBound(underResultValue);
502 if (!isOverApproximation) {
506 updateUpperBound(underResultValue);
507 if (!isOverApproximation) {
524template<
typename ValueType,
typename BeliefType = ValueType>
528 bool analysisPerformed =
false;
529 if (pomdpSettings.isBeliefExplorationSet()) {
531 if (beliefExplorationSettings.isBeliefMDPNumberTypeDouble()) {
533 }
else if (beliefExplorationSettings.isBeliefMDPNumberTypeRational()) {
535 }
else if (beliefExplorationSettings.isBeliefMDPNumberTypeMatch()) {
537 "Expected belief MDP number type to be set to match the POMDP, but it is not.");
540 analysisPerformed =
true;
542 if (pomdpSettings.isQualitativeAnalysisSet()) {
544 analysisPerformed =
true;
546 if (pomdpSettings.isCheckFullyObservableSet()) {
551 auto result = resultPtr->template asExplicitQuantitativeCheckResult<ValueType>();
558 printResult(std::optional{result.getMin()}, std::optional{result.getMax()});
563 analysisPerformed =
true;
565 return analysisPerformed;
568template<
typename ValueType>
573 bool transformationPerformed =
false;
574 bool memoryUnfolded =
false;
575 if (pomdpSettings.getMemoryBound() > 1) {
576 STORM_PRINT_AND_LOG(
"Computing the unfolding for memory bound " << pomdpSettings.getMemoryBound() <<
" and memory pattern '"
579 std::cout << memory.
toString() <<
'\n';
583 pomdp->printModelInformationToStream(std::cout);
584 transformationPerformed =
true;
585 memoryUnfolded =
true;
590 if (transformSettings.isMecReductionSet()) {
593 uint64_t oldChoiceCount =
pomdp->getNumberOfChoices();
597 STORM_PRINT_AND_LOG(oldChoiceCount -
pomdp->getNumberOfChoices() <<
" choices eliminated through MEC choice elimination.\n");
598 pomdp->printModelInformationToStream(std::cout);
599 transformationPerformed =
true;
602 if (transformSettings.isTransformBinarySet() || transformSettings.isTransformSimpleSet()) {
603 if (transformSettings.isTransformSimpleSet()) {
610 pomdp->printModelInformationToStream(std::cout);
612 transformationPerformed =
true;
615 if (pomdpSettings.isExportToParametricSet()) {
618 std::string transformMode = transformSettings.getFscApplicationTypeString();
621 if (transformSettings.allowPostSimplifications()) {
624 {formula.asSharedPointer()})
625 ->template as<storm::models::sparse::Dtmc<storm::RationalFunction>>();
627 pmc->printModelInformationToStream(std::cout);
632 std::vector<storm::RationalFunctionVariable> parameters(parameterSet.begin(), parameterSet.end());
633 std::vector<std::string> parameterNames;
634 for (
auto const& parameter : parameters) {
635 parameterNames.push_back(parameter.name());
638 !ioSettings.isExplicitExportPlaceholdersDisabled());
640 transformationPerformed =
true;
642 if (transformationPerformed && !memoryUnfolded) {
643 STORM_PRINT_AND_LOG(
"Implicitly assumed restriction to memoryless schedulers for at least one transformation.\n");
645 return transformationPerformed;
648template<
typename ValueType>
652 if (!pomdpSettings.isNoCanonicSet()) {
657 if (pomdpSettings.isAnalyzeUniqueObservationsSet()) {
660 std::cout << uniqueAnalysis.
analyse() <<
'\n';
664template<
typename ValueType>
666 std::shared_ptr<storm::logic::Formula const> formula) {
667 if (formula->asOperatorFormula().getSubformula().isBoundedUntilFormula()) {
670 auto const& boundedUntilFormula = formula->asOperatorFormula().getSubformula().asBoundedUntilFormula();
671 for (uint64_t i = 0; i < boundedUntilFormula.getDimension(); ++i) {
672 STORM_LOG_THROW(boundedUntilFormula.getLeftSubformula(i).isTrueFormula(), storm::exceptions::NotSupportedException,
673 "Reward-bounded until properties for POMDPs currently require 'true' as the left-hand side, i.e., they must be reward-bounded "
674 "reachability properties.");
683 auto const levelWidths = pomdpSettings.getLevelWidthForBoundedReachability();
684 if (!levelWidths.empty()) {
690 pomdp = unfoldingResult.model->template as<storm::models::sparse::Pomdp<ValueType>>();
691 formula = unfoldingResult.formula;
693 std::set<std::string> levelRewardModels;
694 formula->gatherReferencedRewardModels(levelRewardModels);
697 std::set<std::string> rewardModelsToObserve;
698 if (pomdpSettings.isRewardObservableSet() && levelWidths.empty()) {
699 formula->gatherReferencedRewardModels(rewardModelsToObserve);
701 if (pomdpSettings.isBoundedToUnboundedReachabilityTransformationSet() && formula->asOperatorFormula().getSubformula().isBoundedUntilFormula()) {
706 pomdp = unfoldingResult.model->template as<storm::models::sparse::Pomdp<ValueType>>();
707 formula = unfoldingResult.formula;
709 if (pomdpSettings.isRewardObservableSet() && levelWidths.empty()) {
713 STORM_LOG_THROW(!levelWidths.empty() || pomdpSettings.isRewardObservableSet() || pomdpSettings.isBoundedToUnboundedReachabilityTransformationSet(),
714 storm::exceptions::InvalidSettingsException,
715 "No handling of bounded until formulas specified. Consider setting --unfold-reward-bound and/or --reward-aware.");
717 pomdp->printModelInformationToStream(std::cout);
719 boundedUntilProcessingWatch.
stop();
723 STORM_LOG_THROW(!formulaInfo.isUnsupported(), storm::exceptions::InvalidPropertyException,
724 "The formula '" << *formula <<
"' is not supported by storm-pomdp.");
731 pomdp->printModelInformationToStream(std::cout);
747template<
typename ValueType>
749 std::shared_ptr<storm::logic::Formula const>
const& formula) {
756 STORM_LOG_WARN(
"Nothing to be done. Did you forget to specify a formula?");
766 storm::exceptions::UnexpectedException,
"Unexpected ValueType for model building.");
774 "Expected a POMDP in sparse representation.");
776 std::shared_ptr<storm::logic::Formula const> formula;
777 if (!symbolicInput.properties.empty()) {
778 formula = symbolicInput.properties.front().getRawFormula();
781 "There is currently no support for multiple properties. All other properties will be ignored.");
784 if (model->isExact()) {
802int main(
const int argc,
const char** argv) {
806 STORM_LOG_ERROR(
"An exception caused Storm-pomdp to terminate. The message of the exception is: " << exception.
what());
808 }
catch (std::exception
const& exception) {
809 STORM_LOG_ERROR(
"An unexpected exception occurred and caused Storm-pomdp to terminate. The message of this exception is: " << exception.
what());
Class to collect constraints on parametric Markov chains.
std::set< storm::RationalFunctionVariable > const & getVariables() const
Returns the set of variables in the model.
storm::storage::BitVector analyseProb0(storm::logic::ProbabilityOperatorFormula const &formula) const
storm::storage::BitVector analyseProbSmaller1(storm::logic::ProbabilityOperatorFormula const &formula) const
storm::storage::BitVector analyseProb1(storm::logic::ProbabilityOperatorFormula const &formula) const
storm::storage::BitVector analyse() 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.
A qualitative check result over the states of a sparse model.
This class represents a discrete-time Markov chain.
This class represents a (discrete-time) Markov decision process.
This class represents a partially observable Markov decision process.
bool analyzeForInitialStates(uint64_t k)
void computeWinningRegion(uint64_t k)
Statistics const & getStatistics() const
void finalizeStatistics()
WinningRegion const & getLastWinningRegion() const
void setDebugLevel(uint64_t level=1)
void setExportSATCalls(std::string const &path)
bool onlyDeterministicStrategies
MemlessSearchPathVariables pathVariableType
bool analyzeForInitialStates(uint64_t k)
Check if you can find a memoryless policy from the initial states.
std::pair< storm::RationalNumber, storm::RationalNumber > computeNrWinningBeliefs() const
storm::RationalNumber beliefSupportStates() const
bool isWinning(uint64_t observation, uint64_t offset) const
void storeToFile(std::string const &path, std::string const &preamble="", bool append=false) const
Builds and checks a finite belief MDP approximation of a POMDP.
BeliefBasedModelCheckerResult< BeliefMdpValueType > checkRewardAwareDiscretize(storm::Environment const &env, PropertyInformation const &propertyInformation, storm::pomdp::beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options, uint64_t resolution, bool useDynamic, storage::BeliefExplorationBounds< typename PomdpModelType::ValueType > const &valueBounds, std::vector< std::string > const &relevantRewardModelNames)
Combines reward-aware exploration with Freudenthal triangulation discretization.
BeliefBasedModelCheckerResult< BeliefMdpValueType > checkDiscretize(storm::Environment const &env, PropertyInformation const &propertyInformation, storm::pomdp::beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options, uint64_t resolution, bool useDynamic, storage::BeliefExplorationBounds< PomdpValueType > const &valueBounds)
Explores the belief space and discretises beliefs using the Freudenthal triangualtion approximation.
BeliefBasedModelCheckerResult< BeliefMdpValueType > checkUnfold(storm::Environment const &env, PropertyInformation const &propertyInformation, BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options, storage::BeliefExplorationBounds< PomdpValueType > const &valueBounds)
Explores the belief MDP by unfolding the belief space.
BeliefBasedModelCheckerResult< BeliefMdpValueType > checkRewardAwareUnfold(storm::Environment const &env, PropertyInformation const &propertyInformation, storm::pomdp::beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options, storage::BeliefExplorationBounds< typename PomdpModelType::ValueType > const &valueBounds, std::vector< std::string > const &relevantRewardModelNames)
Explores a reward-aware belief MDP, splitting beliefs before successor generation by their reward vec...
bool isInitialWinning() const
void generate(storm::storage::BitVector const &targetStates, storm::storage::BitVector const &badStates)
void verifySymbolic(storm::Environment const &env, bool onlyInitial=true)
A bit vector that is internally represented as a vector of 64-bit values.
uint64_t getNumberOfSetBits() const
Returns the number of bits that are set to true in this bit vector.
PomdpMemory build(PomdpMemoryPattern pattern, uint64_t numStates) const
std::string toString() const
A class that provides convenience operations to display run times.
void restart()
Reset the stopwatch and immediately start it.
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)
storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > createTask(std::shared_ptr< const storm::logic::Formula > const &formula, bool onlyInitialStatesRelevant=false)
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 > > 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::unique_ptr< storm::modelchecker::CheckResult > verifyWithSparseEngine(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Dtmc< ValueType > > const &dtmc, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task, bool preferEliminationChecker=false)
std::shared_ptr< storm::models::ModelBase > buildPreprocessExportModel(SymbolicInput const &input, ModelProcessingInformation const &mpi)
SymbolicInput parseSymbolicInput()
int process(std::string const &name, std::string const &executableName, std::function< void(std::string const &, std::string const &)> initSettingsFunc, std::function< void(void)> processOptionsFunc, const int argc, const char **argv)
Processes the options and returns the exit code.
std::pair< SymbolicInput, ModelProcessingInformation > preprocessSymbolicInput(SymbolicInput const &input)
FormulaInformation getFormulaInformation(PomdpType const &pomdp, storm::logic::ProbabilityOperatorFormula const &formula)
bool performPreprocessing(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &pomdp, storm::pomdp::analysis::FormulaInformation &formulaInfo, storm::logic::Formula const &formula)
Perform preprocessings based on the graph structure (if requested or necessary). Return true,...
void processPomdp(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &pomdp)
void processPomdpFormula(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &&pomdp, std::shared_ptr< storm::logic::Formula const > const &formula)
bool performTransformation(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &pomdp, storm::logic::Formula const &formula)
MemlessSearchOptions fillMemlessSearchOptionsFromSettings()
bool performAnalysis(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > const &pomdp, storm::pomdp::analysis::FormulaInformation const &formulaInfo, storm::logic::Formula const &formula)
void performQualitativeAnalysis(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > const &origpomdp, storm::pomdp::analysis::FormulaInformation const &formulaInfo, storm::logic::Formula const &formula)
bool performBeliefExploration(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > const &pomdp, storm::pomdp::analysis::FormulaInformation const &formulaInfo, storm::logic::Formula const &formula)
void printResult(std::optional< ValueType > const &lowerBound, std::optional< ValueType > const &upperBound)
void processFormula(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &&pomdp, std::shared_ptr< storm::logic::Formula const > formula)
void printBeliefExplorationStatistics(Statistics const &statistics)
MemlessSearchPathVariables pathVariableTypeFromString(std::string const &in)
bool detectFiniteBeliefMdp(storm::models::sparse::Pomdp< ValueType > const &pomdp, std::optional< storm::storage::BitVector > const &targetStates)
This method tries to detect that the beliefmdp is finite.
void initializePomdpSettings(std::string const &name, std::string const &executableName)
Initialize the settings manager.
SettingsType const & getModule()
Get module.
bool constexpr maximize(OptimizationDirection d)
std::string toString(PomdpMemoryPattern const &pattern)
storm::storage::BitVector getReachableStates(storm::storage::SparseMatrix< T > const &transitionMatrix, storm::storage::BitVector const &initialStates, storm::storage::BitVector const &constraintStates, storm::storage::BitVector const &targetStates, bool useStepBound, uint_fast64_t maximalSteps, boost::optional< storm::storage::BitVector > const &choiceFilter)
Performs a forward depth-first search through the underlying graph structure to identify the states t...
bool isTerminate()
Check whether the program should terminate (due to some abort signal).
ExtendedValueType< ValueType > fromSentinel(ValueType &&value)
Recognises the value that storm::utility::infinity still yields for the value types that have no infi...
std::conditional_t< storm::NumberTraits< ValueType >::HasInfinity, ValueType, ExtendedNumber< ValueType > > ExtendedValueType
The type to use for values that may be infinite.
bool isInfinity(ValueType const &a)
TargetType convertNumber(SourceType const &number)
l3pp::LogLevel getLogLevel()
Gets the global log level.
#define STORM_PRINT_AND_LOG(message)
int main(const int argc, const char **argv)
Entry point for the pomdp backend.
static const bool IsExact
std::optional< std::vector< uint64_t > > clippingResolutions
std::optional< uint64_t > maxExplorationTime
ExplorationQueueOrder explorationQueueOrder
bool cutZeroGap
Cut non-target beliefs only when their preprocessing lower and upper bounds have exactly zero gap.
std::optional< uint64_t > maxExplorationSize
Result of a belief-based model-checking run.
storm::utility::ExtendedValueType< BeliefMdpValueType > value
Struct for storing precomputed values bounding the actual values on the POMDP.
std::optional< ExtremePOMDPValueBound< POMDPValueType > > extremeBounds
std::optional< PreprocessingPomdpValueBounds< POMDPValueType > > preprocessingBounds
Struct for storing precomputed values bounding the actual values on the POMDP.
std::vector< std::vector< POMDPValueType > > lower
std::vector< std::vector< POMDPValueType > > upper
std::unordered_map< std::string, RewardModelType > rewardModels
storm::storage::SparseMatrix< ValueType > transitionMatrix
std::optional< storm::storage::sparse::Valuations > observationValuations
std::optional< storm::models::sparse::ChoiceLabeling > choiceLabeling
storm::models::sparse::StateLabeling stateLabeling
std::optional< std::vector< uint32_t > > observabilityClasses