Browse Source

Remove allowDCForRelevant from RelevantEvents

tempestpy_adaptions
Daniel Basgöze 4 years ago
committed by Matthias Volk
parent
commit
7a2b060afc
  1. 4
      src/storm-dft-cli/storm-dft.cpp
  2. 10
      src/storm-dft/api/storm-dft.h
  3. 22
      src/storm-dft/modelchecker/dft/DFTModelChecker.cpp
  4. 23
      src/storm-dft/modelchecker/dft/DFTModelChecker.h
  5. 4
      src/storm-dft/storage/dft/DFT.cpp
  6. 3
      src/storm-dft/storage/dft/DFT.h
  7. 10
      src/storm-dft/utility/RelevantEvents.h
  8. 4
      src/test/storm-dft/api/DftApproximationTest.cpp
  9. 28
      src/test/storm-dft/api/DftModelBuildingTest.cpp
  10. 4
      src/test/storm-dft/api/DftModelCheckerTest.cpp
  11. 4
      src/test/storm-dft/simulator/DftSimulatorTest.cpp
  12. 4
      src/test/storm-dft/simulator/DftTraceGeneratorTest.cpp

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

@ -171,7 +171,7 @@ void processOptions() {
// All events are relevant
additionalRelevantEventNames = {"all"};
}
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<ValueType>(*dft, props, additionalRelevantEventNames, faultTreeSettings.isAllowDCForRelevantEvents());
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<ValueType>(*dft, props, additionalRelevantEventNames);
// Analyze DFT
@ -183,7 +183,7 @@ void processOptions() {
if (faultTreeSettings.isApproximationErrorSet()) {
approximationError = faultTreeSettings.getApproximationError();
}
storm::api::analyzeDFT<ValueType>(*dft, props, faultTreeSettings.useSymmetryReduction(), faultTreeSettings.useModularisation(), relevantEvents, approximationError, faultTreeSettings.getApproximationHeuristic(), transformationSettings.isChainEliminationSet(), transformationSettings.getLabelBehavior(), true);
storm::api::analyzeDFT<ValueType>(*dft, props, faultTreeSettings.useSymmetryReduction(), faultTreeSettings.useModularisation(), relevantEvents, faultTreeSettings.isAllowDCForRelevantEvents(), approximationError, faultTreeSettings.getApproximationHeuristic(), transformationSettings.isChainEliminationSet(), transformationSettings.getLabelBehavior(), true);
}
}

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

@ -125,12 +125,11 @@ namespace storm {
* @param dft DFT.
* @param properties List of properties. All events occurring in a property are relevant.
* @param additionalRelevantEventNames List of names of additional relevant events.
* @param allowDCForRelevant Whether to allow Don't Care propagation for relevant events.
* @return Relevant events.
*/
template<typename ValueType>
storm::utility::RelevantEvents computeRelevantEvents(storm::storage::DFT<ValueType> const& dft, std::vector<std::shared_ptr<storm::logic::Formula const>> const& properties, std::vector<std::string> const& additionalRelevantEventNames, bool allowDCForRelevant) {
storm::utility::RelevantEvents events(additionalRelevantEventNames, allowDCForRelevant);
storm::utility::RelevantEvents computeRelevantEvents(storm::storage::DFT<ValueType> const& dft, std::vector<std::shared_ptr<storm::logic::Formula const>> const& properties, std::vector<std::string> const& additionalRelevantEventNames) {
storm::utility::RelevantEvents events(additionalRelevantEventNames);
events.addNamesFromProperty(properties);
return events;
}
@ -144,6 +143,7 @@ namespace storm {
* @param symred Flag whether symmetry reduction should be used.
* @param allowModularisation Flag whether modularisation should be applied if possible.
* @param relevantEvents Relevant events which should be observed.
* @param allowDCForRelevant Whether to allow Don't Care propagation 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 eliminated from the resulting MA.
@ -153,11 +153,11 @@ namespace storm {
*/
template<typename ValueType>
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, storm::utility::RelevantEvents const& relevantEvents = storm::utility::RelevantEvents(),
analyzeDFT(storm::storage::DFT<ValueType> const& dft, std::vector<std::shared_ptr<storm::logic::Formula const>> const& properties, bool symred = true, bool allowModularisation = true, storm::utility::RelevantEvents const& relevantEvents = storm::utility::RelevantEvents(), bool allowDCForRelevant = false,
double approximationError = 0.0, storm::builder::ApproximationHeuristic approximationHeuristic = storm::builder::ApproximationHeuristic::DEPTH, bool eliminateChains = false,
storm::transformer::EliminationLabelBehavior labelBehavior = storm::transformer::EliminationLabelBehavior::KeepLabels, bool printOutput = false) {
storm::modelchecker::DFTModelChecker<ValueType> modelChecker(printOutput);
typename storm::modelchecker::DFTModelChecker<ValueType>::dft_results results = modelChecker.check(dft, properties, symred, allowModularisation, relevantEvents, approximationError, approximationHeuristic, eliminateChains, labelBehavior);
typename storm::modelchecker::DFTModelChecker<ValueType>::dft_results results = modelChecker.check(dft, properties, symred, allowModularisation, relevantEvents, allowDCForRelevant, approximationError, approximationHeuristic, eliminateChains, labelBehavior);
if (printOutput) {
modelChecker.printTimings();
modelChecker.printResults(results);

22
src/storm-dft/modelchecker/dft/DFTModelChecker.cpp

@ -22,7 +22,7 @@ namespace storm {
template<typename ValueType>
typename DFTModelChecker<ValueType>::dft_results DFTModelChecker<ValueType>::check(storm::storage::DFT<ValueType> const& origDft, std::vector<std::shared_ptr<const storm::logic::Formula>> const& properties,
bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents,
bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents, bool allowDCForRelevant,
double approximationError, storm::builder::ApproximationHeuristic approximationHeuristic,
bool eliminateChains, storm::transformer::EliminationLabelBehavior labelBehavior) {
totalTimer.start();
@ -44,14 +44,14 @@ namespace storm {
// TODO: distinguish for all properties, not only for first one
if (properties[0]->isTimeOperatorFormula() && allowModularisation) {
// Use parallel composition as modularisation approach for expected time
std::shared_ptr<storm::models::sparse::Model<ValueType>> model = buildModelViaComposition(dft, properties, symred, true, relevantEvents);
std::shared_ptr<storm::models::sparse::Model<ValueType>> model = buildModelViaComposition(dft, properties, symred, true, relevantEvents, allowDCForRelevant);
// Model checking
std::vector<ValueType> resultsValue = checkModel(model, properties);
for (ValueType result : resultsValue) {
results.push_back(result);
}
} else {
results = checkHelper(dft, properties, symred, allowModularisation, relevantEvents, approximationError, approximationHeuristic, eliminateChains, labelBehavior);
results = checkHelper(dft, properties, symred, allowModularisation, relevantEvents, allowDCForRelevant, approximationError, approximationHeuristic, eliminateChains, labelBehavior);
}
totalTimer.stop();
return results;
@ -59,7 +59,7 @@ namespace storm {
template<typename ValueType>
typename DFTModelChecker<ValueType>::dft_results DFTModelChecker<ValueType>::checkHelper(storm::storage::DFT<ValueType> const& dft, property_vector const& properties,
bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents,
bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents, bool allowDCForRelevant,
double approximationError, storm::builder::ApproximationHeuristic approximationHeuristic,
bool eliminateChains, storm::transformer::EliminationLabelBehavior labelBehavior) {
STORM_LOG_TRACE("Check helper called");
@ -114,7 +114,7 @@ namespace storm {
std::vector<ValueType> res;
for (auto const ft : dfts) {
// TODO: allow approximation in modularisation
dft_results ftResults = checkHelper(ft, {property}, symred, true, relevantEvents, 0.0);
dft_results ftResults = checkHelper(ft, {property}, symred, true, relevantEvents, allowDCForRelevant, 0.0);
STORM_LOG_ASSERT(ftResults.size() == 1, "Wrong number of results");
res.push_back(boost::get<ValueType>(ftResults[0]));
}
@ -152,13 +152,13 @@ namespace storm {
return results;
} else {
// No modularisation was possible
return checkDFT(dft, properties, symred, relevantEvents, approximationError, approximationHeuristic, eliminateChains, labelBehavior);
return checkDFT(dft, properties, symred, relevantEvents, allowDCForRelevant, approximationError, approximationHeuristic, eliminateChains, labelBehavior);
}
}
template<typename ValueType>
std::shared_ptr<storm::models::sparse::Ctmc<ValueType>>
DFTModelChecker<ValueType>::buildModelViaComposition(storm::storage::DFT<ValueType> const &dft, property_vector const &properties, bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents) {
DFTModelChecker<ValueType>::buildModelViaComposition(storm::storage::DFT<ValueType> const &dft, property_vector const &properties, bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents, bool allowDCForRelevant) {
// TODO: use approximation?
STORM_LOG_TRACE("Build model via composition");
std::vector<storm::storage::DFT<ValueType>> dfts;
@ -197,7 +197,7 @@ namespace storm {
STORM_LOG_DEBUG("Building Model via parallel composition...");
explorationTimer.start();
ft.setRelevantEvents(relevantEvents);
ft.setRelevantEvents(relevantEvents, allowDCForRelevant);
// Find symmetries
std::map<size_t, std::vector<std::vector<size_t>>> emptySymmetry;
storm::storage::DFTIndependentSymmetries symmetries(emptySymmetry);
@ -259,7 +259,7 @@ namespace storm {
// No composition was possible
explorationTimer.start();
dft.setRelevantEvents(relevantEvents);
dft.setRelevantEvents(relevantEvents, allowDCForRelevant);
// Find symmetries
std::map<size_t, std::vector<std::vector<size_t>>> emptySymmetry;
@ -289,13 +289,13 @@ namespace storm {
template<typename ValueType>
typename DFTModelChecker<ValueType>::dft_results
DFTModelChecker<ValueType>::checkDFT(storm::storage::DFT<ValueType> const &dft, property_vector const &properties, bool symred, storm::utility::RelevantEvents const& relevantEvents,
DFTModelChecker<ValueType>::checkDFT(storm::storage::DFT<ValueType> const &dft, property_vector const &properties, bool symred, storm::utility::RelevantEvents const& relevantEvents, bool allowDCForRelevant,
double approximationError, storm::builder::ApproximationHeuristic approximationHeuristic, bool eliminateChains, storm::transformer::EliminationLabelBehavior labelBehavior) {
explorationTimer.start();
auto ioSettings = storm::settings::getModule<storm::settings::modules::IOSettings>();
auto dftIOSettings = storm::settings::getModule<storm::settings::modules::DftIOSettings>();
dft.setRelevantEvents(relevantEvents);
dft.setRelevantEvents(relevantEvents, allowDCForRelevant);
// Find symmetries
std::map<size_t, std::vector<std::vector<size_t>>> emptySymmetry;

23
src/storm-dft/modelchecker/dft/DFTModelChecker.h

@ -48,13 +48,15 @@ namespace storm {
* @param symred Flag whether symmetry reduction should be used.
* @param allowModularisation Flag indicating if modularisation is allowed.
* @param relevantEvents Relevant events which should be observed.
* @param allowDCForRelevant Whether to allow Don't Care propagation for relevant events
* @param approximationError Error allowed for approximation. 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 labelBehavior Behavior of labels of eliminated states
* @return Model checking results for the given properties..
*/
dft_results check(storm::storage::DFT<ValueType> const& origDft, property_vector const& properties, bool symred = true, bool allowModularisation = true, storm::utility::RelevantEvents const& relevantEvents = storm::utility::RelevantEvents(),
dft_results check(storm::storage::DFT<ValueType> const& origDft, property_vector const& properties, bool symred = true, bool allowModularisation = true,
storm::utility::RelevantEvents const& relevantEvents = storm::utility::RelevantEvents(), bool allowDCForRelevant = false,
double approximationError = 0.0, storm::builder::ApproximationHeuristic approximationHeuristic = storm::builder::ApproximationHeuristic::DEPTH,
bool eliminateChains = false, storm::transformer::EliminationLabelBehavior labelBehavior = storm::transformer::EliminationLabelBehavior::KeepLabels);
@ -92,13 +94,15 @@ namespace storm {
* @param symred Flag indicating if symmetry reduction should be used.
* @param allowModularisation Flag indicating if modularisation is allowed.
* @param relevantEvents Relevant events which should be observed.
* @param allowDCForRelevant Whether to allow Don't Care propagation for relevant events
* @param approximationError Error allowed for approximation. Value 0 indicates no approximation.
* @param approximationHeuristic Heuristic used for approximation.
* @param eliminateChains If true, chains of non-Markovian states are elimianted from the resulting MA
* @param labelBehavior Behavior of labels of eliminated states
* @return Model checking results (or in case of approximation two results for lower and upper bound)
*/
dft_results checkHelper(storm::storage::DFT<ValueType> const& dft, property_vector const& properties, bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents,
dft_results checkHelper(storm::storage::DFT<ValueType> const& dft, property_vector const& properties, bool symred, bool allowModularisation,
storm::utility::RelevantEvents const& relevantEvents, bool allowDCForRelevant = false,
double approximationError = 0.0, storm::builder::ApproximationHeuristic approximationHeuristic = storm::builder::ApproximationHeuristic::DEPTH,
bool eliminateChains = false, storm::transformer::EliminationLabelBehavior labelBehavior = storm::transformer::EliminationLabelBehavior::KeepLabels);
@ -109,10 +113,16 @@ namespace storm {
* @param properties Properties to check for.
* @param symred Flag indicating if symmetry reduction should be used.
* @param allowModularisation Flag indicating if modularisation is allowed.
* @param relevantEvents List with ids of relevant events which should be observed.
* @param relevantEvents Relevant events which should be observed.
* @param allowDCForRelevant Whether to allow Don't Care propagation for relevant events
* @return CTMC representing the DFT
*/
std::shared_ptr<storm::models::sparse::Ctmc<ValueType>> buildModelViaComposition(storm::storage::DFT<ValueType> const& dft, property_vector const& properties, bool symred, bool allowModularisation, storm::utility::RelevantEvents const& relevantEvents);
std::shared_ptr<storm::models::sparse::Ctmc<ValueType>> buildModelViaComposition(storm::storage::DFT<ValueType> const& dft,
property_vector const& properties,
bool symred,
bool allowModularisation,
storm::utility::RelevantEvents const& relevantEvents,
bool allowDCForRelevant);
/*!
* Check model generated from DFT.
@ -120,7 +130,8 @@ namespace storm {
* @param dft The DFT.
* @param properties Properties to check for.
* @param symred Flag indicating if symmetry reduction should be used.
* @param relevantEvents List with ids of relevant events which should be observed.
* @param relevantEvents Relevant events which should be observed.
* @param allowDCForRelevant Whether to allow Don't Care propagation for relevant events
* @param approximationError Error allowed for approximation. Value 0 indicates no approximation.
* @param approximationHeuristic Heuristic used for approximation.
* @param eliminateChains If true, chains of non-Markovian states are elimianted from the resulting MA
@ -128,7 +139,7 @@ namespace storm {
*
* @return Model checking result
*/
dft_results checkDFT(storm::storage::DFT<ValueType> const& dft, property_vector const& properties, bool symred, storm::utility::RelevantEvents const& relevantEvents,
dft_results checkDFT(storm::storage::DFT<ValueType> const& dft, property_vector const& properties, bool symred, storm::utility::RelevantEvents const& relevantEvents, bool allowDCForRelevant,
double approximationError = 0.0, storm::builder::ApproximationHeuristic approximationHeuristic = storm::builder::ApproximationHeuristic::DEPTH,
bool eliminateChains = false, storm::transformer::EliminationLabelBehavior labelBehavior = storm::transformer::EliminationLabelBehavior::KeepLabels);

4
src/storm-dft/storage/dft/DFT.cpp

@ -1039,7 +1039,7 @@ namespace storm {
}
template<typename ValueType>
void DFT<ValueType>::setRelevantEvents(storm::utility::RelevantEvents const& relevantEvents) const {
void DFT<ValueType>::setRelevantEvents(storm::utility::RelevantEvents const& relevantEvents, bool const allowDCForRelevant) const {
mRelevantEvents.clear();
STORM_LOG_THROW(relevantEvents.checkRelevantNames(*this), storm::exceptions::InvalidArgumentException, "One of the relevant elements does not exist.");
// Top level element is first element
@ -1047,7 +1047,7 @@ namespace storm {
for (auto& elem : mElements) {
if (relevantEvents.isRelevant(elem->name()) || elem->id() == this->getTopLevelIndex()) {
elem->setRelevance(true);
elem->setAllowDC(relevantEvents.isAllowDC());
elem->setAllowDC(allowDCForRelevant);
if (elem->id() != this->getTopLevelIndex()) {
// Top level element was already added
mRelevantEvents.push_back(elem->id());

3
src/storm-dft/storage/dft/DFT.h

@ -378,8 +378,9 @@ namespace storm {
/*!
* Set the relevance flag for all elements according to the given relevant events.
* @param relevantEvents All elements which should be to relevant. All elements not occurring are set to irrelevant.
* @param allowDCForRelevant Whether to allow Don't Care propagation for relevant events
*/
void setRelevantEvents(storm::utility::RelevantEvents const& relevantEvents) const;
void setRelevantEvents(storm::utility::RelevantEvents const& relevantEvents, bool const allowDCForRelevant) const;
/*!
* Get a string containing the list of all relevant events.

10
src/storm-dft/utility/RelevantEvents.h

@ -19,9 +19,8 @@ namespace storm {
* If name 'all' occurs, all elements are stored as relevant.
*
* @param relevantEvents List of relevant event names.
* @param allowDCForRelevant Whether to allow Don't Care propagation for relevant events.
*/
RelevantEvents(std::vector<std::string> const& relevantEvents = {}, bool allowDCForRelevant = false) : names(), allRelevant(false), allowDC(allowDCForRelevant) {
RelevantEvents(std::vector<std::string> const& relevantEvents = {}) : names(), allRelevant(false) {
for (auto const& name: relevantEvents) {
if (name == "all") {
this->allRelevant = true;
@ -95,10 +94,6 @@ namespace storm {
}
}
bool isAllowDC() const {
return this->allowDC;
}
private:
/*!
@ -115,9 +110,6 @@ namespace storm {
// Whether all elements are relevant.
bool allRelevant;
// Whether to allow Don't Care propagation for relevant events.
bool allowDC;
};
} // namespace utility

4
src/test/storm-dft/api/DftApproximationTest.cpp

@ -57,7 +57,7 @@ namespace {
EXPECT_TRUE(storm::api::isWellFormed(*dft).first);
std::string property = "T=? [F \"failed\"]";
std::vector<std::shared_ptr<storm::logic::Formula const>> properties = storm::api::extractFormulasFromProperties(storm::api::parseProperties(property));
typename storm::modelchecker::DFTModelChecker<double>::dft_results results = storm::api::analyzeDFT<double>(*dft, properties, config.useSR, false, storm::utility::RelevantEvents(), errorBound, config.heuristic, false);
typename storm::modelchecker::DFTModelChecker<double>::dft_results results = storm::api::analyzeDFT<double>(*dft, properties, config.useSR, false, storm::utility::RelevantEvents(), false, errorBound, config.heuristic, false);
return boost::get<storm::modelchecker::DFTModelChecker<double>::approximation_result>(results[0]);
}
@ -67,7 +67,7 @@ namespace {
std::stringstream propertyStream;
propertyStream << "P=? [F<=" << timeBound << " \"failed\"]";
std::vector <std::shared_ptr<storm::logic::Formula const>> properties = storm::api::extractFormulasFromProperties(storm::api::parseProperties(propertyStream.str()));
typename storm::modelchecker::DFTModelChecker<double>::dft_results results = storm::api::analyzeDFT<double>(*dft, properties, config.useSR, false, storm::utility::RelevantEvents(), errorBound, config.heuristic, false);
typename storm::modelchecker::DFTModelChecker<double>::dft_results results = storm::api::analyzeDFT<double>(*dft, properties, config.useSR, false, storm::utility::RelevantEvents(), false, errorBound, config.heuristic, false);
return boost::get<storm::modelchecker::DFTModelChecker<double>::approximation_result>(results[0]);
}

28
src/test/storm-dft/api/DftModelBuildingTest.cpp

@ -18,8 +18,8 @@ namespace {
storm::storage::DFTIndependentSymmetries symmetries(emptySymmetry);
// Set relevant events (none)
storm::utility::RelevantEvents relevantEvents({}, false);
dft->setRelevantEvents(relevantEvents);
storm::utility::RelevantEvents relevantEvents{};
dft->setRelevantEvents(relevantEvents, false);
// Build model
storm::builder::ExplicitDFTModelBuilder<double> builder(*dft, symmetries);
builder.buildModel(0, 0.0);
@ -28,8 +28,8 @@ namespace {
EXPECT_EQ(13ul, model->getNumberOfTransitions());
// Set relevant events (all)
relevantEvents = storm::utility::RelevantEvents({"all"}, false);
dft->setRelevantEvents(relevantEvents);
relevantEvents = storm::utility::RelevantEvents({"all"});
dft->setRelevantEvents(relevantEvents, false);
// Build model
storm::builder::ExplicitDFTModelBuilder<double> builder2(*dft, symmetries);
builder2.buildModel(0, 0.0);
@ -38,8 +38,8 @@ namespace {
EXPECT_EQ(2305ul, model->getNumberOfTransitions());
// Set relevant events (H)
relevantEvents = storm::utility::RelevantEvents({"H"}, false);
dft->setRelevantEvents(relevantEvents);
relevantEvents = storm::utility::RelevantEvents({"H"});
dft->setRelevantEvents(relevantEvents, false);
// Build model
storm::builder::ExplicitDFTModelBuilder<double> builder3(*dft, symmetries);
builder3.buildModel(0, 0.0);
@ -49,8 +49,8 @@ namespace {
// Set relevant events (H, I)
relevantEvents = storm::utility::RelevantEvents({"H", "I"}, false);
dft->setRelevantEvents(relevantEvents);
relevantEvents = storm::utility::RelevantEvents({"H", "I"});
dft->setRelevantEvents(relevantEvents, false);
// Build model
storm::builder::ExplicitDFTModelBuilder<double> builder4(*dft, symmetries);
builder4.buildModel(0, 0.0);
@ -59,8 +59,8 @@ namespace {
EXPECT_EQ(33ul, model->getNumberOfTransitions());
// Set relevant events (none)
relevantEvents = storm::utility::RelevantEvents({}, true);
dft->setRelevantEvents(relevantEvents);
relevantEvents = storm::utility::RelevantEvents{};
dft->setRelevantEvents(relevantEvents, true);
// Build model
storm::builder::ExplicitDFTModelBuilder<double> builder5(*dft, symmetries);
builder5.buildModel(0, 0.0);
@ -69,8 +69,8 @@ namespace {
EXPECT_EQ(13ul, model->getNumberOfTransitions());
// Set relevant events (all)
relevantEvents = storm::utility::RelevantEvents({"all"}, true);
dft->setRelevantEvents(relevantEvents);
relevantEvents = storm::utility::RelevantEvents({"all"});
dft->setRelevantEvents(relevantEvents, true);
// Build model
storm::builder::ExplicitDFTModelBuilder<double> builder6(*dft, symmetries);
builder6.buildModel(0, 0.0);
@ -80,8 +80,8 @@ namespace {
// Set relevant events (H, I)
relevantEvents = storm::utility::RelevantEvents({"H", "I"}, true);
dft->setRelevantEvents(relevantEvents);
relevantEvents = storm::utility::RelevantEvents({"H", "I"});
dft->setRelevantEvents(relevantEvents, true);
// Build model
storm::builder::ExplicitDFTModelBuilder<double> builder7(*dft, symmetries);
builder7.buildModel(0, 0.0);

4
src/test/storm-dft/api/DftModelCheckerTest.cpp

@ -86,10 +86,10 @@ namespace {
if (!config.useDC) {
relevantNames.push_back("all");
}
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<ValueType>(*dft, properties, relevantNames, false);
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<ValueType>(*dft, properties, relevantNames);
// Perform model checking
typename storm::modelchecker::DFTModelChecker<double>::dft_results results = storm::api::analyzeDFT<double>(*dft, properties, config.useSR, config.useMod, relevantEvents);
typename storm::modelchecker::DFTModelChecker<double>::dft_results results = storm::api::analyzeDFT<double>(*dft, properties, config.useSR, config.useMod, relevantEvents, false);
return boost::get<double>(results[0]);
}

4
src/test/storm-dft/simulator/DftSimulatorTest.cpp

@ -18,8 +18,8 @@ namespace {
EXPECT_TRUE(storm::api::isWellFormed(*dft).first);
// Set relevant events
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<double>(*dft, {}, {}, false);
dft->setRelevantEvents(relevantEvents);
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<double>(*dft, {}, {});
dft->setRelevantEvents(relevantEvents, false);
// Find symmetries
std::map<size_t, std::vector<std::vector<size_t>>> emptySymmetry;

4
src/test/storm-dft/simulator/DftTraceGeneratorTest.cpp

@ -78,8 +78,8 @@ namespace {
if (!config.useDC) {
relevantNames.push_back("all");
}
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<double>(*dft, {}, relevantNames, false);
dft->setRelevantEvents(relevantEvents);
storm::utility::RelevantEvents relevantEvents = storm::api::computeRelevantEvents<double>(*dft, {}, relevantNames);
dft->setRelevantEvents(relevantEvents, false);
// Find symmetries
std::map<size_t, std::vector<std::vector<size_t>>> emptySymmetry;

Loading…
Cancel
Save