Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm-pomdp.cpp
Go to the documentation of this file.
2
9
12
15
30#include "storm/api/storm.h"
35
38
39#include <typeinfo>
40
41namespace storm {
42namespace pomdp {
43namespace cli {
44
46template<typename ValueType, storm::dd::DdType DdType>
48 storm::logic::Formula const& formula) {
50 bool preprocessingPerformed = false;
51 if (pomdpSettings.isSelfloopReductionSet()) {
53 if (selfLoopEliminator.preservesFormula(formula)) {
54 STORM_PRINT_AND_LOG("Eliminating self-loop choices ...");
55 uint64_t oldChoiceCount = pomdp->getNumberOfChoices();
56 pomdp = selfLoopEliminator.transform();
57 STORM_PRINT_AND_LOG(oldChoiceCount - pomdp->getNumberOfChoices() << " choices eliminated through self-loop elimination.\n");
58 preprocessingPerformed = true;
59 } else {
60 STORM_PRINT_AND_LOG("Not eliminating self-loop choices as it does not preserve the formula.\n");
61 }
62 }
63 if (pomdpSettings.isQualitativeReductionSet() && formulaInfo.isNonNestedReachabilityProbability()) {
65 STORM_PRINT_AND_LOG("Computing states with probability 0 ...");
66 storm::storage::BitVector prob0States = qualitativeAnalysis.analyseProb0(formula.asProbabilityOperatorFormula());
67 std::cout << prob0States << '\n';
68 STORM_PRINT_AND_LOG(" done. " << prob0States.getNumberOfSetBits() << " states found.\n");
69 STORM_PRINT_AND_LOG("Computing states with probability 1 ...");
70 storm::storage::BitVector prob1States = qualitativeAnalysis.analyseProb1(formula.asProbabilityOperatorFormula());
71 STORM_PRINT_AND_LOG(" done. " << prob1States.getNumberOfSetBits() << " states found.\n");
73 pomdp = kpt.transform(*pomdp, prob0States, prob1States);
74 // Update formulaInfo to changes from Preprocessing
75 formulaInfo.updateTargetStates(*pomdp, std::move(prob1States));
76 formulaInfo.updateSinkStates(*pomdp, std::move(prob0States));
77 preprocessingPerformed = true;
78 }
79 return preprocessingPerformed;
80}
81
82template<typename ValueType>
83void printResult(ValueType const& lowerBound, ValueType const& upperBound) {
84 if (lowerBound == upperBound) {
85 if (storm::utility::isInfinity(lowerBound)) {
87 } else {
88 STORM_PRINT_AND_LOG(lowerBound);
89 }
90 } else if (storm::utility::isInfinity<ValueType>(-lowerBound)) {
91 if (storm::utility::isInfinity(upperBound)) {
92 STORM_PRINT_AND_LOG("[-inf, inf] (width=inf)");
93 } else {
94 // Only upper bound is known
95 STORM_PRINT_AND_LOG("≤ " << upperBound);
96 }
97 } else if (storm::utility::isInfinity(upperBound)) {
98 STORM_PRINT_AND_LOG("≥ " << lowerBound);
99 } else {
100 STORM_PRINT_AND_LOG("[" << lowerBound << ", " << upperBound << "] (width=" << ValueType(upperBound - lowerBound) << ")");
101 }
103 STORM_PRINT_AND_LOG(" (approx. ");
104 double roundedLowerBound =
105 storm::utility::isInfinity<ValueType>(-lowerBound) ? -storm::utility::infinity<double>() : storm::utility::convertNumber<double>(lowerBound);
106 double roundedUpperBound =
107 storm::utility::isInfinity(upperBound) ? storm::utility::infinity<double>() : storm::utility::convertNumber<double>(upperBound);
108 printResult(roundedLowerBound, roundedUpperBound);
110 }
111}
112
116
117 options.onlyDeterministicStrategies = qualSettings.isOnlyDeterministicSet();
118 uint64_t loglevel = 0;
119 // TODO a big ugly, but we have our own loglevels (for technical reasons)
120 if (storm::utility::getLogLevel() == l3pp::LogLevel::INFO) {
121 loglevel = 1;
122 } else if (storm::utility::getLogLevel() == l3pp::LogLevel::DEBUG) {
123 loglevel = 2;
124 } else if (storm::utility::getLogLevel() == l3pp::LogLevel::TRACE) {
125 loglevel = 3;
126 }
127 options.setDebugLevel(loglevel);
128 options.validateEveryStep = qualSettings.validateIntermediateSteps();
129 options.validateResult = qualSettings.validateFinalResult();
130
131 options.pathVariableType = storm::pomdp::pathVariableTypeFromString(qualSettings.getLookaheadType());
132
133 if (qualSettings.isExportSATCallsSet()) {
134 options.setExportSATCalls(qualSettings.getExportSATCallsPath());
135 }
136
137 return options;
138}
139
140template<typename ValueType>
142 storm::pomdp::analysis::FormulaInformation const& formulaInfo, storm::logic::Formula const& formula) {
145 std::stringstream sstr;
146 origpomdp->printModelInformationToStream(sstr);
147 STORM_LOG_INFO(sstr.str());
148 STORM_LOG_THROW(formulaInfo.isNonNestedReachabilityProbability(), storm::exceptions::NotSupportedException,
149 "Qualitative memoryless scheduler search is not implemented for this property type.");
150 STORM_LOG_TRACE("Run qualitative preprocessing...");
153 // After preprocessing, this might be done cheaper.
154 storm::storage::BitVector surelyNotAlmostSurelyReachTarget = qualitativeAnalysis.analyseProbSmaller1(formula.asProbabilityOperatorFormula());
155 pomdp.getTransitionMatrix().makeRowGroupsAbsorbing(surelyNotAlmostSurelyReachTarget);
156 storm::storage::BitVector targetStates = qualitativeAnalysis.analyseProb1(formula.asProbabilityOperatorFormula());
157 bool computedSomething = false;
158 if (qualSettings.isMemlessSearchSet()) {
159 computedSomething = true;
160 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory = std::make_shared<storm::utility::solver::Z3SmtSolverFactory>();
161 uint64_t lookahead = qualSettings.getLookahead();
162 if (lookahead == 0) {
163 lookahead = pomdp.getNumberOfStates();
164 }
165 if (qualSettings.getMemlessSearchMethod() == "one-shot") {
166 storm::pomdp::OneShotPolicySearch<ValueType> memlessSearch(pomdp, targetStates, surelyNotAlmostSurelyReachTarget, smtSolverFactory);
167 if (qualSettings.isWinningRegionSet()) {
168 STORM_LOG_ERROR("Computing winning regions is not supported by the one-shot method.");
169 } else {
170 bool result = memlessSearch.analyzeForInitialStates(lookahead);
171 if (result) {
172 STORM_PRINT_AND_LOG("From initial state, one can almost-surely reach the target.\n");
173 } else {
174 STORM_PRINT_AND_LOG("From initial state, one may not almost-surely reach the target .\n");
175 }
176 }
177 } else if (qualSettings.getMemlessSearchMethod() == "iterative") {
179 storm::pomdp::IterativePolicySearch<ValueType> search(pomdp, targetStates, surelyNotAlmostSurelyReachTarget, smtSolverFactory, options);
180 if (qualSettings.isWinningRegionSet()) {
181 search.computeWinningRegion(lookahead);
182 } else {
183 bool result = search.analyzeForInitialStates(lookahead);
184 if (result) {
185 STORM_PRINT_AND_LOG("From initial state, one can almost-surely reach the target.");
186 } else {
187 // TODO consider adding check for end components to improve this message.
188 STORM_PRINT_AND_LOG("From initial state, one may not almost-surely reach the target.");
189 }
190 }
191
192 if (qualSettings.isPrintWinningRegionSet()) {
193 search.getLastWinningRegion().print();
194 std::cout << '\n';
195 }
196 if (qualSettings.isExportWinningRegionSet()) {
197 std::size_t hash = pomdp.hash();
198 search.getLastWinningRegion().storeToFile(qualSettings.exportWinningRegionPath(), "model hash: " + std::to_string(hash));
199 }
200
201 search.finalizeStatistics();
202 if (pomdp.getInitialStates().getNumberOfSetBits() == 1) {
203 uint64_t initialState = pomdp.getInitialStates().getNextSetIndex(0);
204 uint64_t initialObservation = pomdp.getObservation(initialState);
205 // TODO this is inefficient.
206 uint64_t offset = 0;
207 for (uint64_t state = 0; state < pomdp.getNumberOfStates(); ++state) {
208 if (state == initialState) {
209 break;
210 }
211 if (pomdp.getObservation(state) == initialObservation) {
212 ++offset;
213 }
214 }
215
216 if (search.getLastWinningRegion().isWinning(initialObservation, offset)) {
217 STORM_PRINT_AND_LOG("Initial state is safe!\n");
218 } else {
219 STORM_PRINT_AND_LOG("Initial state may not be safe.\n");
220 }
221 } else {
222 STORM_LOG_WARN("Output for multiple initial states is incomplete");
223 }
224
225 if (coreSettings.isShowStatisticsSet()) {
226 STORM_PRINT_AND_LOG("#STATS Number of belief support states: " << search.getLastWinningRegion().beliefSupportStates() << '\n');
227 if (qualSettings.computeExpensiveStats()) {
228 auto wbss = search.getLastWinningRegion().computeNrWinningBeliefs();
229 STORM_PRINT_AND_LOG("#STATS Number of winning belief support states: [" << wbss.first << "," << wbss.second << "]");
230 }
231 search.getStatistics().print();
232 }
233
234 } else {
235 STORM_LOG_ERROR("This method is not implemented.");
236 }
237 }
238 if (qualSettings.isComputeOnBeliefSupportSet()) {
239 computedSomething = true;
241 janicreator.generate(targetStates, surelyNotAlmostSurelyReachTarget);
242 bool initialOnly = !qualSettings.isWinningRegionSet();
243 janicreator.verifySymbolic(initialOnly);
244 STORM_PRINT_AND_LOG("Initial state is safe: " << janicreator.isInitialWinning() << "\n");
245 }
246 STORM_LOG_THROW(computedSomething, storm::exceptions::InvalidSettingsException, "Nothing to be done, did you forget to set a method?");
247}
248
249template<typename ValueType, storm::dd::DdType DdType, typename BeliefType>
251 storm::logic::Formula const& formula) {
253 bool analysisPerformed = false;
254 if (pomdpSettings.isBeliefExplorationSet()) {
255 STORM_PRINT_AND_LOG("Exploring the belief MDP... \n");
256 auto options = storm::pomdp::modelchecker::BeliefExplorationPomdpModelCheckerOptions<ValueType>(pomdpSettings.isBeliefExplorationDiscretizeSet(),
257 pomdpSettings.isBeliefExplorationUnfoldSet());
259 beliefExplorationSettings.setValuesInOptionsStruct(options);
261 auto result = checker.check(formula);
262 checker.printStatisticsToStream(std::cout);
264 STORM_PRINT_AND_LOG("\nResult till abort: ");
265 } else {
266 STORM_PRINT_AND_LOG("\nResult: ");
267 }
268 printResult(result.lowerBound, result.upperBound);
270 analysisPerformed = true;
271 }
272 if (pomdpSettings.isQualitativeAnalysisSet()) {
273 performQualitativeAnalysis(pomdp, formulaInfo, formula);
274 analysisPerformed = true;
275 }
276 if (pomdpSettings.isCheckFullyObservableSet()) {
277 STORM_PRINT_AND_LOG("Analyzing the formula on the fully observable MDP ... ");
278 auto resultPtr = storm::api::verifyWithSparseEngine<ValueType>(pomdp->template as<storm::models::sparse::Mdp<ValueType>>(),
279 storm::api::createTask<ValueType>(formula.asSharedPointer(), true));
280 if (resultPtr) {
281 auto result = resultPtr->template asExplicitQuantitativeCheckResult<ValueType>();
282 result.filter(storm::modelchecker::ExplicitQualitativeCheckResult(pomdp->getInitialStates()));
284 STORM_PRINT_AND_LOG("\nResult till abort: ");
285 } else {
286 STORM_PRINT_AND_LOG("\nResult: ");
287 }
288 printResult(result.getMin(), result.getMax());
290 } else {
291 STORM_PRINT_AND_LOG("\nResult: Not available.\n");
292 }
293 analysisPerformed = true;
294 }
295 return analysisPerformed;
296}
297
298template<typename ValueType, storm::dd::DdType DdType>
303 bool transformationPerformed = false;
304 bool memoryUnfolded = false;
305 if (pomdpSettings.getMemoryBound() > 1) {
306 STORM_PRINT_AND_LOG("Computing the unfolding for memory bound " << pomdpSettings.getMemoryBound() << " and memory pattern '"
307 << storm::storage::toString(pomdpSettings.getMemoryPattern()) << "' ...");
308 storm::storage::PomdpMemory memory = storm::storage::PomdpMemoryBuilder().build(pomdpSettings.getMemoryPattern(), pomdpSettings.getMemoryBound());
309 std::cout << memory.toString() << '\n';
310 storm::transformer::PomdpMemoryUnfolder<ValueType> memoryUnfolder(*pomdp, memory);
311 pomdp = memoryUnfolder.transform();
312 STORM_PRINT_AND_LOG(" done.\n");
313 pomdp->printModelInformationToStream(std::cout);
314 transformationPerformed = true;
315 memoryUnfolded = true;
316 }
317
318 // From now on the POMDP is considered memoryless
319
320 if (transformSettings.isMecReductionSet()) {
321 STORM_PRINT_AND_LOG("Eliminating mec choices ...");
322 // Note: Elimination of mec choices only preserves memoryless schedulers.
323 uint64_t oldChoiceCount = pomdp->getNumberOfChoices();
325 pomdp = mecChoiceEliminator.transform(formula);
326 STORM_PRINT_AND_LOG(" done.\n");
327 STORM_PRINT_AND_LOG(oldChoiceCount - pomdp->getNumberOfChoices() << " choices eliminated through MEC choice elimination.\n");
328 pomdp->printModelInformationToStream(std::cout);
329 transformationPerformed = true;
330 }
331
332 if (transformSettings.isTransformBinarySet() || transformSettings.isTransformSimpleSet()) {
333 if (transformSettings.isTransformSimpleSet()) {
334 STORM_PRINT_AND_LOG("Transforming the POMDP to a simple POMDP.");
335 pomdp = storm::transformer::BinaryPomdpTransformer<ValueType>().transform(*pomdp, true).transformedPomdp;
336 } else {
337 STORM_PRINT_AND_LOG("Transforming the POMDP to a binary POMDP.");
338 pomdp = storm::transformer::BinaryPomdpTransformer<ValueType>().transform(*pomdp, false).transformedPomdp;
339 }
340 pomdp->printModelInformationToStream(std::cout);
341 STORM_PRINT_AND_LOG(" done.\n");
342 transformationPerformed = true;
343 }
344
345 if (pomdpSettings.isExportToParametricSet()) {
346 STORM_PRINT_AND_LOG("Transforming memoryless POMDP to pMC...");
348 std::string transformMode = transformSettings.getFscApplicationTypeString();
349 auto pmc = toPMCTransformer.transform(storm::transformer::parsePomdpFscApplicationMode(transformMode));
350 STORM_PRINT_AND_LOG(" done.\n");
351 if (transformSettings.allowPostSimplifications()) {
352 STORM_PRINT_AND_LOG("Simplifying pMC...");
353 pmc = storm::api::performBisimulationMinimization<storm::RationalFunction>(pmc->template as<storm::models::sparse::Dtmc<storm::RationalFunction>>(),
354 {formula.asSharedPointer()}, storm::storage::BisimulationType::Strong)
355 ->template as<storm::models::sparse::Dtmc<storm::RationalFunction>>();
356 STORM_PRINT_AND_LOG(" done.\n");
357 pmc->printModelInformationToStream(std::cout);
358 }
359 STORM_PRINT_AND_LOG("Exporting pMC...");
361 auto const& parameterSet = constraints.getVariables();
362 std::vector<storm::RationalFunctionVariable> parameters(parameterSet.begin(), parameterSet.end());
363 std::vector<std::string> parameterNames;
364 for (auto const& parameter : parameters) {
365 parameterNames.push_back(parameter.name());
366 }
367 storm::api::exportSparseModelAsDrn(pmc, pomdpSettings.getExportToParametricFilename(), parameterNames,
368 !ioSettings.isExplicitExportPlaceholdersDisabled());
369 STORM_PRINT_AND_LOG(" done.\n");
370 transformationPerformed = true;
371 }
372 if (transformationPerformed && !memoryUnfolded) {
373 STORM_PRINT_AND_LOG("Implicitly assumed restriction to memoryless schedulers for at least one transformation.\n");
374 }
375 return transformationPerformed;
376}
377
378template<typename ValueType, storm::dd::DdType DdType>
381
382 auto model = storm::cli::buildPreprocessExportModelWithValueTypeAndDdlib<DdType, ValueType>(symbolicInput, mpi);
383 if (!model) {
384 STORM_PRINT_AND_LOG("No input model given.\n");
385 return;
386 }
387 STORM_LOG_THROW(model->getType() == storm::models::ModelType::Pomdp && model->isSparseModel(), storm::exceptions::WrongFormatException,
388 "Expected a POMDP in sparse representation.");
389
390 std::shared_ptr<storm::models::sparse::Pomdp<ValueType>> pomdp = model->template as<storm::models::sparse::Pomdp<ValueType>>();
391
392 std::shared_ptr<storm::logic::Formula const> formula;
393 if (!symbolicInput.properties.empty()) {
394 formula = symbolicInput.properties.front().getRawFormula();
395 STORM_PRINT_AND_LOG("Analyzing property '" << *formula << "'\n");
396 STORM_LOG_WARN_COND(symbolicInput.properties.size() == 1,
397 "There is currently no support for multiple properties. All other properties will be ignored.");
398 }
399
400 if (!pomdpSettings.isNoCanonicSet()) {
402 pomdp = makeCanonic.transform();
403 }
404
405 if (pomdpSettings.isAnalyzeUniqueObservationsSet()) {
406 STORM_PRINT_AND_LOG("Analyzing states with unique observation ...\n");
408 std::cout << uniqueAnalysis.analyse() << '\n';
409 }
410
411 if (formula) {
412 auto formulaInfo = storm::pomdp::analysis::getFormulaInformation(*pomdp, *formula);
413 STORM_LOG_THROW(!formulaInfo.isUnsupported(), storm::exceptions::InvalidPropertyException,
414 "The formula '" << *formula << "' is not supported by storm-pomdp.");
415
417 // Note that formulaInfo contains state-based information which potentially needs to be updated during preprocessing
418 if (performPreprocessing<ValueType, DdType>(pomdp, formulaInfo, *formula)) {
419 sw.stop();
420 STORM_PRINT_AND_LOG("Time for graph-based POMDP (pre-)processing: " << sw << ".\n");
421 pomdp->printModelInformationToStream(std::cout);
422 }
423
424 sw.restart();
425 if (performTransformation<ValueType, DdType>(pomdp, *formula)) {
426 sw.stop();
427 STORM_PRINT_AND_LOG("Time for POMDP transformation(s): " << sw << ".\n");
428 }
429
430 sw.restart();
431 if (performAnalysis<ValueType, DdType, ValueType>(pomdp, formulaInfo, *formula)) {
432 sw.stop();
433 STORM_PRINT_AND_LOG("Time for POMDP analysis: " << sw << ".\n");
434 }
435 } else {
436 STORM_LOG_WARN("Nothing to be done. Did you forget to specify a formula?");
437 }
438}
439
440template<storm::dd::DdType DdType>
443 "Build value type differs from verification value type. Will ignore Verification value type.");
444 switch (mpi.buildValueType) {
446 processOptionsWithValueTypeAndDdLib<double, DdType>(symbolicInput, mpi);
447 break;
449 STORM_LOG_THROW(DdType == storm::dd::DdType::Sylvan, storm::exceptions::UnexpectedException,
450 "Exact arithmetic is only supported with Dd library Sylvan.");
451 processOptionsWithValueTypeAndDdLib<storm::RationalNumber, storm::dd::DdType::Sylvan>(symbolicInput, mpi);
452 break;
453 default:
454 STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Unexpected ValueType for model building.");
455 }
456}
457
459 auto symbolicInput = storm::cli::parseSymbolicInput();
461 std::tie(symbolicInput, mpi) = storm::cli::preprocessSymbolicInput(symbolicInput);
462 switch (mpi.ddType) {
464 processOptionsWithDdLib<storm::dd::DdType::CUDD>(symbolicInput, mpi);
465 break;
467 processOptionsWithDdLib<storm::dd::DdType::Sylvan>(symbolicInput, mpi);
468 break;
469 default:
470 STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Unexpected Dd Type.");
471 }
472}
473} // namespace cli
474} // namespace pomdp
475} // namespace storm
476
484int main(const int argc, const char** argv) {
485 // try {
487 // } catch (storm::exceptions::BaseException const &exception) {
488 // STORM_LOG_ERROR("An exception caused Storm-pomdp to terminate. The message of the exception is: " << exception.what());
489 // return 1;
490 //} catch (std::exception const &exception) {
491 // STORM_LOG_ERROR("An unexpected exception occurred and caused Storm-pomdp to terminate. The message of this exception is: " << exception.what());
492 // return 2;
493 //}
494}
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
ProbabilityOperatorFormula & asProbabilityOperatorFormula()
Definition Formula.cpp:453
std::shared_ptr< Formula const > asSharedPointer()
Definition Formula.cpp:548
This class represents a discrete-time Markov chain.
Definition Dtmc.h:14
This class represents a (discrete-time) Markov decision process.
Definition Mdp.h:14
storm::storage::SparseMatrix< ValueType > const & getTransitionMatrix() const
Retrieves the matrix representing the transitions of the model.
Definition Model.cpp:197
virtual uint_fast64_t getNumberOfStates() const override
Returns the number of states of the model.
Definition Model.cpp:162
storm::storage::BitVector const & getInitialStates() const
Retrieves the initial states of the model.
Definition Model.cpp:177
This class represents a partially observable Markov decision process.
Definition Pomdp.h:15
virtual std::size_t hash() const override
Definition Pomdp.cpp:147
uint32_t getObservation(uint64_t state) const
Definition Pomdp.cpp:63
WinningRegion const & getLastWinningRegion() const
void setExportSATCalls(std::string const &path)
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
void updateSinkStates(PomdpType const &pomdp, storm::storage::BitVector &&newSinkStates)
void updateTargetStates(PomdpType const &pomdp, storm::storage::BitVector &&newTargetStates)
Model checker for checking reachability queries on POMDPs using approximations based on exploration o...
Result check(storm::Environment const &env, storm::logic::Formula const &formula, storm::Environment const &preProcEnv, std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > > const &additionalUnderApproximationBounds=std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > >())
Performs model checking of the given POMDP with regards to a formula using the previously specified o...
void printStatisticsToStream(std::ostream &stream) const
Prints statistics of the process to a given output stream.
void generate(storm::storage::BitVector const &targetStates, storm::storage::BitVector const &badStates)
std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > transform(storm::models::sparse::Pomdp< ValueType > const &pomdp, storm::storage::BitVector &prob0States, storm::storage::BitVector &prob1States)
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
uint_fast64_t getNextSetIndex(uint_fast64_t startingIndex) const
Retrieves the index of the bit that is the next bit set to true in the bit vector.
uint_fast64_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
std::shared_ptr< storm::models::sparse::Model< storm::RationalFunction > > transform(PomdpFscApplicationMode applicationMode=PomdpFscApplicationMode::SIMPLE_LINEAR) const
PomdpTransformationResult< ValueType > transform(storm::models::sparse::Pomdp< ValueType > const &pomdp, bool transformSimple, bool keepStateValuations=false) const
std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > transform() const
bool preservesFormula(storm::logic::Formula const &formula) const
std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > transform(storm::logic::Formula const &formula) const
std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > transform() const
std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > transform(bool dropUnreachableStates=true) const
A class that provides convenience operations to display run times.
Definition Stopwatch.h:14
void restart()
Reset the stopwatch and immediately start it.
Definition Stopwatch.cpp:59
void stop()
Stop stopwatch and add measured time to total time.
Definition Stopwatch.cpp:42
#define STORM_LOG_INFO(message)
Definition logging.h:29
#define STORM_LOG_WARN(message)
Definition logging.h:30
#define STORM_LOG_TRACE(message)
Definition logging.h:17
#define STORM_LOG_ERROR(message)
Definition logging.h:31
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:38
#define STORM_LOG_ERROR_COND(cond, message)
Definition macros.h:52
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
#define STORM_PRINT_AND_LOG(message)
Definition macros.h:68
void exportSparseModelAsDrn(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::string const &filename, std::vector< std::string > const &parameterNames={}, bool allowPlaceholders=true)
Definition export.h:25
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.
Definition cli.cpp:81
std::pair< SymbolicInput, ModelProcessingInformation > preprocessSymbolicInput(SymbolicInput const &input)
FormulaInformation getFormulaInformation(PomdpType const &pomdp, storm::logic::ProbabilityOperatorFormula const &formula)
MemlessSearchOptions fillMemlessSearchOptionsFromSettings()
void processOptionsWithValueTypeAndDdLib(storm::cli::SymbolicInput const &symbolicInput, storm::cli::ModelProcessingInformation const &mpi)
void processOptionsWithDdLib(storm::cli::SymbolicInput const &symbolicInput, storm::cli::ModelProcessingInformation const &mpi)
void performQualitativeAnalysis(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > const &origpomdp, storm::pomdp::analysis::FormulaInformation const &formulaInfo, storm::logic::Formula const &formula)
void printResult(ValueType const &lowerBound, ValueType const &upperBound)
bool performTransformation(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &pomdp, storm::logic::Formula 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,...
bool performAnalysis(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > const &pomdp, storm::pomdp::analysis::FormulaInformation const &formulaInfo, storm::logic::Formula const &formula)
MemlessSearchPathVariables pathVariableTypeFromString(std::string const &in)
void initializePomdpSettings(std::string const &name, std::string const &executableName)
Initialize the settings manager.
SettingsType const & getModule()
Get module.
std::string toString(PomdpMemoryPattern const &pattern)
PomdpFscApplicationMode parsePomdpFscApplicationMode(std::string const &mode)
bool isTerminate()
Check whether the program should terminate (due to some abort signal).
bool isInfinity(ValueType const &a)
Definition constants.cpp:71
l3pp::LogLevel getLogLevel()
Gets the global log level.
LabParser.cpp.
Definition cli.cpp:18
int main(const int argc, const char **argv)
Entry point for the pomdp backend.
std::vector< storm::jani::Property > properties