Browse Source

Slight refactoring of transformations

main
Matthias Volk 6 years ago
parent
commit
e4e069a98c
  1. 18
      src/storm-cli-utilities/model-handling.h
  2. 85
      src/storm-dft-cli/storm-dft.cpp
  3. 66
      src/storm-dft/api/storm-dft.h
  4. 1
      src/storm-dft/transformations/DftTransformator.cpp
  5. 2
      src/storm-dft/transformations/DftTransformator.h
  6. 45
      src/storm/api/transformation.h
  7. 27
      src/storm/transformer/NonMarkovianChainTransformer.h

18
src/storm-cli-utilities/model-handling.h

@ -326,12 +326,20 @@ namespace storm {
template <typename ValueType>
std::shared_ptr<storm::models::sparse::Model<ValueType>> preprocessSparseMarkovAutomaton(std::shared_ptr<storm::models::sparse::MarkovAutomaton<ValueType>> const& model) {
auto transformationSettings = storm::settings::getModule<storm::settings::modules::TransformationSettings>();
std::shared_ptr<storm::models::sparse::Model<ValueType>> result = model;
model->close();
if (model->isConvertibleToCtmc()) {
STORM_LOG_WARN_COND(false, "MA is convertible to a CTMC, consider using a CTMC instead.");
result = model->convertToCtmc();
}
if (transformationSettings.isChainEliminationSet() && result->isOfType(storm::models::ModelType::MarkovAutomaton)) {
result = storm::transformer::NonMarkovianChainTransformer<ValueType>::eliminateNonmarkovianStates(
result->template as<storm::models::sparse::MarkovAutomaton<ValueType>>(), !transformationSettings.isIgnoreLabelingSet());
}
return result;
}
@ -351,18 +359,12 @@ namespace storm {
auto generalSettings = storm::settings::getModule<storm::settings::modules::GeneralSettings>();
auto bisimulationSettings = storm::settings::getModule<storm::settings::modules::BisimulationSettings>();
auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
auto transformationSettings = storm::settings::getModule<storm::settings::modules::TransformationSettings>();
std::pair<std::shared_ptr<storm::models::sparse::Model<ValueType>>, bool> result = std::make_pair(model, false);
if (result.first->isOfType(storm::models::ModelType::MarkovAutomaton)) {
result.first = preprocessSparseMarkovAutomaton(result.first->template as<storm::models::sparse::MarkovAutomaton<ValueType>>());
if (transformationSettings.isChainEliminationSet() &&
result.first->isOfType(storm::models::ModelType::MarkovAutomaton)) {
result.first = storm::transformer::NonMarkovianChainTransformer<ValueType>::eliminateNonmarkovianStates(
result.first->template as<storm::models::sparse::MarkovAutomaton<ValueType>>(),
!transformationSettings.isIgnoreLabelingSet());
}
result.second = true;
}

85
src/storm-dft-cli/storm-dft.cpp

@ -14,7 +14,6 @@
#include "storm/utility/initialize.h"
#include "storm-cli-utilities/cli.h"
#include "storm-parsers/api/storm-parsers.h"
#include "storm-dft/transformations/DftTransformator.h"
/*!
@ -25,52 +24,40 @@ void processOptions() {
// Start by setting some urgent options (log levels, resources, etc.)
storm::cli::setUrgentOptions();
storm::settings::modules::DftIOSettings const& dftIOSettings = storm::settings::getModule<storm::settings::modules::DftIOSettings>();
storm::settings::modules::FaultTreeSettings const& faultTreeSettings = storm::settings::getModule<storm::settings::modules::FaultTreeSettings>();
storm::settings::modules::IOSettings const& ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
storm::settings::modules::DftGspnSettings const& dftGspnSettings = storm::settings::getModule<storm::settings::modules::DftGspnSettings>();
storm::settings::modules::TransformationSettings const &transformationSettings = storm::settings::getModule<storm::settings::modules::TransformationSettings>();
auto dftTransformator = storm::transformations::dft::DftTransformator<ValueType>();
if (!dftIOSettings.isDftFileSet() && !dftIOSettings.isDftJsonFileSet()) {
STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "No input model given.");
}
auto const& dftIOSettings = storm::settings::getModule<storm::settings::modules::DftIOSettings>();
auto const& faultTreeSettings = storm::settings::getModule<storm::settings::modules::FaultTreeSettings>();
auto const& ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
auto const& dftGspnSettings = storm::settings::getModule<storm::settings::modules::DftGspnSettings>();
auto const& transformationSettings = storm::settings::getModule<storm::settings::modules::TransformationSettings>();
// Build DFT from given file
std::shared_ptr<storm::storage::DFT<ValueType>> dft;
if (dftIOSettings.isDftJsonFileSet()) {
STORM_LOG_DEBUG("Loading DFT from file " << dftIOSettings.getDftJsonFilename());
if (dftIOSettings.isDftFileSet()) {
STORM_LOG_DEBUG("Loading DFT from Galileo file " << dftIOSettings.getDftFilename());
dft = storm::api::loadDFTGalileoFile<ValueType>(dftIOSettings.getDftFilename());
} else if (dftIOSettings.isDftJsonFileSet()) {
STORM_LOG_DEBUG("Loading DFT from Json file " << dftIOSettings.getDftJsonFilename());
dft = storm::api::loadDFTJsonFile<ValueType>(dftIOSettings.getDftJsonFilename());
} else {
STORM_LOG_DEBUG("Loading DFT from file " << dftIOSettings.getDftFilename());
dft = storm::api::loadDFTGalileoFile<ValueType>(dftIOSettings.getDftFilename());
STORM_LOG_THROW(false, storm::exceptions::InvalidSettingsException, "No input model given.");
}
// DFT statistics
if (dftIOSettings.isDisplayStatsSet()) {
dft->writeStatsToStream(std::cout);
}
// Export to json
if (dftIOSettings.isExportToJson()) {
// Export to json
storm::api::exportDFTToJsonFile<ValueType>(*dft, dftIOSettings.getExportJsonFilename());
}
// Limit to one constantly failed BE
if (faultTreeSettings.isUniqueFailedBE()) {
dft = dftTransformator.transformUniqueFailedBe(*dft);
}
// Eliminate non-binary dependencies
if (!dft->getDependencies().empty()) {
dft = dftTransformator.transformBinaryFDEPs(*dft);
}
// Check well-formedness of DFT
auto wellFormedResult = storm::api::isWellFormed(*dft, false);
STORM_LOG_THROW(wellFormedResult.first, storm::exceptions::UnmetRequirementException, "DFT is not well-formed: " << wellFormedResult.second);
// Transformation to GSPN
if (dftGspnSettings.isTransformToGspn()) {
// Transform to GSPN
std::pair<std::shared_ptr<storm::gspn::GSPN>, uint64_t> pair = storm::api::transformToGSPN(*dft);
std::shared_ptr<storm::gspn::GSPN> gspn = pair.first;
uint64_t toplevelFailedPlace = pair.second;
@ -79,13 +66,13 @@ void processOptions() {
storm::api::handleGSPNExportSettings(*gspn);
// Transform to Jani
// TODO analyse Jani model
std::shared_ptr<storm::jani::Model> model = storm::api::transformToJani(*gspn, toplevelFailedPlace);
return;
}
// SMT
// Export to SMT
if (dftIOSettings.isExportToSmt()) {
// Export to smtlib2
storm::api::exportDFTToSMT<ValueType>(*dft, dftIOSettings.getExportSmtFilename());
return;
}
@ -95,35 +82,35 @@ void processOptions() {
#ifdef STORM_HAVE_Z3
if (faultTreeSettings.solveWithSMT()) {
useSMT = true;
STORM_PRINT("Use SMT for preprocessing" << std::endl)
STORM_LOG_DEBUG("Use SMT for preprocessing");
}
#endif
// Apply transformations
// TODO transform later before actual analysis
dft = storm::api::applyTransformations(*dft, faultTreeSettings.isUniqueFailedBE(), true);
dft->setDynamicBehaviorInfo();
storm::api::PreprocessingResult preResults;
preResults.lowerBEBound = storm::dft::utility::FailureBoundFinder::getLeastFailureBound(*dft, useSMT,
solverTimeout);
preResults.upperBEBound = storm::dft::utility::FailureBoundFinder::getAlwaysFailedBound(*dft, useSMT,
solverTimeout);
STORM_LOG_DEBUG("BE FAILURE BOUNDS" << std::endl << "========================================" << std::endl <<
// TODO: always needed?
preResults.lowerBEBound = storm::dft::utility::FailureBoundFinder::getLeastFailureBound(*dft, useSMT, solverTimeout);
preResults.upperBEBound = storm::dft::utility::FailureBoundFinder::getAlwaysFailedBound(*dft, useSMT, solverTimeout);
STORM_LOG_DEBUG("BE failure bounds" << std::endl << "========================================" << std::endl <<
"Lower bound: " << std::to_string(preResults.lowerBEBound) << std::endl <<
"Upper bound: " << std::to_string(preResults.upperBEBound) << std::endl);
"Upper bound: " << std::to_string(preResults.upperBEBound));
// TODO: move into API call?
preResults.fdepConflicts = storm::dft::utility::FDEPConflictFinder<ValueType>::getDependencyConflicts(*dft, useSMT, solverTimeout);
if (preResults.fdepConflicts.empty()) {
STORM_LOG_DEBUG("No FDEP conflicts found" << std::endl);
STORM_LOG_DEBUG("No FDEP conflicts found");
} else {
STORM_LOG_DEBUG("========================================" << std::endl <<
"FDEP CONFLICTS" << std::endl <<
"========================================"
<< std::endl);
STORM_LOG_DEBUG("========================================" << std::endl << "FDEP CONFLICTS" << std::endl << "========================================");
}
for (auto pair: preResults.fdepConflicts) {
STORM_LOG_DEBUG("Conflict between " << dft->getElement(pair.first)->name() << " and "
<< dft->getElement(pair.second)->name() << std::endl);
STORM_LOG_DEBUG("Conflict between " << dft->getElement(pair.first)->name() << " and " << dft->getElement(pair.second)->name());
}
// Set the conflict map of the dft
@ -140,16 +127,16 @@ void processOptions() {
#ifdef STORM_HAVE_Z3
if (faultTreeSettings.solveWithSMT()) {
if (useSMT) {
// Solve with SMT
STORM_LOG_DEBUG("Running DFT analysis with use of SMT" << std::endl);
STORM_LOG_DEBUG("Running DFT analysis with use of SMT");
// Set dynamic behavior vector
storm::api::analyzeDFTSMT(*dft, true);
}
#endif
// From now on we analyse DFT via model checking
// From now on we analyse the DFT via model checking
// Set min or max
std::string optimizationDirection = "min";
@ -256,10 +243,8 @@ void processOptions() {
approximationError = faultTreeSettings.getApproximationError();
}
storm::api::analyzeDFT<ValueType>(*dft, props, faultTreeSettings.useSymmetryReduction(), faultTreeSettings.useModularisation(), relevantEvents,
faultTreeSettings.isAllowDCForRelevantEvents(), approximationError,
faultTreeSettings.getApproximationHeuristic(),
transformationSettings.isChainEliminationSet(),
transformationSettings.isIgnoreLabelingSet(), true);
faultTreeSettings.isAllowDCForRelevantEvents(), approximationError, faultTreeSettings.getApproximationHeuristic(),
transformationSettings.isChainEliminationSet(), transformationSettings.isIgnoreLabelingSet(), true);
}
}

66
src/storm-dft/api/storm-dft.h

@ -9,6 +9,7 @@
#include "storm-dft/modelchecker/dft/DFTModelChecker.h"
#include "storm-dft/modelchecker/dft/DFTASFChecker.h"
#include "storm-dft/transformations/DftToGspnTransformator.h"
#include "storm-dft/transformations/DftTransformator.h"
#include "storm-dft/utility/FDEPConflictFinder.h"
#include "storm-dft/utility/FailureBoundFinder.h"
@ -70,6 +71,52 @@ namespace storm {
return std::pair<bool, std::string>(wellFormed, stream.str());
}
/*!
* Apply transformations for DFT.
*
* @param dft DFT.
* @param uniqueBE Flag whether a unique constant failed BE is created.
* @param binaryFDEP Flag whether all dependencies should be binary (only one dependent child).
* @return Transformed DFT.
*/
template<typename ValueType>
std::shared_ptr<storm::storage::DFT<ValueType>> applyTransformations(storm::storage::DFT<ValueType> const& dft, bool uniqueBE, bool binaryFDEP) {
std::shared_ptr<storm::storage::DFT<ValueType>> transformedDFT = std::make_shared<storm::storage::DFT<ValueType>>(dft);
auto dftTransformator = storm::transformations::dft::DftTransformator<ValueType>();
if (uniqueBE) {
transformedDFT = dftTransformator.transformUniqueFailedBe(*transformedDFT);
}
if (binaryFDEP && !dft.getDependencies().empty()) {
transformedDFT = dftTransformator.transformBinaryFDEPs(*transformedDFT);
}
return transformedDFT;
}
template <typename ValueType>
bool computeDependencyConflicts(storm::storage::DFT<ValueType> const& dft, bool useSMT, double solverTimeout) {
std::vector<std::pair<uint64_t, uint64_t>> fdepConflicts = storm::dft::utility::FDEPConflictFinder<ValueType>::getDependencyConflicts(*dft, useSMT, solverTimeout);
if (fdepConflicts.empty()) {
return false;
}
for (auto pair: fdepConflicts) {
STORM_LOG_DEBUG("Conflict between " << dft.getElement(pair.first)->name() << " and " << dft.getElement(pair.second)->name());
}
// Set the conflict map of the dft
std::set<size_t> conflict_set;
for (auto conflict : fdepConflicts) {
conflict_set.insert(size_t(conflict.first));
conflict_set.insert(size_t(conflict.second));
}
for (size_t depId : dft->getDependencies()) {
if (!conflict_set.count(depId)) {
dft->setDependencyNotInConflict(depId);
}
}
return true;
}
/*!
* Compute the exact or approximate analysis result of the given DFT according to the given properties.
* First the Markov model is built from the DFT and then this model is checked against the given properties.
@ -82,8 +129,8 @@ namespace storm {
* @param allowDCForRelevantEvents If true, Don't Care propagation is allowed even for relevant events.
* @param approximationError Allowed approximation error. Value 0 indicates no approximation.
* @param approximationHeuristic Heuristic used for state space exploration.
* @param eliminateChains If true, chains of non-Markovian states are elimianted from the resulting MA
* @param ignoreLabeling If true, the labeling of states is ignored during state elimination
* @param eliminateChains If true, chains of non-Markovian states are eliminated from the resulting MA.
* @param ignoreLabeling If true, the labeling of states is ignored during state elimination.
* @param printOutput If true, model information, timings, results, etc. are printed.
* @return Results.
*/
@ -91,14 +138,12 @@ namespace storm {
typename storm::modelchecker::DFTModelChecker<ValueType>::dft_results
analyzeDFT(storm::storage::DFT<ValueType> const& dft, std::vector<std::shared_ptr<storm::logic::Formula const>> const& properties, bool symred = true,
bool allowModularisation = true, std::set<size_t> const& relevantEvents = {}, bool allowDCForRelevantEvents = true, double approximationError = 0.0,
storm::builder::ApproximationHeuristic approximationHeuristic = storm::builder::ApproximationHeuristic::DEPTH,
bool eliminateChains = false, bool ignoreLabeling = false, bool printOutput = false) {
storm::builder::ApproximationHeuristic approximationHeuristic = storm::builder::ApproximationHeuristic::DEPTH, bool eliminateChains = false,
bool ignoreLabeling = false, bool printOutput = false) {
storm::modelchecker::DFTModelChecker<ValueType> modelChecker(printOutput);
typename storm::modelchecker::DFTModelChecker<ValueType>::dft_results results = modelChecker.check(dft, properties, symred, allowModularisation, relevantEvents,
allowDCForRelevantEvents, approximationError,
approximationHeuristic,
eliminateChains,
ignoreLabeling);
allowDCForRelevantEvents, approximationError, approximationHeuristic,
eliminateChains, ignoreLabeling);
if (printOutput) {
modelChecker.printTimings();
modelChecker.printResults(results);
@ -114,8 +159,7 @@ namespace storm {
* @return Result result vector
*/
template<typename ValueType>
void
analyzeDFTSMT(storm::storage::DFT<ValueType> const &dft, bool printOutput);
void analyzeDFTSMT(storm::storage::DFT<ValueType> const& dft, bool printOutput);
/*!
* Export DFT to JSON file.
@ -142,7 +186,7 @@ namespace storm {
* @param file File.
*/
template<typename ValueType>
void exportDFTToSMT(storm::storage::DFT<ValueType> const &dft, std::string const &file);
void exportDFTToSMT(storm::storage::DFT<ValueType> const& dft, std::string const& file);
/*!
* Transform DFT to GSPN.

1
src/storm-dft/transformations/DftTransformator.cpp

@ -4,6 +4,7 @@
namespace storm {
namespace transformations {
namespace dft {
template<typename ValueType>
DftTransformator<ValueType>::DftTransformator() {
}

2
src/storm-dft/transformations/DftTransformator.h

@ -1,3 +1,5 @@
#pragma once
#include "storm-dft/storage/dft/DFT.h"
#include "storm-dft/builder/DFTBuilder.h"
#include "storm/utility/macros.h"

45
src/storm/api/transformation.h

@ -16,21 +16,11 @@ namespace storm {
* Eliminates chains of non-Markovian states from a given Markov Automaton
*/
template<typename ValueType>
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,
bool ignoreLabeling) {
auto newFormulas = storm::transformer::NonMarkovianChainTransformer<ValueType>::checkAndTransformFormulas(
formulas);
STORM_LOG_WARN_COND(newFormulas.size() == formulas.size(),
"The state elimination does not preserve all properties.");
STORM_LOG_WARN_COND(!ignoreLabeling,
"Labels are ignored for the state elimination. This may cause incorrect results.");
return std::make_pair(
storm::transformer::NonMarkovianChainTransformer<ValueType>::eliminateNonmarkovianStates(ma,
!ignoreLabeling),
newFormulas);
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,bool ignoreLabeling) {
auto newFormulas = storm::transformer::NonMarkovianChainTransformer<ValueType>::checkAndTransformFormulas(formulas);
STORM_LOG_WARN_COND(newFormulas.size() == formulas.size(), "The state elimination does not preserve all properties.");
STORM_LOG_WARN_COND(!ignoreLabeling, "Labels are ignored for the state elimination. This may cause incorrect results.");
return std::make_pair(storm::transformer::NonMarkovianChainTransformer<ValueType>::eliminateNonmarkovianStates(ma, !ignoreLabeling), newFormulas);
}
@ -40,17 +30,17 @@ namespace storm {
* If such a transformation does not preserve one of the given formulas, a warning is issued.
*/
template <typename ValueType>
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) {
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) {
storm::transformer::ContinuousToDiscreteTimeModelTransformer<ValueType> transformer;
std::string timeRewardName = "_time";
while(model->hasRewardModel(timeRewardName)) {
timeRewardName += "_";
}
auto newFormulas = transformer.checkAndTransformFormulas(formulas, timeRewardName);
STORM_LOG_WARN_COND(newFormulas.size() == formulas.size(), "Transformation of a " << model->getType() << " to a discrete time model does not preserve all properties.");
if (model->isOfType(storm::models::ModelType::Ctmc)) {
return std::make_pair(transformer.transform(*model->template as<storm::models::sparse::Ctmc<ValueType>>(), timeRewardName), newFormulas);
} else if (model->isOfType(storm::models::ModelType::MarkovAutomaton)) {
@ -68,16 +58,16 @@ namespace storm {
*/
template <typename ValueType>
std::pair<std::shared_ptr<storm::models::sparse::Model<ValueType>>, std::vector<std::shared_ptr<storm::logic::Formula const>>> transformContinuousToDiscreteTimeSparseModel(storm::models::sparse::Model<ValueType>&& model, std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas) {
storm::transformer::ContinuousToDiscreteTimeModelTransformer<ValueType> transformer;
std::string timeRewardName = "_time";
while(model.hasRewardModel(timeRewardName)) {
timeRewardName += "_";
}
auto newFormulas = transformer.checkAndTransformFormulas(formulas, timeRewardName);
STORM_LOG_WARN_COND(newFormulas.size() == formulas.size(), "Transformation of a " << model.getType() << " to a discrete time model does not preserve all properties.");
if (model.isOfType(storm::models::ModelType::Ctmc)) {
return std::make_pair(transformer.transform(std::move(*model.template as<storm::models::sparse::Ctmc<ValueType>>()), timeRewardName), newFormulas);
} else if (model.isOfType(storm::models::ModelType::MarkovAutomaton)) {
@ -86,9 +76,9 @@ namespace storm {
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Transformation of a " << model.getType() << " to a discrete time model is not supported.");
}
return std::make_pair(nullptr, newFormulas);;
}
template <typename ValueType>
std::shared_ptr<storm::logic::Formula const> checkAndTransformContinuousToDiscreteTimeFormula(storm::logic::Formula const& formula, std::string const& timeRewardName = "_time") {
storm::transformer::ContinuousToDiscreteTimeModelTransformer<ValueType> transformer;
@ -99,8 +89,7 @@ namespace storm {
}
return nullptr;
}
/*!
* Transforms the given symbolic model to a sparse model.
*/
@ -118,7 +107,7 @@ namespace storm {
}
return nullptr;
}
template <typename ValueType>
std::shared_ptr<storm::models::sparse::Model<ValueType>> transformToNondeterministicModel(storm::models::sparse::Model<ValueType>&& model) {
storm::storage::sparse::ModelComponents<ValueType> components(std::move(model.getTransitionMatrix()), std::move(model.getStateLabeling()), std::move(model.getRewardModels()));
@ -135,6 +124,6 @@ namespace storm {
STORM_LOG_THROW(false, storm::exceptions::InvalidOperationException, "Cannot transform model of type " << model.getType() << " to a nondeterministic model.");
}
}
}
}

27
src/storm/transformer/NonMarkovianChainTransformer.h

@ -4,7 +4,7 @@
namespace storm {
namespace transformer {
/**
* Transformer for eliminating chains of non-Markovian states (instantaneous path fragment leading to the same outcome) from Markov Automata
* Transformer for eliminating chains of non-Markovian states (instantaneous path fragment leading to the same outcome) from Markov automata.
*/
template<typename ValueType, typename RewardModelType = storm::models::sparse::StandardRewardModel<ValueType>>
class NonMarkovianChainTransformer {
@ -14,32 +14,29 @@ namespace storm {
* Generates a model with the same basic behavior as the input, but eliminates non-Markovian chains.
* If no non-determinism occurs, a CTMC is generated.
*
* @param ma the input Markov Automaton
* @param preserveLabels if set, the procedure considers the labels of non-Markovian states when eliminating states
* @return a reference to the new Mmodel after eliminating non-Markovian states
* @param ma The input Markov Automaton.
* @param preserveLabels If set, the procedure considers the labels of non-Markovian states when eliminating states.
* @return A reference to the new model after eliminating non-Markovian states.
*/
static std::shared_ptr<
models::sparse::Model < ValueType, RewardModelType>> eliminateNonmarkovianStates(std::shared_ptr<
models::sparse::MarkovAutomaton < ValueType, RewardModelType>> ma,
bool preserveLabels = true
static std::shared_ptr<models::sparse::Model<ValueType, RewardModelType>> eliminateNonmarkovianStates(
std::shared_ptr<models::sparse::MarkovAutomaton<ValueType, RewardModelType>> ma, bool preserveLabels = true
);
/**
* Check if the property specified by the given formula is preserved by the transformation.
*
* @param formula the formula to check
* @return true, if the property is preserved
* @param formula The formula to check.
* @return True, if the property is preserved.
*/
static bool preservesFormula(storm::logic::Formula const &formula);
static bool preservesFormula(storm::logic::Formula const& formula);
/**
* Checks for the given formulae if the specified properties are preserved and removes formulae of properties which are not preserved.
*
* @param formulas
* @return vector containing all fomulae which are valid for the transformed model
* @param formulas Formulae.
* @return Vector containing all fomulae which are valid for the transformed model.
*/
static std::vector<std::shared_ptr<storm::logic::Formula const>>
checkAndTransformFormulas(std::vector<std::shared_ptr<storm::logic::Formula const>> const &formulas);
static std::vector<std::shared_ptr<storm::logic::Formula const>> checkAndTransformFormulas(std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas);
};
}
}

Loading…
Cancel
Save