Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm-pars.cpp
Go to the documentation of this file.
9
13
18
20
29
33
35
37#include "storm/api/storm.h"
38
42
44
46
48
51
52#include "storm/io/file.h"
57
63
64namespace storm {
65namespace pars {
67 PreprocessResult(std::shared_ptr<storm::models::ModelBase> const& model, bool changed) : changed(changed), model(model) {
68 // Intentionally left empty.
69 }
70
71 bool changed;
72 std::shared_ptr<storm::models::ModelBase> model;
73 boost::optional<std::vector<std::shared_ptr<storm::logic::Formula const>>> formulas;
74};
75
76template<typename ValueType>
77std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(std::shared_ptr<storm::models::ModelBase> const& model) {
78 std::vector<storm::storage::ParameterRegion<ValueType>> result;
80 if (regionSettings.isRegionSet()) {
81 result = storm::api::parseRegions<ValueType>(regionSettings.getRegionString(), *model);
82 } else if (regionSettings.isRegionBoundSet()) {
83 result = storm::api::createRegion<ValueType>(regionSettings.getRegionBoundString(), *model);
84 }
85 return result;
86}
87
88template<typename ValueType>
89std::shared_ptr<storm::models::ModelBase> eliminateScc(std::shared_ptr<storm::models::ModelBase> const& model) {
90 storm::utility::Stopwatch eliminationWatch(true);
91 std::shared_ptr<storm::models::ModelBase> result;
92 if (model->isOfType(storm::models::ModelType::Dtmc)) {
93 STORM_PRINT("Applying scc elimination\n");
94 auto sparseModel = model->as<storm::models::sparse::Model<ValueType>>();
95 auto matrix = sparseModel->getTransitionMatrix();
96 auto backwardsTransitionMatrix = matrix.transpose();
97
100
101 storm::storage::BitVector selectedStates(matrix.getRowCount());
102 storm::storage::BitVector selfLoopStates(matrix.getRowCount());
103 for (size_t i = 0; i < decomposition.size(); ++i) {
104 auto scc = decomposition.getBlock(i);
105 if (scc.size() > 1) {
106 auto statesScc = scc.getStates();
107 std::vector<uint_fast64_t> entryStates;
108 for (auto state : statesScc) {
109 auto row = backwardsTransitionMatrix.getRow(state);
110 bool found = false;
111 for (auto backState : row) {
112 if (!scc.containsState(backState.getColumn())) {
113 found = true;
114 }
115 }
116 if (found) {
117 entryStates.push_back(state);
118 selfLoopStates.set(state);
119 } else {
120 selectedStates.set(state);
121 }
122 }
123
124 if (entryStates.size() != 1) {
125 STORM_LOG_THROW(entryStates.size() > 1, storm::exceptions::NotImplementedException,
126 "state elimination not implemented for scc with more than 1 entry points");
127 }
128 }
129 }
130
132 storm::storage::FlexibleSparseMatrix<ValueType> flexibleBackwardTransitions(backwardsTransitionMatrix, true);
133 auto actionRewards = std::vector<ValueType>(matrix.getRowCount(), storm::utility::zero<ValueType>());
134 storm::solver::stateelimination::NondeterministicModelStateEliminator<ValueType> stateEliminator(flexibleMatrix, flexibleBackwardTransitions,
135 actionRewards);
136 for (auto state : selectedStates) {
137 stateEliminator.eliminateState(state, true);
138 }
139 for (auto state : selfLoopStates) {
140 auto row = flexibleMatrix.getRow(state);
141 stateEliminator.eliminateLoop(state);
142 }
143 selectedStates.complement();
144 auto keptRows = matrix.getRowFilter(selectedStates);
145 storm::storage::SparseMatrix<ValueType> newTransitionMatrix = flexibleMatrix.createSparseMatrix(keptRows, selectedStates);
146 // TODO @Jip: note that rewards get lost
147 result = std::make_shared<storm::models::sparse::Dtmc<ValueType>>(std::move(newTransitionMatrix),
148 sparseModel->getStateLabeling().getSubLabeling(selectedStates));
149
150 eliminationWatch.stop();
151 STORM_PRINT("\nTime for scc elimination: " << eliminationWatch << ".\n\n");
152 result->printModelInformationToStream(std::cout);
153 } else if (model->isOfType(storm::models::ModelType::Mdp)) {
154 STORM_LOG_THROW(false, storm::exceptions::NotImplementedException,
155 "Unable to perform SCC elimination for monotonicity analysis on MDP: Not mplemented");
156 } else {
157 STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Unable to perform monotonicity analysis on the provided model type.");
158 }
159 return result;
160}
161
162template<typename ValueType>
163std::shared_ptr<storm::models::ModelBase> simplifyModel(std::shared_ptr<storm::models::ModelBase> const& model, cli::SymbolicInput const& input) {
164 storm::utility::Stopwatch simplifyingWatch(true);
165 std::shared_ptr<storm::models::ModelBase> result;
166 if (model->isOfType(storm::models::ModelType::Dtmc)) {
168 *(model->template as<storm::models::sparse::Dtmc<ValueType>>()));
169
170 std::vector<std::shared_ptr<storm::logic::Formula const>> formulas = storm::api::extractFormulasFromProperties(input.properties);
171 STORM_LOG_THROW(formulas.begin() != formulas.end(), storm::exceptions::NotSupportedException, "Only one formula at the time supported");
172
173 if (!simplifier.simplify(*(formulas[0]))) {
174 STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Simplifying the model was not successfull.");
175 }
176 result = simplifier.getSimplifiedModel();
177 } else if (model->isOfType(storm::models::ModelType::Mdp)) {
179 *(model->template as<storm::models::sparse::Mdp<ValueType>>()));
180
181 std::vector<std::shared_ptr<storm::logic::Formula const>> formulas = storm::api::extractFormulasFromProperties(input.properties);
182 STORM_LOG_THROW(formulas.begin() != formulas.end(), storm::exceptions::NotSupportedException, "Only one formula at the time supported");
183
184 if (!simplifier.simplify(*(formulas[0]))) {
185 STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Simplifying the model was not successfull.");
186 }
187 result = simplifier.getSimplifiedModel();
188 } else {
189 STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Unable to perform monotonicity analysis on the provided model type.");
190 }
191
192 simplifyingWatch.stop();
193 STORM_PRINT("\nTime for model simplification: " << simplifyingWatch << ".\n\n");
194 result->printModelInformationToStream(std::cout);
195 return result;
196}
197
198template<typename ValueType>
205
206 PreprocessResult result(model, false);
207 // TODO: why only simplify in these modes
208 if (parametricSettings.getOperationMode() == storm::pars::utility::ParametricMode::Monotonicity ||
209 parametricSettings.getOperationMode() == storm::pars::utility::ParametricMode::Feasibility) {
210 STORM_LOG_THROW(!input.properties.empty(), storm::exceptions::InvalidSettingsException, "Simplification requires property to be specified");
211 result.model = storm::pars::simplifyModel<ValueType>(result.model, input);
212 result.changed = true;
213 }
214
215 if (result.model->isOfType(storm::models::ModelType::MarkovAutomaton)) {
217 result.changed = true;
218 }
219
220 if (mpi.applyBisimulation) {
221 result.model =
222 storm::cli::preprocessSparseModelBisimulation(result.model->template as<storm::models::sparse::Model<ValueType>>(), input, bisimulationSettings);
223 result.changed = true;
224 }
225
226 if (parametricSettings.isLinearToSimpleEnabled()) {
227 STORM_LOG_INFO("Transforming linear to simple...");
229 result.model = transformer.transform(*result.model->template as<storm::models::sparse::Dtmc<RationalFunction>>(), true);
230 result.changed = true;
231 }
232
233 if (parametricSettings.isTimeTravellingEnabled()) {
237 result.model = std::make_shared<storm::models::sparse::Dtmc<RationalFunction>>(
238 tt.timeTravel(*result.model->template as<storm::models::sparse::Dtmc<RationalFunction>>(), checkTask));
239 result.changed = true;
240 }
241
242 if (transformationSettings.isChainEliminationSet() && model->isOfType(storm::models::ModelType::MarkovAutomaton)) {
243 // TODO: Why only on MAs?
244 auto eliminationResult =
246 storm::api::extractFormulasFromProperties(input.properties), transformationSettings.getLabelBehavior());
247 result.model = eliminationResult.first;
248 // Set transformed properties as new properties in input
249 result.formulas = eliminationResult.second;
250 result.changed = true;
251 }
252
253 if (parametricSettings.transformContinuousModel() &&
254 (model->isOfType(storm::models::ModelType::Ctmc) || model->isOfType(storm::models::ModelType::MarkovAutomaton))) {
257 result.model = transformResult.first;
258 // Set transformed properties as new properties in input
259 result.formulas = transformResult.second;
260 result.changed = true;
261 }
262
263 if (monSettings.isSccEliminationSet()) {
264 // TODO move this into the API?
265 result.model = storm::pars::eliminateScc<ValueType>(result.model);
266 result.changed = true;
267 }
268
269 return result;
270}
271
272template<storm::dd::DdType DdType, typename ValueType>
276
277 PreprocessResult result(model, false);
278
280 // Currently, hybrid engine for parametric models just refers to building the model symbolically.
281 STORM_LOG_INFO("Translating symbolic model to sparse model...");
283 result.changed = true;
284 // Invoke preprocessing on the sparse model
285 PreprocessResult sparsePreprocessingResult =
286 storm::pars::preprocessSparseModel<ValueType>(result.model->as<storm::models::sparse::Model<ValueType>>(), input, mpi);
287 if (sparsePreprocessingResult.changed) {
288 result.model = sparsePreprocessingResult.model;
289 result.formulas = sparsePreprocessingResult.formulas;
290 }
291 } else {
292 STORM_LOG_ASSERT(mpi.engine == storm::utility::Engine::Dd, "Expected Dd engine.");
293 if (mpi.applyBisimulation) {
295 bisimulationSettings, mpi);
296 result.changed = true;
297 }
298 }
299 return result;
300}
301
302template<storm::dd::DdType DdType, typename ValueType>
303PreprocessResult preprocessModel(std::shared_ptr<storm::models::ModelBase> const& model, cli::SymbolicInput const& input,
305 storm::utility::Stopwatch preprocessingWatch(true);
306
307 PreprocessResult result(model, false);
308 if (model->isSparseModel()) {
309 result = storm::pars::preprocessSparseModel<ValueType>(result.model->as<storm::models::sparse::Model<ValueType>>(), input, mpi);
310 } else {
311 STORM_LOG_ASSERT(model->isSymbolicModel(), "Unexpected model type.");
312 result = storm::pars::preprocessDdModel<DdType, ValueType>(result.model->as<storm::models::symbolic::Model<DdType, ValueType>>(), input, mpi);
313 }
314
315 if (result.changed) {
316 STORM_PRINT_AND_LOG("\nTime for model preprocessing: " << preprocessingWatch << ".\n\n");
317 }
318 return result;
319}
320
321template<typename ValueType>
323 std::vector<storm::storage::ParameterRegion<ValueType>> const& regions,
325 STORM_LOG_THROW(regions.size() == 1, storm::exceptions::NotSupportedException, "Region verification is supported for a (single) region only.");
326 storm::storage::ParameterRegion<ValueType> const& region = regions.front();
327 STORM_LOG_THROW(input.properties.size() == 1, storm::exceptions::NotSupportedException, "Region verification is supported for a (single) property only.");
328 auto const& property = input.properties.front();
329
331 auto engine = rvs.getRegionCheckEngine();
332 bool generateSplitEstimates = rvs.isSplittingThresholdSet();
333 std::optional<uint64_t> maxSplitsPerStep = generateSplitEstimates ? std::make_optional(rvs.getSplittingThreshold()) : std::nullopt;
334 storm::utility::Stopwatch watch(true);
335 if (storm::api::verifyRegion<ValueType>(model, *(property.getRawFormula()), region, engine, monotonicitySettings, generateSplitEstimates,
336 maxSplitsPerStep)) {
337 STORM_PRINT_AND_LOG("Formula is satisfied by all parameter instantiations.\n");
338 } else {
339 STORM_PRINT_AND_LOG("Formula is not satisfied by all parameter instantiations.\n");
340 }
341 STORM_PRINT_AND_LOG("Time for model checking: " << watch << ".\n");
342}
343
344template<typename ValueType>
346 std::vector<storm::storage::ParameterRegion<ValueType>> const& regions,
348 uint64_t monThresh = 0) {
349 STORM_LOG_ASSERT(!regions.empty(), "Can not analyze an empty set of regions.");
350 STORM_LOG_THROW(regions.size() == 1, storm::exceptions::NotSupportedException, "Region refinement is not supported for multiple initial regions.");
351 STORM_LOG_THROW(input.properties.size() == 1, storm::exceptions::NotSupportedException, "Region verification is supported for a (single) property only.");
352 auto const& property = input.properties.front();
353
357
358 ValueType refinementThreshold = storm::utility::convertNumber<ValueType>(partitionSettings.getCoverageThreshold());
359 boost::optional<uint64_t> optionalDepthLimit;
360 if (partitionSettings.isDepthLimitSet()) {
361 optionalDepthLimit = partitionSettings.getDepthLimit();
362 }
363
365 STORM_PRINT_AND_LOG("Analyzing parameter region " << regions.front());
366
367 auto engine = rvs.getRegionCheckEngine();
368 STORM_PRINT_AND_LOG(" using " << engine);
369 if (monotonicitySettings.useMonotonicity) {
370 STORM_PRINT_AND_LOG(" with local monotonicity and");
371 }
372
373 STORM_PRINT_AND_LOG(" with iterative refinement until "
374 << (1.0 - partitionSettings.getCoverageThreshold()) * 100.0 << "% is covered."
375 << (partitionSettings.isDepthLimitSet() ? " Depth limit is " + std::to_string(partitionSettings.getDepthLimit()) + "." : "") << '\n');
376
378 storm::utility::Stopwatch watch(true);
379 std::unique_ptr<storm::modelchecker::CheckResult> result = storm::api::checkAndRefineRegionWithSparseEngine<ValueType>(
380 model, storm::api::createTask<ValueType>((property.getRawFormula()), true), regions.front(), engine, refinementThreshold, optionalDepthLimit,
381 storm::modelchecker::RegionResultHypothesis::Unknown, false, monotonicitySettings, monThresh);
382 watch.stop();
383 printInitialStatesResult<ValueType>(result, &watch);
384
385 if (parametricSettings.exportResultToFile()) {
386 storm::api::exportRegionCheckResultToFile<ValueType>(result, parametricSettings.exportResultPath());
387 }
388}
389
390template<storm::dd::DdType DdType, typename ValueType>
397
399 storm::exceptions::InvalidSettingsException, "The selected engine is not supported for parametric models.");
400 STORM_LOG_THROW(parSettings.hasOperationModeBeenSet(), storm::exceptions::InvalidSettingsException, "An operation mode must be selected with --mode");
401 std::shared_ptr<storm::models::ModelBase> model;
402 if (!buildSettings.isNoBuildModelSet()) {
403 model = storm::cli::buildModel<DdType, ValueType>(input, ioSettings, mpi);
404 }
405
406 STORM_LOG_THROW(model, storm::exceptions::InvalidSettingsException, "No input model.");
407 if (model) {
408 model->printModelInformationToStream(std::cout);
409 }
410
411 // If minimization is active and the model is parametric, parameters might be minimized away because they are inconsequential.
412 // This is the set of all such inconsequential parameters.
413 std::set<RationalFunctionVariable> omittedParameters;
414
415 if (model) {
416 auto preprocessingResult = storm::pars::preprocessModel<DdType, ValueType>(model, input, mpi);
417 if (preprocessingResult.changed) {
418 if (model->isOfType(models::ModelType::Dtmc) || model->isOfType(models::ModelType::Mdp)) {
419 auto const previousParams = storm::models::sparse::getAllParameters(*model->template as<storm::models::sparse::Model<ValueType>>());
420 auto const currentParams =
421 storm::models::sparse::getAllParameters(*(preprocessingResult.model)->template as<storm::models::sparse::Model<ValueType>>());
422 for (auto const& variable : previousParams) {
423 if (!currentParams.count(variable)) {
424 omittedParameters.insert(variable);
425 }
426 }
427 }
428 model = preprocessingResult.model;
429
430 if (preprocessingResult.formulas) {
431 std::vector<storm::jani::Property> newProperties;
432 for (size_t i = 0; i < preprocessingResult.formulas.get().size(); ++i) {
433 auto formula = preprocessingResult.formulas.get().at(i);
434 STORM_LOG_ASSERT(i < input.properties.size(), "Index " << i << " greater than number of properties.");
435 storm::jani::Property property = input.properties.at(i);
436 newProperties.push_back(storm::jani::Property(property.getName(), formula, property.getUndefinedConstants(), property.getComment()));
437 }
438 input.properties = newProperties;
439 }
440 model->printModelInformationToStream(std::cout);
441 }
442 }
443
444 std::vector<storm::storage::ParameterRegion<ValueType>> regions = parseRegions<ValueType>(model);
445 if (!model) {
446 return;
447 } else {
448 storm::cli::exportModel<DdType, ValueType>(model, input);
449 }
450
451 // TODO move this.
452 storm::api::MonotonicitySetting monotonicitySettings(parSettings.isUseMonotonicitySet(), false, monSettings.isUsePLABoundsSet());
453 uint64_t monThresh = monSettings.getMonotonicityThreshold();
454
455 auto mode = parSettings.getOperationMode();
457 STORM_LOG_INFO("Solution function mode started.");
458 STORM_LOG_THROW(regions.empty(), storm::exceptions::InvalidSettingsException,
459 "Solution function computations cannot be restricted to specific regions");
460
461 if (model->isSparseModel()) {
463 } else {
465 }
467 STORM_LOG_INFO("Monotonicity mode started.");
468 STORM_LOG_THROW(model->isSparseModel(), storm::exceptions::InvalidSettingsException, "Monotonicity analysis is only supported on sparse models.");
471 STORM_LOG_INFO("Feasibility mode started.");
472 STORM_LOG_THROW(model->isSparseModel(), storm::exceptions::InvalidSettingsException, "Feasibility analysis is only supported on sparse models.");
473 std::vector<std::shared_ptr<storm::logic::Formula const>> formulas = storm::api::extractFormulasFromProperties(input.properties);
474 STORM_LOG_THROW(formulas.size() == 1, storm::exceptions::InvalidSettingsException,
475 "Feasibility analysis is only supported for single-objective properties.");
476 auto formula = formulas[0];
477 storm::pars::performFeasibility<ValueType>(model->as<storm::models::sparse::Model<ValueType>>(),
478 createFeasibilitySynthesisTaskFromSettings(formula, regions), omittedParameters, monotonicitySettings);
480 STORM_LOG_INFO("Verification mode started.");
481 STORM_LOG_THROW(input.properties.size() == 1, storm::exceptions::InvalidSettingsException,
482 "Verification analysis is only supported for single-objective properties.");
483 STORM_LOG_THROW(model->isSparseModel(), storm::exceptions::InvalidSettingsException, "Verification analysis is only supported on sparse models.");
484 verifyRegionWithSparseEngine(model->as<storm::models::sparse::Model<ValueType>>(), input, regions, monotonicitySettings);
485
487 STORM_LOG_INFO("Partition mode started.");
488 STORM_LOG_THROW(model->isSparseModel(), storm::exceptions::InvalidSettingsException,
489 "Parameter space partitioning is only supported on sparse models.");
490 STORM_LOG_THROW(regions.size() == 1, storm::exceptions::InvalidSettingsException, "Partitioning requires a (single) initial region.");
491
492 // TODO Partition mode does not support monotonicity. This should generally be possible.
493 // TODO here setting monotone parameters from the outside may actually be useful
494
495 assert(!monotonicitySettings.useOnlyGlobalMonotonicity);
496 assert(!monotonicitySettings.useBoundsFromPLA);
498 monThresh);
500 STORM_LOG_INFO("Sampling mode started.");
501 STORM_LOG_THROW(model->isSparseModel(), storm::exceptions::InvalidSettingsException, "Sampling analysis is currently only supported on sparse models.");
502 // TODO unclear why this only works for sparse models?
503
504 std::string samplesAsString = sampleSettings.getSamples();
506 if (!samplesAsString.empty()) {
507 samples = parseSamples<ValueType>(model, samplesAsString, sampleSettings.isSamplesAreGraphPreservingSet());
508 samples.exact = sampleSettings.isSampleExactSet();
509 }
510 if (!samples.empty()) {
511 STORM_LOG_TRACE("Sampling the model at given points.");
512
513 if (samples.exact) {
514 verifyPropertiesAtSamplePointsWithSparseEngine<ValueType, storm::RationalNumber>(model->as<storm::models::sparse::Model<ValueType>>(), input,
515 samples);
516 } else {
517 verifyPropertiesAtSamplePointsWithSparseEngine<ValueType, double>(model->as<storm::models::sparse::Model<ValueType>>(), input, samples);
518 }
519 }
520 } else {
521 STORM_LOG_ASSERT(false, "Unknown operation mode.");
522 }
523}
524
527 auto engine = coreSettings.getEngine();
529 engine != storm::utility::Engine::Dd || engine != storm::utility::Engine::Hybrid || coreSettings.getDdLibraryType() == storm::dd::DdType::Sylvan,
530 "The selected DD library does not support parametric models. Switching to Sylvan...");
531
532 // Parse and preprocess symbolic input (PRISM, JANI, properties, etc.)
533 auto symbolicInput = storm::cli::parseSymbolicInput();
535 std::tie(symbolicInput, mpi) = storm::cli::preprocessSymbolicInput(symbolicInput);
536 processInputWithValueTypeAndDdlib<storm::dd::DdType::Sylvan, storm::RationalFunction>(symbolicInput, mpi);
537}
538} // namespace pars
539} // namespace storm
540
544int main(const int argc, const char** argv) {
545 try {
546 return storm::cli::process("Storm-pars", "storm-pars", storm::settings::initializeParsSettings, storm::pars::processOptions, argc, argv);
547 } catch (storm::exceptions::BaseException const& exception) {
548 STORM_LOG_ERROR("An exception caused Storm-pars to terminate. The message of the exception is: " << exception.what());
549 return 1;
550 } catch (std::exception const& exception) {
551 STORM_LOG_ERROR("An unexpected exception occurred and caused Storm-pars to terminate. The message of this exception is: " << exception.what());
552 return 2;
553 }
554}
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 represents a discrete-time Markov chain.
Definition Dtmc.h:14
This class represents a Markov automaton.
This class represents a (discrete-time) Markov decision process.
Definition Mdp.h:14
Base class for all sparse models.
Definition Model.h:33
storm::storage::SparseMatrix< ValueType > const & getTransitionMatrix() const
Retrieves the matrix representing the transitions of the model.
Definition Model.cpp:197
Base class for all symbolic models.
Definition Model.h:46
void eliminateState(storm::storage::sparse::state_type state, bool removeForwardTransitions)
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
void complement()
Negates all bits in the bit vector.
void set(uint_fast64_t index, bool value=true)
Sets the given truth value at the given index.
The flexible sparse matrix is used during state elimination.
storm::storage::SparseMatrix< ValueType > createSparseMatrix()
Creates a sparse matrix from the flexible sparse matrix.
row_type & getRow(index_type)
Returns an object representing the given row.
A class that holds a possibly non-square matrix in the compressed row storage format.
This class represents the decomposition of a graph-like structure into its strongly connected compone...
std::shared_ptr< storm::models::sparse::Dtmc< RationalFunction > > transform(storm::models::sparse::Dtmc< RationalFunction > const &dtmc, bool keepStateValuations=false) const
Transforms a pDTMC that has linear transitions (e.g.
This class performs different steps to simplify the given (parametric) model.
This class performs different steps to simplify the given (parametric) model.
models::sparse::Dtmc< RationalFunction > timeTravel(models::sparse::Dtmc< RationalFunction > const &model, modelchecker::CheckTask< logic::Formula, RationalFunction > const &checkTask)
Perform time-travelling on the given model and the given checkTask.
A class that provides convenience operations to display run times.
Definition Stopwatch.h:14
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_TRACE(message)
Definition logging.h:17
#define STORM_LOG_ERROR(message)
Definition logging.h:31
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:38
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
#define STORM_PRINT_AND_LOG(message)
Definition macros.h:68
#define STORM_PRINT(message)
Define the macros that print information and optionally also log it.
Definition macros.h:62
std::pair< std::shared_ptr< storm::models::sparse::Model< ValueType > >, std::vector< std::shared_ptr< storm::logic::Formula const > > > eliminateNonMarkovianChains(std::shared_ptr< storm::models::sparse::MarkovAutomaton< ValueType > > const &ma, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas, storm::transformer::EliminationLabelBehavior labelBehavior)
Eliminates chains of non-Markovian states from a given Markov Automaton.
std::shared_ptr< storm::models::sparse::Model< ValueType > > transformSymbolicToSparseModel(std::shared_ptr< storm::models::symbolic::Model< Type, ValueType > > const &symbolicModel, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas=std::vector< std::shared_ptr< storm::logic::Formula const > >())
Transforms the given symbolic model to a sparse model.
std::pair< std::shared_ptr< storm::models::sparse::Model< ValueType > >, std::vector< std::shared_ptr< storm::logic::Formula const > > > transformContinuousToDiscreteTimeSparseModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas)
Transforms the given continuous model to a discrete time model.
std::vector< std::shared_ptr< storm::logic::Formula const > > extractFormulasFromProperties(std::vector< storm::jani::Property > const &properties)
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::shared_ptr< storm::models::sparse::Model< ValueType > > preprocessSparseMarkovAutomaton(std::shared_ptr< storm::models::sparse::MarkovAutomaton< ValueType > > const &model)
std::pair< SymbolicInput, ModelProcessingInformation > preprocessSymbolicInput(SymbolicInput const &input)
void printModelCheckingProperty(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)
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)
std::set< storm::RationalFunctionVariable > getAllParameters(Model< storm::RationalFunction > const &model)
Get all parameters (probability, rewards, and rates) occurring in the model.
Definition Model.cpp:728
std::shared_ptr< storm::models::ModelBase > simplifyModel(std::shared_ptr< storm::models::ModelBase > const &model, cli::SymbolicInput const &input)
void parameterSpacePartitioningWithSparseEngine(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, cli::SymbolicInput const &input, std::vector< storm::storage::ParameterRegion< ValueType > > const &regions, storm::api::MonotonicitySetting monotonicitySettings=storm::api::MonotonicitySetting(), uint64_t monThresh=0)
void analyzeMonotonicity(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, cli::SymbolicInput const &input, std::vector< storm::storage::ParameterRegion< ValueType > > const &regions)
void processOptions()
PreprocessResult preprocessSparseModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, cli::SymbolicInput const &input, storm::cli::ModelProcessingInformation const &mpi)
std::shared_ptr< storm::models::ModelBase > eliminateScc(std::shared_ptr< storm::models::ModelBase > const &model)
void processInputWithValueTypeAndDdlib(cli::SymbolicInput &input, storm::cli::ModelProcessingInformation const &mpi)
void computeSolutionFunctionsWithSymbolicEngine(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &model, cli::SymbolicInput const &input)
PreprocessResult preprocessDdModel(std::shared_ptr< storm::models::symbolic::Model< DdType, ValueType > > const &model, cli::SymbolicInput const &input, storm::cli::ModelProcessingInformation const &mpi)
PreprocessResult preprocessModel(std::shared_ptr< storm::models::ModelBase > const &model, cli::SymbolicInput const &input, storm::cli::ModelProcessingInformation const &mpi)
void verifyRegionWithSparseEngine(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, cli::SymbolicInput const &input, std::vector< storm::storage::ParameterRegion< ValueType > > const &regions, storm::api::MonotonicitySetting monotonicitySettings=storm::api::MonotonicitySetting())
std::vector< storm::storage::ParameterRegion< ValueType > > parseRegions(std::shared_ptr< storm::models::ModelBase > const &model)
std::shared_ptr< FeasibilitySynthesisTask const > createFeasibilitySynthesisTaskFromSettings(std::shared_ptr< storm::logic::Formula const > const &formula, std::vector< storm::storage::ParameterRegion< storm::RationalFunction > > const &regions)
void computeSolutionFunctionsWithSparseEngine(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, cli::SymbolicInput const &input)
void initializeParsSettings(std::string const &name, std::string const &executableName)
SettingsType const & getModule()
Get module.
LabParser.cpp.
Definition cli.cpp:18
int main(const int argc, const char **argv)
Main entry point of the executable storm-pars.
std::vector< storm::jani::Property > properties
boost::optional< std::vector< std::shared_ptr< storm::logic::Formula const > > > formulas
PreprocessResult(std::shared_ptr< storm::models::ModelBase > const &model, bool changed)
std::shared_ptr< storm::models::ModelBase > model