Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm-pomdp.cpp
Go to the documentation of this file.
1#include <typeinfo>
2
24#include "storm/api/storm.h"
36
37namespace storm {
38namespace pomdp {
39namespace cli {
40
42template<typename ValueType>
44 storm::logic::Formula const& formula) {
46 bool preprocessingPerformed = false;
47 if (pomdpSettings.isSelfloopReductionSet()) {
49 if (selfLoopEliminator.preservesFormula(formula)) {
50 STORM_PRINT_AND_LOG("Eliminating self-loop choices ...");
51 uint64_t oldChoiceCount = pomdp->getNumberOfChoices();
52 pomdp = selfLoopEliminator.transform();
53 STORM_PRINT_AND_LOG(oldChoiceCount - pomdp->getNumberOfChoices() << " choices eliminated through self-loop elimination.\n");
54 preprocessingPerformed = true;
55 } else {
56 STORM_PRINT_AND_LOG("Not eliminating self-loop choices as it does not preserve the formula.\n");
57 }
58 }
59 if (pomdpSettings.isQualitativeReductionSet() && formulaInfo.isNonNestedReachabilityProbability()) {
61 STORM_PRINT_AND_LOG("Computing states with probability 0 ...");
62 storm::storage::BitVector prob0States = qualitativeAnalysis.analyseProb0(formula.asProbabilityOperatorFormula());
63 std::cout << prob0States << '\n';
64 STORM_PRINT_AND_LOG(" done. " << prob0States.getNumberOfSetBits() << " states found.\n");
65 STORM_PRINT_AND_LOG("Computing states with probability 1 ...");
66 storm::storage::BitVector prob1States = qualitativeAnalysis.analyseProb1(formula.asProbabilityOperatorFormula());
67 STORM_PRINT_AND_LOG(" done. " << prob1States.getNumberOfSetBits() << " states found.\n");
69 pomdp = kpt.transform(*pomdp, prob0States, prob1States);
70 // Update formulaInfo to changes from Preprocessing
71 formulaInfo.updateTargetStates(*pomdp, std::move(prob1States));
72 formulaInfo.updateSinkStates(*pomdp, std::move(prob0States));
73 preprocessingPerformed = true;
74 }
75 return preprocessingPerformed;
76}
77
78template<typename ValueType>
79void printResult(ValueType const& lowerBound, ValueType const& upperBound) {
80 if (lowerBound == upperBound) {
81 if (storm::utility::isInfinity(lowerBound)) {
83 } else {
84 STORM_PRINT_AND_LOG(lowerBound);
85 }
86 } else if (storm::utility::isInfinity<ValueType>(-lowerBound)) {
87 if (storm::utility::isInfinity(upperBound)) {
88 STORM_PRINT_AND_LOG("[-inf, inf] (width=inf)");
89 } else {
90 // Only upper bound is known
91 STORM_PRINT_AND_LOG("≤ " << upperBound);
92 }
93 } else if (storm::utility::isInfinity(upperBound)) {
94 STORM_PRINT_AND_LOG("≥ " << lowerBound);
95 } else {
96 STORM_PRINT_AND_LOG("[" << lowerBound << ", " << upperBound << "] (width=" << ValueType(upperBound - lowerBound) << ")");
97 }
99 STORM_PRINT_AND_LOG(" (approx. ");
100 double roundedLowerBound =
102 double roundedUpperBound =
104 printResult(roundedLowerBound, roundedUpperBound);
106 }
107}
108
112
113 options.onlyDeterministicStrategies = qualSettings.isOnlyDeterministicSet();
114 uint64_t loglevel = 0;
115 // TODO a big ugly, but we have our own loglevels (for technical reasons)
116 if (storm::utility::getLogLevel() == l3pp::LogLevel::INFO) {
117 loglevel = 1;
118 } else if (storm::utility::getLogLevel() == l3pp::LogLevel::DEBUG) {
119 loglevel = 2;
120 } else if (storm::utility::getLogLevel() == l3pp::LogLevel::TRACE) {
121 loglevel = 3;
122 }
123 options.setDebugLevel(loglevel);
124 options.validateEveryStep = qualSettings.validateIntermediateSteps();
125 options.validateResult = qualSettings.validateFinalResult();
126
127 options.pathVariableType = storm::pomdp::pathVariableTypeFromString(qualSettings.getLookaheadType());
128
129 if (qualSettings.isExportSATCallsSet()) {
130 options.setExportSATCalls(qualSettings.getExportSATCallsPath());
131 }
132
133 return options;
134}
135
136template<typename ValueType>
138 storm::pomdp::analysis::FormulaInformation const& formulaInfo, storm::logic::Formula const& formula) {
141 std::stringstream sstr;
142 origpomdp->printModelInformationToStream(sstr);
143 STORM_LOG_INFO(sstr.str());
144 STORM_LOG_THROW(formulaInfo.isNonNestedReachabilityProbability(), storm::exceptions::NotSupportedException,
145 "Qualitative memoryless scheduler search is not implemented for this property type.");
146 STORM_LOG_TRACE("Run qualitative preprocessing...");
149 // After preprocessing, this might be done cheaper.
150 storm::storage::BitVector surelyNotAlmostSurelyReachTarget = qualitativeAnalysis.analyseProbSmaller1(formula.asProbabilityOperatorFormula());
151 pomdp.getTransitionMatrix().makeRowGroupsAbsorbing(surelyNotAlmostSurelyReachTarget);
152 storm::storage::BitVector targetStates = qualitativeAnalysis.analyseProb1(formula.asProbabilityOperatorFormula());
153 bool computedSomething = false;
154 if (qualSettings.isMemlessSearchSet()) {
155 computedSomething = true;
156 std::shared_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory = std::make_shared<storm::utility::solver::Z3SmtSolverFactory>();
157 uint64_t lookahead = qualSettings.getLookahead();
158 if (lookahead == 0) {
159 lookahead = pomdp.getNumberOfStates();
160 }
161 if (qualSettings.getMemlessSearchMethod() == "one-shot") {
162 storm::pomdp::OneShotPolicySearch<ValueType> memlessSearch(pomdp, targetStates, surelyNotAlmostSurelyReachTarget, smtSolverFactory);
163 if (qualSettings.isWinningRegionSet()) {
164 STORM_LOG_ERROR("Computing winning regions is not supported by the one-shot method.");
165 } else {
166 bool result = memlessSearch.analyzeForInitialStates(lookahead);
167 if (result) {
168 STORM_PRINT_AND_LOG("From initial state, one can almost-surely reach the target.\n");
169 } else {
170 STORM_PRINT_AND_LOG("From initial state, one may not almost-surely reach the target .\n");
171 }
172 }
173 } else if (qualSettings.getMemlessSearchMethod() == "iterative") {
175 storm::pomdp::IterativePolicySearch<ValueType> search(pomdp, targetStates, surelyNotAlmostSurelyReachTarget, smtSolverFactory, options);
176 if (qualSettings.isWinningRegionSet()) {
177 search.computeWinningRegion(lookahead);
178 } else {
179 bool result = search.analyzeForInitialStates(lookahead);
180 if (result) {
181 STORM_PRINT_AND_LOG("From initial state, one can almost-surely reach the target.");
182 } else {
183 // TODO consider adding check for end components to improve this message.
184 STORM_PRINT_AND_LOG("From initial state, one may not almost-surely reach the target.");
185 }
186 }
187
188 if (qualSettings.isPrintWinningRegionSet()) {
189 search.getLastWinningRegion().print();
190 std::cout << '\n';
191 }
192 if (qualSettings.isExportWinningRegionSet()) {
193 std::size_t hash = pomdp.hash();
194 search.getLastWinningRegion().storeToFile(qualSettings.exportWinningRegionPath(), "model hash: " + std::to_string(hash));
195 }
196
197 search.finalizeStatistics();
198 if (pomdp.getInitialStates().getNumberOfSetBits() == 1) {
199 uint64_t initialState = pomdp.getInitialStates().getNextSetIndex(0);
200 uint64_t initialObservation = pomdp.getObservation(initialState);
201 // TODO this is inefficient.
202 uint64_t offset = 0;
203 for (uint64_t state = 0; state < pomdp.getNumberOfStates(); ++state) {
204 if (state == initialState) {
205 break;
206 }
207 if (pomdp.getObservation(state) == initialObservation) {
208 ++offset;
209 }
210 }
211
212 if (search.getLastWinningRegion().isWinning(initialObservation, offset)) {
213 STORM_PRINT_AND_LOG("Initial state is safe!\n");
214 } else {
215 STORM_PRINT_AND_LOG("Initial state may not be safe.\n");
216 }
217 } else {
218 STORM_LOG_WARN("Output for multiple initial states is incomplete");
219 }
220
221 if (coreSettings.isShowStatisticsSet()) {
222 STORM_PRINT_AND_LOG("#STATS Number of belief support states: " << search.getLastWinningRegion().beliefSupportStates() << '\n');
223 if (qualSettings.computeExpensiveStats()) {
224 auto wbss = search.getLastWinningRegion().computeNrWinningBeliefs();
225 STORM_PRINT_AND_LOG("#STATS Number of winning belief support states: [" << wbss.first << "," << wbss.second << "]");
226 }
227 search.getStatistics().print();
228 }
229
230 } else {
231 STORM_LOG_ERROR("This method is not implemented.");
232 }
233 }
234 if (qualSettings.isComputeOnBeliefSupportSet()) {
235 computedSomething = true;
237 janicreator.generate(targetStates, surelyNotAlmostSurelyReachTarget);
238 bool initialOnly = !qualSettings.isWinningRegionSet();
240 STORM_LOG_WARN("Using a default environment (and therefore default settings) for the symbolic analysis.");
241 janicreator.verifySymbolic(env, initialOnly);
242 STORM_PRINT_AND_LOG("Initial state is safe: " << janicreator.isInitialWinning() << "\n");
243 }
244 STORM_LOG_THROW(computedSomething, storm::exceptions::InvalidSettingsException, "Nothing to be done, did you forget to set a method?");
245}
246
247template<typename ValueType, typename BeliefType = ValueType>
249 storm::logic::Formula const& formula) {
251 bool analysisPerformed = false;
252 if (pomdpSettings.isBeliefExplorationSet()) {
253 STORM_PRINT_AND_LOG("Exploring the belief MDP... \n");
254 auto options = storm::pomdp::modelchecker::BeliefExplorationPomdpModelCheckerOptions<ValueType>(pomdpSettings.isBeliefExplorationDiscretizeSet(),
255 pomdpSettings.isBeliefExplorationUnfoldSet());
257 beliefExplorationSettings.setValuesInOptionsStruct(options);
259 auto result = checker.check(formula);
260 checker.printStatisticsToStream(std::cout);
262 STORM_PRINT_AND_LOG("\nResult till abort: ");
263 } else {
264 STORM_PRINT_AND_LOG("\nResult: ");
265 }
266 printResult(result.lowerBound, result.upperBound);
268 analysisPerformed = true;
269 }
270 if (pomdpSettings.isQualitativeAnalysisSet()) {
271 performQualitativeAnalysis(pomdp, formulaInfo, formula);
272 analysisPerformed = true;
273 }
274 if (pomdpSettings.isCheckFullyObservableSet()) {
275 STORM_PRINT_AND_LOG("Analyzing the formula on the fully observable MDP ... ");
278 if (resultPtr) {
279 auto result = resultPtr->template asExplicitQuantitativeCheckResult<ValueType>();
282 STORM_PRINT_AND_LOG("\nResult till abort: ");
283 } else {
284 STORM_PRINT_AND_LOG("\nResult: ");
285 }
286 printResult(result.getMin(), result.getMax());
288 } else {
289 STORM_PRINT_AND_LOG("\nResult: Not available.\n");
290 }
291 analysisPerformed = true;
292 }
293 return analysisPerformed;
294}
295
296template<typename ValueType>
301 bool transformationPerformed = false;
302 bool memoryUnfolded = false;
303 if (pomdpSettings.getMemoryBound() > 1) {
304 STORM_PRINT_AND_LOG("Computing the unfolding for memory bound " << pomdpSettings.getMemoryBound() << " and memory pattern '"
305 << storm::storage::toString(pomdpSettings.getMemoryPattern()) << "' ...");
306 storm::storage::PomdpMemory memory = storm::storage::PomdpMemoryBuilder().build(pomdpSettings.getMemoryPattern(), pomdpSettings.getMemoryBound());
307 std::cout << memory.toString() << '\n';
309 pomdp = memoryUnfolder.transform();
310 STORM_PRINT_AND_LOG(" done.\n");
311 pomdp->printModelInformationToStream(std::cout);
312 transformationPerformed = true;
313 memoryUnfolded = true;
314 }
315
316 // From now on the POMDP is considered memoryless
317
318 if (transformSettings.isMecReductionSet()) {
319 STORM_PRINT_AND_LOG("Eliminating mec choices ...");
320 // Note: Elimination of mec choices only preserves memoryless schedulers.
321 uint64_t oldChoiceCount = pomdp->getNumberOfChoices();
323 pomdp = mecChoiceEliminator.transform(formula);
324 STORM_PRINT_AND_LOG(" done.\n");
325 STORM_PRINT_AND_LOG(oldChoiceCount - pomdp->getNumberOfChoices() << " choices eliminated through MEC choice elimination.\n");
326 pomdp->printModelInformationToStream(std::cout);
327 transformationPerformed = true;
328 }
329
330 if (transformSettings.isTransformBinarySet() || transformSettings.isTransformSimpleSet()) {
331 if (transformSettings.isTransformSimpleSet()) {
332 STORM_PRINT_AND_LOG("Transforming the POMDP to a simple POMDP.");
334 } else {
335 STORM_PRINT_AND_LOG("Transforming the POMDP to a binary POMDP.");
337 }
338 pomdp->printModelInformationToStream(std::cout);
339 STORM_PRINT_AND_LOG(" done.\n");
340 transformationPerformed = true;
341 }
342
343 if (pomdpSettings.isExportToParametricSet()) {
344 STORM_PRINT_AND_LOG("Transforming memoryless POMDP to pMC...");
346 std::string transformMode = transformSettings.getFscApplicationTypeString();
347 auto pmc = toPMCTransformer.transform(storm::transformer::parsePomdpFscApplicationMode(transformMode));
348 STORM_PRINT_AND_LOG(" done.\n");
349 if (transformSettings.allowPostSimplifications()) {
350 STORM_PRINT_AND_LOG("Simplifying pMC...");
352 {formula.asSharedPointer()}, storm::storage::BisimulationType::Strong)
353 ->template as<storm::models::sparse::Dtmc<storm::RationalFunction>>();
354 STORM_PRINT_AND_LOG(" done.\n");
355 pmc->printModelInformationToStream(std::cout);
356 }
357 STORM_PRINT_AND_LOG("Exporting pMC...");
359 auto const& parameterSet = constraints.getVariables();
360 std::vector<storm::RationalFunctionVariable> parameters(parameterSet.begin(), parameterSet.end());
361 std::vector<std::string> parameterNames;
362 for (auto const& parameter : parameters) {
363 parameterNames.push_back(parameter.name());
364 }
365 storm::api::exportSparseModelAsDrn(pmc, pomdpSettings.getExportToParametricFilename(), parameterNames,
366 !ioSettings.isExplicitExportPlaceholdersDisabled());
367 STORM_PRINT_AND_LOG(" done.\n");
368 transformationPerformed = true;
369 }
370 if (transformationPerformed && !memoryUnfolded) {
371 STORM_PRINT_AND_LOG("Implicitly assumed restriction to memoryless schedulers for at least one transformation.\n");
372 }
373 return transformationPerformed;
374}
375
376template<typename ValueType>
379
380 if (!pomdpSettings.isNoCanonicSet()) {
382 pomdp = makeCanonic.transform();
383 }
384
385 if (pomdpSettings.isAnalyzeUniqueObservationsSet()) {
386 STORM_PRINT_AND_LOG("Analyzing states with unique observation ...\n");
388 std::cout << uniqueAnalysis.analyse() << '\n';
389 }
390}
391
392template<typename ValueType>
393void processFormula(std::shared_ptr<storm::models::sparse::Pomdp<ValueType>>&& pomdp, std::shared_ptr<storm::logic::Formula const> const& formula) {
394 auto formulaInfo = storm::pomdp::analysis::getFormulaInformation(*pomdp, *formula);
395 STORM_LOG_THROW(!formulaInfo.isUnsupported(), storm::exceptions::InvalidPropertyException,
396 "The formula '" << *formula << "' is not supported by storm-pomdp.");
397
399 // Note that formulaInfo contains state-based information which potentially needs to be updated during preprocessing
400 if (performPreprocessing(pomdp, formulaInfo, *formula)) {
401 sw.stop();
402 STORM_PRINT_AND_LOG("Time for graph-based POMDP (pre-)processing: " << sw << ".\n");
403 pomdp->printModelInformationToStream(std::cout);
404 }
405
406 sw.restart();
407 if (performTransformation(pomdp, *formula)) {
408 sw.stop();
409 STORM_PRINT_AND_LOG("Time for POMDP transformation(s): " << sw << ".\n");
410 }
411
412 sw.restart();
413 if (performAnalysis(pomdp, formulaInfo, *formula)) {
414 sw.stop();
415 STORM_PRINT_AND_LOG("Time for POMDP analysis: " << sw << ".\n");
416 }
417}
418
419template<typename ValueType>
420void processPomdpFormula(std::shared_ptr<storm::models::sparse::Pomdp<ValueType>>&& pomdp, std::shared_ptr<storm::logic::Formula const> const& formula) {
421 STORM_LOG_ASSERT(pomdp, "No POMDP given or input POMDP is of unexpected type.");
423
424 if (formula) {
425 processFormula(std::move(pomdp), formula);
426 } else {
427 STORM_LOG_WARN("Nothing to be done. Did you forget to specify a formula?");
428 }
429}
430
432 auto symbolicInput = storm::cli::parseSymbolicInput();
434 std::tie(symbolicInput, mpi) = storm::cli::preprocessSymbolicInput(symbolicInput);
437 storm::exceptions::UnexpectedException, "Unexpected ValueType for model building.");
438
439 auto model = storm::cli::buildPreprocessExportModel(symbolicInput, mpi);
440 if (!model) {
441 STORM_PRINT_AND_LOG("No input model given.\n");
442 return;
443 }
444 STORM_LOG_THROW(model->getType() == storm::models::ModelType::Pomdp && model->isSparseModel(), storm::exceptions::WrongFormatException,
445 "Expected a POMDP in sparse representation.");
446
447 std::shared_ptr<storm::logic::Formula const> formula;
448 if (!symbolicInput.properties.empty()) {
449 formula = symbolicInput.properties.front().getRawFormula();
450 STORM_PRINT_AND_LOG("Analyzing property '" << *formula << "'\n");
451 STORM_LOG_WARN_COND(symbolicInput.properties.size() == 1,
452 "There is currently no support for multiple properties. All other properties will be ignored.");
453 }
454
455 if (model->isExact()) {
457 } else {
458 processPomdpFormula(model->template as<storm::models::sparse::Pomdp<double>>(), formula);
459 }
460}
461
462} // namespace cli
463} // namespace pomdp
464} // namespace storm
465
473int main(const int argc, const char** argv) {
474 try {
476 } catch (storm::exceptions::BaseException const& exception) {
477 STORM_LOG_ERROR("An exception caused Storm-pomdp to terminate. The message of the exception is: " << exception.what());
478 return 1;
479 } catch (std::exception const& exception) {
480 STORM_LOG_ERROR("An unexpected exception occurred and caused Storm-pomdp to terminate. The message of this exception is: " << exception.what());
481 return 2;
482 }
483}
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
This class represents the base class of all exception classes.
virtual const char * what() const noexcept override
Retrieves the message associated with this exception.
ProbabilityOperatorFormula & asProbabilityOperatorFormula()
Definition Formula.cpp:476
std::shared_ptr< Formula const > asSharedPointer()
Definition Formula.cpp:571
This class represents a discrete-time Markov chain.
Definition Dtmc.h:13
This class represents a (discrete-time) Markov decision process.
Definition Mdp.h:13
This class represents a partially observable Markov decision process.
Definition Pomdp.h:13
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)
void verifySymbolic(storm::Environment const &env, bool onlyInitial=true)
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:16
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
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:13
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:27
#define STORM_LOG_WARN(message)
Definition logging.h:28
#define STORM_LOG_TRACE(message)
Definition logging.h:15
#define STORM_LOG_ERROR(message)
Definition logging.h:29
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:9
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:36
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:28
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::storage::BisimulationType type=storm::storage::BisimulationType::Strong, bool graphPreserving=true, std::optional< double > const &tolerance=std::nullopt)
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 &parameterNames={}, bool allowPlaceholders=true)
Definition export.h:30
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)
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.
Definition cli.cpp:96
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)
bool performTransformation(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &pomdp, storm::logic::Formula const &formula)
MemlessSearchOptions fillMemlessSearchOptionsFromSettings()
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 performAnalysis(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > const &pomdp, storm::pomdp::analysis::FormulaInformation const &formulaInfo, storm::logic::Formula const &formula)
void processPomdpFormula(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &&pomdp, std::shared_ptr< storm::logic::Formula const > const &formula)
void processFormula(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > &&pomdp, std::shared_ptr< storm::logic::Formula const > 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).
ValueType infinity()
Definition constants.cpp:29
bool isInfinity(ValueType const &a)
TargetType convertNumber(SourceType const &number)
l3pp::LogLevel getLogLevel()
Gets the global log level.
#define STORM_PRINT_AND_LOG(message)
Definition print.h:20
int main(const int argc, const char **argv)
Entry point for the pomdp backend.
static const bool IsExact