Browse Source

Merge branch 'master' into rubicon

main
Sebastian Junges 5 years ago
parent
commit
15ccd6e653
  1. 4
      src/storm-cli-utilities/cli.cpp
  2. 2
      src/storm-cli-utilities/model-handling.h
  3. 6
      src/storm-cli-utilities/resources.h
  4. 2
      src/storm-conv/api/storm-conv.cpp
  5. 2
      src/storm-counterexamples/counterexamples/PathCounterexample.cpp
  6. 89
      src/storm-dft-cli/storm-dft.cpp
  7. 51
      src/storm-dft/api/storm-dft.h
  8. 50
      src/storm-dft/builder/DFTBuilder.cpp
  9. 8
      src/storm-dft/builder/DFTBuilder.h
  10. 31
      src/storm-dft/builder/ExplicitDFTModelBuilder.cpp
  11. 7
      src/storm-dft/generator/DftNextStateGenerator.cpp
  12. 66
      src/storm-dft/modelchecker/dft/DFTASFChecker.cpp
  13. 2
      src/storm-dft/modelchecker/dft/DFTModelChecker.cpp
  14. 2
      src/storm-dft/parser/DFTGalileoParser.cpp
  15. 2
      src/storm-dft/parser/DFTJsonParser.cpp
  16. 9
      src/storm-dft/settings/modules/FaultTreeSettings.cpp
  17. 8
      src/storm-dft/settings/modules/FaultTreeSettings.h
  18. 39
      src/storm-dft/storage/dft/DFT.cpp
  19. 30
      src/storm-dft/storage/dft/DFT.h
  20. 42
      src/storm-dft/storage/dft/DFTElementType.h
  21. 15
      src/storm-dft/storage/dft/DFTElements.h
  22. 52
      src/storm-dft/storage/dft/DFTIsomorphism.h
  23. 29
      src/storm-dft/storage/dft/DFTState.cpp
  24. 11
      src/storm-dft/storage/dft/DFTState.h
  25. 24
      src/storm-dft/storage/dft/DftJsonExporter.cpp
  26. 16
      src/storm-dft/storage/dft/elements/BEConst.cpp
  27. 8
      src/storm-dft/storage/dft/elements/BEConst.h
  28. 24
      src/storm-dft/storage/dft/elements/BEExponential.cpp
  29. 16
      src/storm-dft/storage/dft/elements/BEExponential.h
  30. 20
      src/storm-dft/storage/dft/elements/BESamples.cpp
  31. 74
      src/storm-dft/storage/dft/elements/BESamples.h
  32. 33
      src/storm-dft/storage/dft/elements/DFTBE.cpp
  33. 45
      src/storm-dft/storage/dft/elements/DFTBE.h
  34. 22
      src/storm-dft/transformations/DftToGspnTransformator.cpp
  35. 7
      src/storm-dft/transformations/DftToGspnTransformator.h
  36. 65
      src/storm-dft/transformations/DftTransformator.cpp
  37. 18
      src/storm-dft/utility/FDEPConflictFinder.cpp
  38. 8
      src/storm-dft/utility/FailureBoundFinder.cpp
  39. 69
      src/storm-dft/utility/RelevantEvents.h
  40. 2
      src/storm-gspn/api/storm-gspn.cpp
  41. 3
      src/storm-gspn/parser/GreatSpnEditorProjectParser.cpp
  42. 2
      src/storm-pars-cli/storm-pars.cpp
  43. 2
      src/storm-pars/api/export.h
  44. 2
      src/storm-pars/api/region.h
  45. 2
      src/storm-pars/parser/ParameterRegionParser.cpp
  46. 2
      src/storm-parsers/parser/AtomicPropositionLabelingParser.cpp
  47. 2
      src/storm-parsers/parser/AutoParser.cpp
  48. 2
      src/storm-parsers/parser/DeterministicSparseTransitionParser.cpp
  49. 2
      src/storm-parsers/parser/DirectEncodingParser.cpp
  50. 2
      src/storm-parsers/parser/FormulaParser.cpp
  51. 2
      src/storm-parsers/parser/ImcaMarkovAutomatonParser.cpp
  52. 2
      src/storm-parsers/parser/JaniParser.cpp
  53. 2
      src/storm-parsers/parser/MappedFile.cpp
  54. 2
      src/storm-parsers/parser/MarkovAutomatonSparseTransitionParser.cpp
  55. 2
      src/storm-parsers/parser/NondeterministicSparseTransitionParser.cpp
  56. 2
      src/storm-parsers/parser/PrismParser.cpp
  57. 2
      src/storm-parsers/parser/ReadValues.h
  58. 2
      src/storm-parsers/parser/SparseChoiceLabelingParser.cpp
  59. 2
      src/storm-parsers/parser/SparseItemLabelingParser.cpp
  60. 2
      src/storm-parsers/parser/SparseStateRewardParser.cpp
  61. 2
      src/storm-parsers/util/cstring.cpp
  62. 12
      src/storm-parsers/util/cstring.h
  63. 2
      src/storm-pgcl-cli/storm-pgcl.cpp
  64. 2
      src/storm-pgcl/parser/PgclParser.cpp
  65. 2
      src/storm-pomdp/analysis/IterativePolicySearch.cpp
  66. 2
      src/storm-pomdp/analysis/OneShotPolicySearch.cpp
  67. 2
      src/storm-pomdp/analysis/WinningRegion.cpp
  68. 2
      src/storm/abstraction/MenuGameAbstractor.cpp
  69. 2
      src/storm/adapters/EigenAdapter.h
  70. 2
      src/storm/adapters/GmmxxAdapter.h
  71. 0
      src/storm/adapters/eigen.h
  72. 0
      src/storm/adapters/gmm.h
  73. 2
      src/storm/adapters/sylvan.cpp
  74. 0
      src/storm/adapters/sylvan.h
  75. 6
      src/storm/api/export.h
  76. 4
      src/storm/io/DDEncodingExporter.cpp
  77. 0
      src/storm/io/DDEncodingExporter.h
  78. 2
      src/storm/io/DirectEncodingExporter.cpp
  79. 0
      src/storm/io/DirectEncodingExporter.h
  80. 2
      src/storm/io/export.h
  81. 0
      src/storm/io/file.h
  82. 2
      src/storm/modelchecker/multiobjective/deterministicScheds/DeterministicSchedsParetoExplorer.cpp
  83. 2
      src/storm/modelchecker/multiobjective/pcaa/RewardBoundedMdpPcaaWeightVectorChecker.cpp
  84. 2
      src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.cpp
  85. 2
      src/storm/modelchecker/prctl/helper/SparseDtmcPrctlHelper.cpp
  86. 2
      src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp
  87. 2
      src/storm/models/sparse/DeterministicModel.cpp
  88. 2
      src/storm/models/sparse/Model.cpp
  89. 2
      src/storm/models/sparse/NondeterministicModel.cpp
  90. 2
      src/storm/settings/SettingsManager.cpp
  91. 2
      src/storm/solver/EigenLinearEquationSolver.h
  92. 2
      src/storm/solver/GmmxxLinearEquationSolver.cpp
  93. 2
      src/storm/solver/GmmxxLinearEquationSolver.h
  94. 2
      src/storm/solver/SmtlibSmtSolver.cpp
  95. 2
      src/storm/solver/Z3LpSolver.cpp
  96. 2
      src/storm/storage/Qvbs.cpp
  97. 2
      src/storm/storage/dd/Odd.cpp
  98. 2
      src/storm/storage/dd/sylvan/InternalSylvanBdd.h
  99. 2
      src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp
  100. 2
      src/storm/storage/dd/sylvan/SylvanAddIterator.h

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

@ -1,8 +1,8 @@
#include "cli.h" #include "cli.h"
#include "storm/utility/resources.h"
#include "storm/utility/file.h"
#include "storm-cli-utilities/resources.h"
#include "storm/io/file.h"
#include "storm-version-info/storm-version.h" #include "storm-version-info/storm-version.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/initialize.h" #include "storm/utility/initialize.h"

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

@ -6,7 +6,7 @@
#include "storm-parsers/api/storm-parsers.h" #include "storm-parsers/api/storm-parsers.h"
#include "storm/utility/SignalHandler.h" #include "storm/utility/SignalHandler.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/NumberTraits.h" #include "storm/utility/NumberTraits.h"
#include "storm/utility/Engine.h" #include "storm/utility/Engine.h"

6
src/storm/utility/resources.h → src/storm-cli-utilities/resources.h

@ -1,6 +1,4 @@
#ifndef STORM_UTILITY_RESOURCES_H_
#define STORM_UTILITY_RESOURCES_H_
#pragma once
#include <sys/time.h> #include <sys/time.h>
#include <sys/times.h> #include <sys/times.h>
#include <sys/resource.h> #include <sys/resource.h>
@ -55,5 +53,3 @@ namespace storm {
} }
} }
} }
#endif /* STORM_UTILITY_RESOURCES_H_ */

2
src/storm-conv/api/storm-conv.cpp

@ -7,7 +7,7 @@
#include "storm/storage/jani/JaniScopeChanger.h" #include "storm/storage/jani/JaniScopeChanger.h"
#include "storm/storage/jani/JSONExporter.h" #include "storm/storage/jani/JSONExporter.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/api/properties.h" #include "storm/api/properties.h"
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"

2
src/storm-counterexamples/counterexamples/PathCounterexample.cpp

@ -1,6 +1,6 @@
#include "storm-counterexamples/counterexamples/PathCounterexample.h" #include "storm-counterexamples/counterexamples/PathCounterexample.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
namespace storm { namespace storm {
namespace counterexamples { namespace counterexamples {

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

@ -90,46 +90,25 @@ void processOptions() {
dft = storm::api::applyTransformations(*dft, faultTreeSettings.isUniqueFailedBE(), true); dft = storm::api::applyTransformations(*dft, faultTreeSettings.isUniqueFailedBE(), true);
STORM_LOG_DEBUG(dft->getElementsString()); STORM_LOG_DEBUG(dft->getElementsString());
dft->setDynamicBehaviorInfo();
storm::api::PreprocessingResult preResults;
// Compute minimal number of BE failures leading to system failure and
// maximal number of BE failures not leading to system failure yet.
// TODO: always needed? // 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));
// TODO: move into API call?
preResults.fdepConflicts = storm::dft::utility::FDEPConflictFinder<ValueType>::getDependencyConflicts(*dft, useSMT, solverTimeout);
auto bounds = storm::api::computeBEFailureBounds(*dft, useSMT, solverTimeout);
STORM_LOG_DEBUG("BE failure bounds: lower bound: " << bounds.first << ", upper bound: " << bounds.second << ".");
if (preResults.fdepConflicts.empty()) {
STORM_LOG_DEBUG("No FDEP conflicts found");
// Check which FDEPs actually introduce conflicts which need non-deterministic resolution
bool hasConflicts = storm::api::computeDependencyConflicts(*dft, useSMT, solverTimeout);
if (hasConflicts) {
STORM_LOG_DEBUG("FDEP conflicts found.");
} else { } else {
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());
}
// Set the conflict map of the dft
std::set<size_t> conflict_set;
for (auto conflict : preResults.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);
}
STORM_LOG_DEBUG("No FDEP conflicts found.");
} }
#ifdef STORM_HAVE_Z3 #ifdef STORM_HAVE_Z3
if (useSMT) { if (useSMT) {
// Solve with SMT // Solve with SMT
STORM_LOG_DEBUG("Running DFT analysis with use of SMT");
STORM_LOG_DEBUG("Running DFT analysis with use of SMT.");
// Set dynamic behavior vector // Set dynamic behavior vector
storm::api::analyzeDFTSMT(*dft, true); storm::api::analyzeDFTSMT(*dft, true);
} }
@ -184,54 +163,16 @@ void processOptions() {
// Set relevant event names // Set relevant event names
std::vector<std::string> relevantEventNames;
//Possible clash of relevantEvents and disableDC was already considered in FaultTreeSettings::check().
std::vector<std::string> additionalRelevantEventNames;
if (faultTreeSettings.areRelevantEventsSet()) { if (faultTreeSettings.areRelevantEventsSet()) {
relevantEventNames = faultTreeSettings.getRelevantEvents();
//Possible clash of relevantEvents and disableDC was already considered in FaultTreeSettings::check().
additionalRelevantEventNames = faultTreeSettings.getRelevantEvents();
} else if (faultTreeSettings.isDisableDC()) { } else if (faultTreeSettings.isDisableDC()) {
// All events are relevant // All events are relevant
relevantEventNames = {"all"};
additionalRelevantEventNames = {"all"};
} }
std::set<size_t> relevantEvents = storm::api::computeRelevantEvents<ValueType>(*dft, props, additionalRelevantEventNames);
// Events from properties are relevant as well
// Get necessary labels from properties
std::vector<std::shared_ptr<storm::logic::AtomicLabelFormula const>> atomicLabels;
for (auto property : props) {
property->gatherAtomicLabelFormulas(atomicLabels);
}
// Add relevant event names from properties
for (auto atomic : atomicLabels) {
std::string label = atomic->getLabel();
if (label == "failed" or label == "skipped") {
// Ignore as these label will always be added if necessary
} else {
// Get name of event
if (boost::ends_with(label, "_failed")) {
relevantEventNames.push_back(label.substr(0, label.size() - 7));
} else if (boost::ends_with(label, "_dc")) {
relevantEventNames.push_back(label.substr(0, label.size() - 3));
} else {
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Label '" << label << "' not known.");
}
}
}
// Set relevant elements
std::set<size_t> relevantEvents; // Per default no event (except the toplevel event) is relevant
for (std::string const& relevantName : relevantEventNames) {
if (relevantName == "none") {
// Only toplevel event is relevant
relevantEvents = {};
break;
} else if (relevantName == "all") {
// All events are relevant
relevantEvents = dft->getAllIds();
break;
} else {
// Find and add corresponding event id
relevantEvents.insert(dft->getIndex(relevantName));
}
}
// Analyze DFT // Analyze DFT
// TODO allow building of state space even without properties // TODO allow building of state space even without properties

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

@ -12,17 +12,12 @@
#include "storm-dft/transformations/DftTransformator.h" #include "storm-dft/transformations/DftTransformator.h"
#include "storm-dft/utility/FDEPConflictFinder.h" #include "storm-dft/utility/FDEPConflictFinder.h"
#include "storm-dft/utility/FailureBoundFinder.h" #include "storm-dft/utility/FailureBoundFinder.h"
#include "storm-dft/utility/RelevantEvents.h"
#include "storm-gspn/api/storm-gspn.h" #include "storm-gspn/api/storm-gspn.h"
namespace storm { namespace storm {
namespace api { namespace api {
struct PreprocessingResult {
uint64_t lowerBEBound;
uint64_t upperBEBound;
std::vector<std::pair<uint64_t, uint64_t>> fdepConflicts;
};
/*! /*!
* Load DFT from Galileo file. * Load DFT from Galileo file.
@ -92,29 +87,51 @@ namespace storm {
return 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);
template<typename ValueType>
std::pair<uint64_t, uint64_t> computeBEFailureBounds(storm::storage::DFT<ValueType> const& dft, bool useSMT, double solverTimeout) {
uint64_t lowerBEBound = storm::dft::utility::FailureBoundFinder::getLeastFailureBound(dft, useSMT, solverTimeout);
uint64_t upperBEBound = storm::dft::utility::FailureBoundFinder::getAlwaysFailedBound(dft, useSMT, solverTimeout);
return std::make_pair(lowerBEBound, upperBEBound);
}
if (fdepConflicts.empty()) {
return false;
}
for (auto pair: fdepConflicts) {
template<typename ValueType>
bool computeDependencyConflicts(storm::storage::DFT<ValueType>& dft, bool useSMT, double solverTimeout) {
// Initialize which DFT elements have dynamic behavior
dft.setDynamicBehaviorInfo();
std::vector<std::pair<uint64_t, uint64_t>> fdepConflicts = storm::dft::utility::FDEPConflictFinder<ValueType>::getDependencyConflicts(dft, useSMT, solverTimeout);
for (auto const& pair: fdepConflicts) {
STORM_LOG_DEBUG("Conflict between " << dft.getElement(pair.first)->name() << " and " << dft.getElement(pair.second)->name()); STORM_LOG_DEBUG("Conflict between " << dft.getElement(pair.first)->name() << " and " << dft.getElement(pair.second)->name());
} }
// Set the conflict map of the dft // Set the conflict map of the dft
std::set<size_t> conflict_set; std::set<size_t> conflict_set;
for (auto conflict : fdepConflicts) {
for (auto const& conflict : fdepConflicts) {
conflict_set.insert(size_t(conflict.first)); conflict_set.insert(size_t(conflict.first));
conflict_set.insert(size_t(conflict.second)); conflict_set.insert(size_t(conflict.second));
} }
for (size_t depId : dft->getDependencies()) {
for (size_t depId : dft.getDependencies()) {
if (!conflict_set.count(depId)) { if (!conflict_set.count(depId)) {
dft->setDependencyNotInConflict(depId);
dft.setDependencyNotInConflict(depId);
} }
} }
return true;
return !fdepConflicts.empty();
}
/*!
* Get relevant event ids from given relevant event names and labels in properties.
*
* @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.
* @return Set of relevant event ids.
*/
template<typename ValueType>
std::set<size_t> computeRelevantEvents(storm::storage::DFT<ValueType> const& dft, std::vector<std::shared_ptr<storm::logic::Formula const>> const& properties, std::vector<std::string> const additionalRelevantEventNames) {
std::vector<std::string> relevantNames = storm::utility::getRelevantEventNames<ValueType>(dft, properties);
relevantNames.insert(relevantNames.end(), additionalRelevantEventNames.begin(), additionalRelevantEventNames.end());
return storm::utility::getRelevantEvents<ValueType>(dft, relevantNames);
} }
/*! /*!

50
src/storm-dft/builder/DFTBuilder.cpp

@ -27,14 +27,13 @@ namespace storm {
if (itFind != mElements.end()) { if (itFind != mElements.end()) {
// Child found // Child found
DFTElementPointer childElement = itFind->second; DFTElementPointer childElement = itFind->second;
STORM_LOG_THROW(!childElement->isRestriction(), storm::exceptions::WrongFormatException,
"Restictor " << childElement->name() << " is not allowed as child of gate "
<< gate->name());
if(!childElement->isDependency()) {
if (childElement->isRestriction()) {
STORM_LOG_WARN("Restriction '" << child << "' is not used as input for gate '" << gate->name() << "', because restrictions have no output.");
} else if (childElement->isDependency()) {
STORM_LOG_WARN("Dependency '" << child << "' is not used as input for gate '" << gate->name() << "', because dependencies have no output.");
} else {
gate->pushBackChild(childElement); gate->pushBackChild(childElement);
childElement->addParent(gate); childElement->addParent(gate);
} else {
STORM_LOG_TRACE("Ignore functional dependency " << child << " in gate " << gate->name());
} }
} else { } else {
// Child not found -> find first dependent event to assure that child is dependency // Child not found -> find first dependent event to assure that child is dependency
@ -187,8 +186,7 @@ namespace storm {
case storm::storage::DFTElementType::SPARE: case storm::storage::DFTElementType::SPARE:
element = std::make_shared<storm::storage::DFTSpare<ValueType>>(mNextId++, name); element = std::make_shared<storm::storage::DFTSpare<ValueType>>(mNextId++, name);
break; break;
case storm::storage::DFTElementType::BE_EXP:
case storm::storage::DFTElementType::BE_CONST:
case storm::storage::DFTElementType::BE:
case storm::storage::DFTElementType::VOT: case storm::storage::DFTElementType::VOT:
case storm::storage::DFTElementType::PDEP: case storm::storage::DFTElementType::PDEP:
// Handled separately // Handled separately
@ -254,6 +252,9 @@ namespace storm {
void DFTBuilder<ValueType>::copyElement(DFTElementPointer element) { void DFTBuilder<ValueType>::copyElement(DFTElementPointer element) {
std::vector<std::string> children; std::vector<std::string> children;
switch (element->type()) { switch (element->type()) {
case storm::storage::DFTElementType::BE:
copyBE(std::static_pointer_cast<storm::storage::DFTBE<ValueType>>(element));
break;
case storm::storage::DFTElementType::AND: case storm::storage::DFTElementType::AND:
case storm::storage::DFTElementType::OR: case storm::storage::DFTElementType::OR:
case storm::storage::DFTElementType::PAND: case storm::storage::DFTElementType::PAND:
@ -267,18 +268,6 @@ namespace storm {
copyGate(std::static_pointer_cast<storm::storage::DFTGate<ValueType>>(element), children); copyGate(std::static_pointer_cast<storm::storage::DFTGate<ValueType>>(element), children);
break; break;
} }
case storm::storage::DFTElementType::BE_EXP:
{
auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType>>(element);
addBasicElementExponential(beExp->name(), beExp->activeFailureRate(), beExp->dormancyFactor(), beExp->isTransient());
break;
}
case storm::storage::DFTElementType::BE_CONST:
{
auto beConst = std::static_pointer_cast<storm::storage::BEConst<ValueType>>(element);
addBasicElementConst(beConst->name(), beConst->failed());
break;
}
case storm::storage::DFTElementType::PDEP: case storm::storage::DFTElementType::PDEP:
{ {
DFTDependencyPointer dependency = std::static_pointer_cast<storm::storage::DFTDependency<ValueType>>(element); DFTDependencyPointer dependency = std::static_pointer_cast<storm::storage::DFTDependency<ValueType>>(element);
@ -304,6 +293,27 @@ namespace storm {
} }
} }
template<typename ValueType>
void DFTBuilder<ValueType>::copyBE(DFTBEPointer be) {
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
{
auto beConst = std::static_pointer_cast<storm::storage::BEConst<ValueType>>(be);
addBasicElementConst(beConst->name(), beConst->failed());
break;
}
case storm::storage::BEType::EXPONENTIAL:
{
auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType>>(be);
addBasicElementExponential(beExp->name(), beExp->activeFailureRate(), beExp->dormancyFactor(), beExp->isTransient());
break;
}
default:
STORM_LOG_ASSERT(false, "BE type not known.");
break;
}
}
template<typename ValueType> template<typename ValueType>
void DFTBuilder<ValueType>::copyGate(DFTGatePointer gate, std::vector<std::string> const& children) { void DFTBuilder<ValueType>::copyGate(DFTGatePointer gate, std::vector<std::string> const& children) {
switch (gate->type()) { switch (gate->type()) {

8
src/storm-dft/builder/DFTBuilder.h

@ -25,6 +25,7 @@ namespace storm {
using DFTElementPointer = std::shared_ptr<storm::storage::DFTElement<ValueType>>; using DFTElementPointer = std::shared_ptr<storm::storage::DFTElement<ValueType>>;
using DFTElementVector = std::vector<DFTElementPointer>; using DFTElementVector = std::vector<DFTElementPointer>;
using DFTBEPointer = std::shared_ptr<storm::storage::DFTBE<ValueType>>;
using DFTGatePointer = std::shared_ptr<storm::storage::DFTGate<ValueType>>; using DFTGatePointer = std::shared_ptr<storm::storage::DFTGate<ValueType>>;
using DFTGateVector = std::vector<DFTGatePointer>; using DFTGateVector = std::vector<DFTGatePointer>;
using DFTDependencyPointer = std::shared_ptr<storm::storage::DFTDependency<ValueType>>; using DFTDependencyPointer = std::shared_ptr<storm::storage::DFTDependency<ValueType>>;
@ -214,6 +215,13 @@ namespace storm {
*/ */
void copyElement(DFTElementPointer element); void copyElement(DFTElementPointer element);
/**
* Copy BE and insert it again in the builder.i
*
* @param be BE to copy.
*/
void copyBE(DFTBEPointer be);
/** /**
* Copy gate with given children and insert it again in the builder. The current children of the element * Copy gate with given children and insert it again in the builder. The current children of the element
* are discarded. * are discarded.

31
src/storm-dft/builder/ExplicitDFTModelBuilder.cpp

@ -495,6 +495,8 @@ namespace storm {
template<typename ValueType, typename StateType> template<typename ValueType, typename StateType>
void ExplicitDFTModelBuilder<ValueType, StateType>::buildLabeling() { void ExplicitDFTModelBuilder<ValueType, StateType>::buildLabeling() {
bool isAddLabelsClaiming = storm::settings::getModule<storm::settings::modules::FaultTreeSettings>().isAddLabelsClaiming();
// Build state labeling // Build state labeling
modelComponents.stateLabeling = storm::models::sparse::StateLabeling(modelComponents.transitionMatrix.getRowGroupCount()); modelComponents.stateLabeling = storm::models::sparse::StateLabeling(modelComponents.transitionMatrix.getRowGroupCount());
// Initial state // Initial state
@ -513,6 +515,17 @@ namespace storm {
modelComponents.stateLabeling.addLabel(element->name() + "_dc"); modelComponents.stateLabeling.addLabel(element->name() + "_dc");
} }
} }
std::vector<std::shared_ptr<storm::storage::DFTGate<ValueType> const>> spares; // Only filled if needed
if (isAddLabelsClaiming) {
// Collect labels for claiming
for (size_t spareId : dft.getSpareIndices()) {
auto const& spare = dft.getGate(spareId);
spares.push_back(spare);
for (auto const& child : spare->children()) {
modelComponents.stateLabeling.addLabel(spare->name() + "_claimed_" + child->name());
}
}
}
// Set labels to states // Set labels to states
if (this->uniqueFailedState) { if (this->uniqueFailedState) {
@ -546,6 +559,14 @@ namespace storm {
} }
} }
} }
if (isAddLabelsClaiming) {
for (auto const& spare : spares) {
size_t claimedChildId = dft.uses(state, *stateGenerationInfo, spare->id());
if (claimedChildId != spare->id()) {
modelComponents.stateLabeling.addLabelToState(spare->name() + "_claimed_" + dft.getElement(claimedChildId)->name(), stateId);
}
}
}
} }
STORM_LOG_TRACE(modelComponents.stateLabeling); STORM_LOG_TRACE(modelComponents.stateLabeling);
@ -748,8 +769,11 @@ namespace storm {
// Consider only still operational BEs // Consider only still operational BEs
if (state->isOperational(id)) { if (state->isOperational(id)) {
auto be = dft.getBasicElement(id); auto be = dft.getBasicElement(id);
switch (be->type()) {
case storm::storage::DFTElementType::BE_EXP:
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
// Ignore BE which cannot fail
continue;
case storm::storage::BEType::EXPONENTIAL:
{ {
// Get BE rate // Get BE rate
ValueType rate = state->getBERate(id); ValueType rate = state->getBERate(id);
@ -765,9 +789,6 @@ namespace storm {
rateSum += rate; rateSum += rate;
break; break;
} }
case storm::storage::DFTElementType::BE_CONST:
// Ignore BE which cannot fail
continue;
default: default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->type() << "' is not known."); STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->type() << "' is not known.");
break; break;

7
src/storm-dft/generator/DftNextStateGenerator.cpp

@ -26,7 +26,7 @@ namespace storm {
size_t constFailedBeCounter = 0; size_t constFailedBeCounter = 0;
std::shared_ptr<storm::storage::DFTBE<ValueType> const> constFailedBE = nullptr; std::shared_ptr<storm::storage::DFTBE<ValueType> const> constFailedBE = nullptr;
for (auto &be : mDft.getBasicElements()) { for (auto &be : mDft.getBasicElements()) {
if (be->type() == storm::storage::DFTElementType::BE_CONST) {
if (be->beType() == storm::storage::BEType::CONSTANT) {
auto constBe = std::static_pointer_cast<storm::storage::BEConst<ValueType> const>(be); auto constBe = std::static_pointer_cast<storm::storage::BEConst<ValueType> const>(be);
if (constBe->failed()) { if (constBe->failed()) {
constFailedBeCounter++; constFailedBeCounter++;
@ -143,7 +143,8 @@ namespace storm {
propagateFailure(newState, nextBE, queues); propagateFailure(newState, nextBE, queues);
bool transient = false; bool transient = false;
if (nextBE->type() == storm::storage::DFTElementType::BE_EXP) {
// TODO handle for all types of BEs.
if (nextBE->beType() == storm::storage::BEType::EXPONENTIAL) {
auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(nextBE); auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(nextBE);
transient = beExp->isTransient(); transient = beExp->isTransient();
} }
@ -194,7 +195,7 @@ namespace storm {
} else { } else {
// Failure is due to "normal" BE failure // Failure is due to "normal" BE failure
// Set failure rate according to activation // Set failure rate according to activation
STORM_LOG_THROW(nextBE->type() == storm::storage::DFTElementType::BE_EXP, storm::exceptions::NotSupportedException, "BE of type '" << nextBE->type() << "' is not supported.");
STORM_LOG_THROW(nextBE->beType() == storm::storage::BEType::EXPONENTIAL, storm::exceptions::NotSupportedException, "BE of type '" << nextBE->type() << "' is not supported.");
auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(nextBE); auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(nextBE);
bool isActive = true; bool isActive = true;
if (mDft.hasRepresentant(beExp->id())) { if (mDft.hasRepresentant(beExp->id())) {

66
src/storm-dft/modelchecker/dft/DFTASFChecker.cpp

@ -2,7 +2,7 @@
#include "SmtConstraint.cpp" #include "SmtConstraint.cpp"
#include <string> #include <string>
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/bitoperations.h" #include "storm/utility/bitoperations.h"
#include "storm-parsers/parser/ExpressionCreator.h" #include "storm-parsers/parser/ExpressionCreator.h"
#include "storm/solver/SmtSolver.h" #include "storm/solver/SmtSolver.h"
@ -35,21 +35,30 @@ namespace storm {
varNames.push_back("t_" + element->name()); varNames.push_back("t_" + element->name());
timePointVariables.emplace(i, varNames.size() - 1); timePointVariables.emplace(i, varNames.size() - 1);
switch (element->type()) { switch (element->type()) {
case storm::storage::DFTElementType::BE_EXP:
beVariables.push_back(varNames.size() - 1);
break;
case storm::storage::DFTElementType::BE_CONST: {
STORM_LOG_WARN("Constant BEs are only experimentally supported in the SMT encoding");
// Constant BEs are initially either failed or failsafe, treat them differently
auto be = std::static_pointer_cast<storm::storage::BEConst<double> const>(element);
if (be->failed()) {
STORM_LOG_THROW(!failedBeIsSet, storm::exceptions::NotSupportedException,
"DFTs containing more than one constantly failed BE are not supported");
notFailed = dft.nrBasicElements();
failedBeVariables = varNames.size() - 1;
failedBeIsSet = true;
} else {
failsafeBeVariables.push_back(varNames.size() - 1);
case storm::storage::DFTElementType::BE: {
auto be = std::static_pointer_cast<storm::storage::DFTBE<double> const>(element);
switch (be->beType()) {
case storm::storage::BEType::EXPONENTIAL:
beVariables.push_back(varNames.size() - 1);
break;
case storm::storage::BEType::CONSTANT: {
STORM_LOG_WARN("Constant BEs are only experimentally supported in the SMT encoding");
// Constant BEs are initially either failed or failsafe, treat them differently
auto be = std::static_pointer_cast<storm::storage::BEConst<double> const>(element);
if (be->failed()) {
STORM_LOG_THROW(!failedBeIsSet, storm::exceptions::NotSupportedException,
"DFTs containing more than one constantly failed BE are not supported");
notFailed = dft.nrBasicElements();
failedBeVariables = varNames.size() - 1;
failedBeIsSet = true;
} else {
failsafeBeVariables.push_back(varNames.size() - 1);
}
break;
}
default:
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "BE type '" << be->beType() << "' not known.");
break;
} }
break; break;
} }
@ -146,8 +155,7 @@ namespace storm {
} }
switch (element->type()) { switch (element->type()) {
case storm::storage::DFTElementType::BE_EXP:
case storm::storage::DFTElementType::BE_CONST:
case storm::storage::DFTElementType::BE:
// BEs were already considered before // BEs were already considered before
break; break;
case storm::storage::DFTElementType::AND: case storm::storage::DFTElementType::AND:
@ -208,19 +216,17 @@ namespace storm {
std::vector<std::shared_ptr<SmtConstraint>> triggerConstraints; std::vector<std::shared_ptr<SmtConstraint>> triggerConstraints;
for (size_t i = 0; i < dft.nrElements(); ++i) { for (size_t i = 0; i < dft.nrElements(); ++i) {
std::shared_ptr<storm::storage::DFTElement<ValueType> const> element = dft.getElement(i); std::shared_ptr<storm::storage::DFTElement<ValueType> const> element = dft.getElement(i);
if (element->type() == storm::storage::DFTElementType::BE_CONST) {
if (element->isBasicElement()) {
auto be = std::static_pointer_cast<storm::storage::DFTBE<double> const>(element); auto be = std::static_pointer_cast<storm::storage::DFTBE<double> const>(element);
triggerConstraints.clear();
for (auto const &dependency : be->ingoingDependencies()) {
triggerConstraints.push_back(std::make_shared<IsConstantValue>(
timePointVariables.at(dependency->triggerEvent()->id()), notFailed));
}
if (!triggerConstraints.empty()) {
constraints.push_back(std::make_shared<Implies>(
std::make_shared<IsConstantValue>(timePointVariables.at(be->id()), notFailed),
std::make_shared<And>(triggerConstraints)));
constraints.back()->setDescription(
"Failsafe BE " + be->name() + " stays failsafe if no trigger fails");
if (be->beType() == storm::storage::BEType::CONSTANT) {
triggerConstraints.clear();
for (auto const &dependency : be->ingoingDependencies()) {
triggerConstraints.push_back(std::make_shared<IsConstantValue>(timePointVariables.at(dependency->triggerEvent()->id()), notFailed));
}
if (!triggerConstraints.empty()) {
constraints.push_back(std::make_shared<Implies>(std::make_shared<IsConstantValue>(timePointVariables.at(be->id()), notFailed), std::make_shared<And>(triggerConstraints)));
constraints.back()->setDescription("Failsafe BE " + be->name() + " stays failsafe if no trigger fails");
}
} }
} }
} }

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

@ -5,7 +5,7 @@
#include "storm/builder/ParallelCompositionBuilder.h" #include "storm/builder/ParallelCompositionBuilder.h"
#include "storm/exceptions/UnmetRequirementException.h" #include "storm/exceptions/UnmetRequirementException.h"
#include "storm/utility/bitoperations.h" #include "storm/utility/bitoperations.h"
#include "storm/utility/DirectEncodingExporter.h"
#include "storm/io/DirectEncodingExporter.h"
#include "storm/modelchecker/results/ExplicitQuantitativeCheckResult.h" #include "storm/modelchecker/results/ExplicitQuantitativeCheckResult.h"
#include "storm/modelchecker/results/ExplicitQualitativeCheckResult.h" #include "storm/modelchecker/results/ExplicitQualitativeCheckResult.h"
#include "storm/models/ModelType.h" #include "storm/models/ModelType.h"

2
src/storm-dft/parser/DFTGalileoParser.cpp

@ -11,7 +11,7 @@
#include "storm/exceptions/NotSupportedException.h" #include "storm/exceptions/NotSupportedException.h"
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
namespace storm { namespace storm {
namespace parser { namespace parser {

2
src/storm-dft/parser/DFTJsonParser.cpp

@ -10,7 +10,7 @@
#include "storm/exceptions/FileIoException.h" #include "storm/exceptions/FileIoException.h"
#include "storm/exceptions/NotSupportedException.h" #include "storm/exceptions/NotSupportedException.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm-parsers/parser/ValueParser.h" #include "storm-parsers/parser/ValueParser.h"
namespace storm { namespace storm {

9
src/storm-dft/settings/modules/FaultTreeSettings.cpp

@ -21,6 +21,7 @@ namespace storm {
const std::string FaultTreeSettings::disableDCOptionName = "disabledc"; const std::string FaultTreeSettings::disableDCOptionName = "disabledc";
const std::string FaultTreeSettings::allowDCRelevantOptionName = "allowdcrelevant"; const std::string FaultTreeSettings::allowDCRelevantOptionName = "allowdcrelevant";
const std::string FaultTreeSettings::relevantEventsOptionName = "relevantevents"; const std::string FaultTreeSettings::relevantEventsOptionName = "relevantevents";
const std::string FaultTreeSettings::addLabelsClaimingOptionName = "labels-claiming";
const std::string FaultTreeSettings::approximationErrorOptionName = "approximation"; const std::string FaultTreeSettings::approximationErrorOptionName = "approximation";
const std::string FaultTreeSettings::approximationErrorOptionShortName = "approx"; const std::string FaultTreeSettings::approximationErrorOptionShortName = "approx";
const std::string FaultTreeSettings::approximationHeuristicOptionName = "approximationheuristic"; const std::string FaultTreeSettings::approximationHeuristicOptionName = "approximationheuristic";
@ -40,9 +41,11 @@ namespace storm {
"Avoid non-determinism by always taking the first possible dependency.").build()); "Avoid non-determinism by always taking the first possible dependency.").build());
this->addOption(storm::settings::OptionBuilder(moduleName, relevantEventsOptionName, false, "Specifies the relevant events from the DFT.") this->addOption(storm::settings::OptionBuilder(moduleName, relevantEventsOptionName, false, "Specifies the relevant events from the DFT.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("values", .addArgument(storm::settings::ArgumentBuilder::createStringArgument("values",
"A comma separated list of names of relevant events. 'all' marks all events as relevant, The default '' or 'none' marks only the top level event as relevant.").setDefaultValueString(
"A comma separated list of names of relevant events. 'all' marks all events as relevant, The default '' marks only the top level event as relevant.").setDefaultValueString(
"").build()).build()); "").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName, allowDCRelevantOptionName, false, "Allow Don't Care propagation for relevant events.").build()); this->addOption(storm::settings::OptionBuilder(moduleName, allowDCRelevantOptionName, false, "Allow Don't Care propagation for relevant events.").build());
this->addOption(storm::settings::OptionBuilder(moduleName, addLabelsClaimingOptionName, false,
"Add labels representing claiming operations.").build());
this->addOption(storm::settings::OptionBuilder(moduleName, approximationErrorOptionName, false, "Approximation error allowed.").setShortName( this->addOption(storm::settings::OptionBuilder(moduleName, approximationErrorOptionName, false, "Approximation error allowed.").setShortName(
approximationErrorOptionShortName).addArgument( approximationErrorOptionShortName).addArgument(
storm::settings::ArgumentBuilder::createDoubleArgument("error", "The relative approximation error to use.").addValidatorDouble( storm::settings::ArgumentBuilder::createDoubleArgument("error", "The relative approximation error to use.").addValidatorDouble(
@ -86,6 +89,10 @@ namespace storm {
return storm::parser::parseCommaSeperatedValues(this->getOption(relevantEventsOptionName).getArgumentByName("values").getValueAsString()); return storm::parser::parseCommaSeperatedValues(this->getOption(relevantEventsOptionName).getArgumentByName("values").getValueAsString());
} }
bool FaultTreeSettings::isAddLabelsClaiming() const {
return this->getOption(addLabelsClaimingOptionName).getHasOptionBeenSet();
}
bool FaultTreeSettings::isApproximationErrorSet() const { bool FaultTreeSettings::isApproximationErrorSet() const {
return this->getOption(approximationErrorOptionName).getHasOptionBeenSet(); return this->getOption(approximationErrorOptionName).getHasOptionBeenSet();
} }

8
src/storm-dft/settings/modules/FaultTreeSettings.h

@ -61,6 +61,13 @@ namespace storm {
*/ */
std::vector<std::string> getRelevantEvents() const; std::vector<std::string> getRelevantEvents() const;
/*!
* Retrieves whether the labels for claimings should be added in the Markov chain.
*
* @return True iff the option was set.
*/
bool isAddLabelsClaiming() const;
/*! /*!
* Retrieves whether the option to compute an approximation is set. * Retrieves whether the option to compute an approximation is set.
* *
@ -136,6 +143,7 @@ namespace storm {
static const std::string disableDCOptionName; static const std::string disableDCOptionName;
static const std::string allowDCRelevantOptionName; static const std::string allowDCRelevantOptionName;
static const std::string relevantEventsOptionName; static const std::string relevantEventsOptionName;
static const std::string addLabelsClaimingOptionName;
static const std::string approximationErrorOptionName; static const std::string approximationErrorOptionName;
static const std::string approximationErrorOptionShortName; static const std::string approximationErrorOptionShortName;
static const std::string approximationHeuristicOptionName; static const std::string approximationHeuristicOptionName;

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

@ -206,8 +206,6 @@ namespace storm {
break; break;
} }
//BEs //BEs
case storage::DFTElementType::BE_EXP:
case storage::DFTElementType::BE_CONST:
case storage::DFTElementType::BE: { case storage::DFTElementType::BE: {
auto be = std::static_pointer_cast<storm::storage::DFTBE<ValueType>>(currentElement); auto be = std::static_pointer_cast<storm::storage::DFTBE<ValueType>>(currentElement);
dynamicBehaviorVector[be->id()] = true; dynamicBehaviorVector[be->id()] = true;
@ -506,8 +504,7 @@ namespace storm {
case DFTElementType::OR: case DFTElementType::OR:
builder.addOrElement(newParentName, childrenNames); builder.addOrElement(newParentName, childrenNames);
break; break;
case DFTElementType::BE_EXP:
case DFTElementType::BE_CONST:
case DFTElementType::BE:
case DFTElementType::VOT: case DFTElementType::VOT:
case DFTElementType::PAND: case DFTElementType::PAND:
case DFTElementType::SPARE: case DFTElementType::SPARE:
@ -548,8 +545,7 @@ namespace storm {
case DFTElementType::AND: case DFTElementType::AND:
case DFTElementType::OR: case DFTElementType::OR:
case DFTElementType::VOT: case DFTElementType::VOT:
case DFTElementType::BE_EXP:
case DFTElementType::BE_CONST:
case DFTElementType::BE:
break; break;
case DFTElementType::PAND: case DFTElementType::PAND:
case DFTElementType::SPARE: case DFTElementType::SPARE:
@ -577,8 +573,7 @@ namespace storm {
case DFTElementType::VOT: case DFTElementType::VOT:
++noStatic; ++noStatic;
break; break;
case DFTElementType::BE_EXP:
case DFTElementType::BE_CONST:
case DFTElementType::BE:
case DFTElementType::PAND: case DFTElementType::PAND:
case DFTElementType::SPARE: case DFTElementType::SPARE:
case DFTElementType::POR: case DFTElementType::POR:
@ -701,13 +696,7 @@ namespace storm {
stream << storm::storage::toChar(DFTState<ValueType>::getElementState(status, stateGenerationInfo, elem->id())); stream << storm::storage::toChar(DFTState<ValueType>::getElementState(status, stateGenerationInfo, elem->id()));
if (elem->isSpareGate()) { if (elem->isSpareGate()) {
stream << "["; stream << "[";
size_t nrUsedChild = status.getAsInt(stateGenerationInfo.getSpareUsageIndex(elem->id()), stateGenerationInfo.usageInfoBits());
size_t useId;
if (nrUsedChild == getMaxSpareChildCount()) {
useId = elem->id();
} else {
useId = getChild(elem->id(), nrUsedChild);
}
size_t useId = this->uses(status, stateGenerationInfo, elem->id());
if (useId == elem->id() || status[stateGenerationInfo.getSpareActivationIndex(useId)]) { if (useId == elem->id() || status[stateGenerationInfo.getSpareActivationIndex(useId)]) {
stream << "actively "; stream << "actively ";
} }
@ -765,14 +754,17 @@ namespace storm {
// Check independence of spare modules // Check independence of spare modules
// TODO: comparing one element of each spare module sufficient? // TODO: comparing one element of each spare module sufficient?
for (auto module1 = mSpareModules.begin(); module1 != mSpareModules.end(); ++module1) { for (auto module1 = mSpareModules.begin(); module1 != mSpareModules.end(); ++module1) {
size_t firstElement = module1->second.front();
for (auto module2 = std::next(module1); module2 != mSpareModules.end(); ++module2) {
if (std::find(module2->second.begin(), module2->second.end(), firstElement) != module2->second.end()) {
if (!wellformed) {
stream << std::endl;
if (!module1->second.empty()) {
// Empty modules are allowed for the primary module of a spare gate
size_t firstElement = module1->second.front();
for (auto module2 = std::next(module1); module2 != mSpareModules.end(); ++module2) {
if (std::find(module2->second.begin(), module2->second.end(), firstElement) != module2->second.end()) {
if (!wellformed) {
stream << std::endl;
}
stream << "Spare modules of '" << getElement(module1->first)->name() << "' and '" << getElement(module2->first)->name() << "' should not overlap.";
wellformed = false;
} }
stream << "Spare modules of '" << getElement(module1->first)->name() << "' and '" << getElement(module2->first)->name() << "' should not overlap.";
wellformed = false;
} }
} }
} }
@ -1089,8 +1081,7 @@ namespace storm {
size_t noRestriction = 0; size_t noRestriction = 0;
for (auto const& elem : mElements) { for (auto const& elem : mElements) {
switch (elem->type()) { switch (elem->type()) {
case DFTElementType::BE_EXP:
case DFTElementType::BE_CONST:
case DFTElementType::BE:
++noBE; ++noBE;
break; break;
case DFTElementType::AND: case DFTElementType::AND:

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

@ -160,17 +160,17 @@ namespace storm {
if (elem->isBasicElement()) { if (elem->isBasicElement()) {
std::shared_ptr<DFTBE<ValueType>> be = std::static_pointer_cast<DFTBE<ValueType>>(elem); std::shared_ptr<DFTBE<ValueType>> be = std::static_pointer_cast<DFTBE<ValueType>>(elem);
if (be->canFail()) { if (be->canFail()) {
switch (be->type()) {
case storm::storage::DFTElementType::BE_EXP: {
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
result.push_back(be->id());
break;
case storm::storage::BEType::EXPONENTIAL: {
auto beExp = std::static_pointer_cast<BEExponential<ValueType>>(be); auto beExp = std::static_pointer_cast<BEExponential<ValueType>>(be);
if (!beExp->isColdBasicElement()) { if (!beExp->isColdBasicElement()) {
result.push_back(be->id()); result.push_back(be->id());
} }
break; break;
} }
case storm::storage::DFTElementType::BE_CONST:
result.push_back(be->id());
break;
default: default:
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "BE type '" << be->type() << "' is not supported."); STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "BE type '" << be->type() << "' is not supported.");
} }
@ -287,7 +287,25 @@ namespace storm {
bool isFailsafe(storm::storage::BitVector const& state, DFTStateGenerationInfo const& stateGenerationInfo) const { bool isFailsafe(storm::storage::BitVector const& state, DFTStateGenerationInfo const& stateGenerationInfo) const {
return storm::storage::DFTState<ValueType>::isFailsafe(state, stateGenerationInfo.getStateIndex(mTopLevelIndex)); return storm::storage::DFTState<ValueType>::isFailsafe(state, stateGenerationInfo.getStateIndex(mTopLevelIndex));
} }
/*!
* Return id of used child for a given spare gate.
* If no child is used the id of the spare gate is returned.
*
* @param state DFT state.
* @param stateGenerationInfo State generation information.
* @param id Id of spare gate.
* @return Id of used child. Id of spare gate if no child is used.
*/
size_t uses(storm::storage::BitVector const& state, DFTStateGenerationInfo const& stateGenerationInfo, size_t id) const {
size_t nrUsedChild = storm::storage::DFTState<ValueType>::usesIndex(state, stateGenerationInfo, id);
if (nrUsedChild == getMaxSpareChildCount()) {
return id;
} else {
return getChild(id, nrUsedChild);
}
}
size_t getChild(size_t spareId, size_t nrUsedChild) const; size_t getChild(size_t spareId, size_t nrUsedChild) const;
size_t getNrChild(size_t spareId, size_t childId) const; size_t getNrChild(size_t spareId, size_t childId) const;

42
src/storm-dft/storage/dft/DFTElementType.h

@ -9,9 +9,8 @@ namespace storm {
* Element types in a DFT. * Element types in a DFT.
*/ */
enum class DFTElementType { enum class DFTElementType {
BE_EXP, BE_CONST,
AND, OR, VOT,
BE, BE,
AND, OR, VOT,
PAND, PAND,
POR, POR,
SPARE, SPARE,
@ -20,6 +19,16 @@ namespace storm {
MUTEX MUTEX
}; };
/*!
* BE types in a DFT.
*/
enum class BEType {
CONSTANT,
EXPONENTIAL,
SAMPLES
};
inline bool isGateType(DFTElementType const& type) { inline bool isGateType(DFTElementType const& type) {
switch (type) { switch (type) {
case DFTElementType::AND: case DFTElementType::AND:
@ -29,8 +38,7 @@ namespace storm {
case DFTElementType::POR: case DFTElementType::POR:
case DFTElementType::SPARE: case DFTElementType::SPARE:
return true; return true;
case DFTElementType::BE_EXP:
case DFTElementType::BE_CONST:
case DFTElementType::BE:
case DFTElementType::PDEP: case DFTElementType::PDEP:
case DFTElementType::SEQ: case DFTElementType::SEQ:
case DFTElementType::MUTEX: case DFTElementType::MUTEX:
@ -60,12 +68,10 @@ namespace storm {
} }
} }
inline std::string toString(DFTElementType const& tp) {
switch (tp) {
case DFTElementType::BE_EXP:
return "BE_EXP";
case DFTElementType::BE_CONST:
return "BE_CONST";
inline std::string toString(DFTElementType const& type) {
switch (type) {
case DFTElementType::BE:
return "BE";
case DFTElementType::AND: case DFTElementType::AND:
return "AND"; return "AND";
case DFTElementType::OR: case DFTElementType::OR:
@ -90,9 +96,25 @@ namespace storm {
} }
} }
inline std::string toString(BEType const& type) {
switch (type) {
case BEType::CONSTANT:
return "CONST";
case BEType::EXPONENTIAL:
return "EXPONENTIAL";
default:
STORM_LOG_ASSERT(false, "BE type not known.");
return "";
}
}
inline std::ostream& operator<<(std::ostream& os, DFTElementType const& type) { inline std::ostream& operator<<(std::ostream& os, DFTElementType const& type) {
return os << toString(type); return os << toString(type);
} }
inline std::ostream& operator<<(std::ostream& os, BEType const& type) {
return os << toString(type);
}
} }
} }

15
src/storm-dft/storage/dft/DFTElements.h

@ -1,13 +1,18 @@
#pragma once #pragma once
#include "storm-dft/storage/dft/elements/BEExponential.h"
// BE types
#include "storm-dft/storage/dft/elements/BEConst.h" #include "storm-dft/storage/dft/elements/BEConst.h"
#include "storm-dft/storage/dft/elements/BEExponential.h"
#include "storm-dft/storage/dft/elements/BESamples.h"
// Gates
#include "storm-dft/storage/dft/elements/DFTAnd.h" #include "storm-dft/storage/dft/elements/DFTAnd.h"
#include "storm-dft/storage/dft/elements/DFTDependency.h"
#include "storm-dft/storage/dft/elements/DFTMutex.h"
#include "storm-dft/storage/dft/elements/DFTOr.h" #include "storm-dft/storage/dft/elements/DFTOr.h"
#include "storm-dft/storage/dft/elements/DFTVot.h"
#include "storm-dft/storage/dft/elements/DFTPand.h" #include "storm-dft/storage/dft/elements/DFTPand.h"
#include "storm-dft/storage/dft/elements/DFTPor.h" #include "storm-dft/storage/dft/elements/DFTPor.h"
#include "storm-dft/storage/dft/elements/DFTSeq.h"
#include "storm-dft/storage/dft/elements/DFTSpare.h" #include "storm-dft/storage/dft/elements/DFTSpare.h"
#include "storm-dft/storage/dft/elements/DFTVot.h"
#include "storm-dft/storage/dft/elements/DFTDependency.h"
#include "storm-dft/storage/dft/elements/DFTSeq.h"
#include "storm-dft/storage/dft/elements/DFTMutex.h"

52
src/storm-dft/storage/dft/DFTIsomorphism.h

@ -57,15 +57,15 @@ namespace storage {
BEColourClass() = default; BEColourClass() = default;
BEColourClass(storm::storage::DFTElementType t, ValueType a, ValueType p, size_t h) : type(t), hash(h), aRate(a), pRate(p) {
STORM_LOG_ASSERT(t == storm::storage::DFTElementType::BE_EXP, "Expected type BE_EXP but got type " << t);
BEColourClass(storm::storage::BEType t, ValueType a, ValueType p, size_t h) : type(t), hash(h), aRate(a), pRate(p) {
STORM_LOG_ASSERT(t == storm::storage::BEType::EXPONENTIAL, "Expected type EXPONENTIAL but got type " << t);
} }
BEColourClass(storm::storage::DFTElementType t, bool fail, size_t h) : type(t), hash(h), failed(fail) {
STORM_LOG_ASSERT(t == storm::storage::DFTElementType::BE_CONST, "Expected type BE_CONST but got type " << t);
BEColourClass(storm::storage::BEType t, bool fail, size_t h) : type(t), hash(h), failed(fail) {
STORM_LOG_ASSERT(t == storm::storage::BEType::CONSTANT, "Expected type CONSTANT but got type " << t);
} }
storm::storage::DFTElementType type;
storm::storage::BEType type;
size_t hash; size_t hash;
ValueType aRate; ValueType aRate;
ValueType pRate; ValueType pRate;
@ -79,9 +79,9 @@ namespace storage {
return false; return false;
} }
switch (lhs.type) { switch (lhs.type) {
case storm::storage::DFTElementType::BE_EXP:
case storm::storage::BEType::EXPONENTIAL:
return lhs.hash == rhs.hash && lhs.aRate == rhs.aRate && lhs.pRate == rhs.pRate; return lhs.hash == rhs.hash && lhs.aRate == rhs.aRate && lhs.pRate == rhs.pRate;
case storm::storage::DFTElementType::BE_CONST:
case storm::storage::BEType::CONSTANT:
return lhs.hash == rhs.hash && lhs.failed == rhs.failed; return lhs.hash == rhs.hash && lhs.failed == rhs.failed;
default: default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << lhs.type << "' is not known."); STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << lhs.type << "' is not known.");
@ -271,21 +271,21 @@ namespace storage {
protected: protected:
void colourize(std::shared_ptr<const DFTBE<ValueType>> const& be) { void colourize(std::shared_ptr<const DFTBE<ValueType>> const& be) {
switch (be->type()) {
case storm::storage::DFTElementType::BE_EXP:
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
{ {
auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be);
beColour[beExp->id()] = BEColourClass<ValueType>(beExp->type(), beExp->activeFailureRate(), beExp->passiveFailureRate(), beExp->nrParents());
auto beConst = std::static_pointer_cast<BEConst<ValueType> const>(be);
beColour[beConst->id()] = BEColourClass<ValueType>(beConst->beType(), beConst->failed(), beConst->nrParents());
break; break;
} }
case storm::storage::DFTElementType::BE_CONST:
case storm::storage::BEType::EXPONENTIAL:
{ {
auto beConst = std::static_pointer_cast<BEConst<ValueType> const>(be);
beColour[beConst->id()] = BEColourClass<ValueType>(beConst->type(), beConst->failed(), beConst->nrParents());
auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be);
beColour[beExp->id()] = BEColourClass<ValueType>(beExp->beType(), beExp->activeFailureRate(), beExp->passiveFailureRate(), beExp->nrParents());
break; break;
} }
default: default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->type() << "' is not known.");
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->beType() << "' is not known.");
break; break;
} }
} }
@ -299,21 +299,21 @@ namespace storage {
void colourize(std::shared_ptr<const DFTDependency<ValueType>> const& dep) { void colourize(std::shared_ptr<const DFTDependency<ValueType>> const& dep) {
// TODO this can be improved for n-ary dependencies. // TODO this can be improved for n-ary dependencies.
std::shared_ptr<DFTBE<ValueType> const> be = dep->dependentEvents()[0]; std::shared_ptr<DFTBE<ValueType> const> be = dep->dependentEvents()[0];
switch (be->type()) {
case storm::storage::DFTElementType::BE_EXP:
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
{ {
auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be);
depColour[dep->id()] = std::pair<ValueType, ValueType>(dep->probability(), beExp->activeFailureRate());
auto beConst = std::static_pointer_cast<BEConst<ValueType> const>(be);
depColour[dep->id()] = std::pair<ValueType, ValueType>(dep->probability(), beConst->failed() ? storm::utility::one<ValueType>() : storm::utility::zero<ValueType>());
break; break;
} }
case storm::storage::DFTElementType::BE_CONST:
case storm::storage::BEType::EXPONENTIAL:
{ {
auto beConst = std::static_pointer_cast<BEConst<ValueType> const>(be);
depColour[dep->id()] = std::pair<ValueType, ValueType>(dep->probability(), beConst->failed() ? storm::utility::one<ValueType>() : storm::utility::zero<ValueType>());
auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be);
depColour[dep->id()] = std::pair<ValueType, ValueType>(dep->probability(), beExp->activeFailureRate());
break; break;
} }
default: default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->type() << "' is not known.");
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->beType() << "' is not known.");
break; break;
} }
} }
@ -706,10 +706,10 @@ namespace std {
groupHash |= (static_cast<uint_fast64_t>(bcc.type) & fivebitmask) << (62 - 5); groupHash |= (static_cast<uint_fast64_t>(bcc.type) & fivebitmask) << (62 - 5);
switch (bcc.type) { switch (bcc.type) {
case storm::storage::DFTElementType::BE_EXP:
return (hasher(bcc.aRate) ^ hasher(bcc.pRate) << 8);
case storm::storage::DFTElementType::BE_CONST:
case storm::storage::BEType::CONSTANT:
return (bcc.failed << 8); return (bcc.failed << 8);
case storm::storage::BEType::EXPONENTIAL:
return (hasher(bcc.aRate) ^ hasher(bcc.pRate) << 8);
default: default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << bcc.type << "' is not known."); STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << bcc.type << "' is not known.");
break; break;

29
src/storm-dft/storage/dft/DFTState.cpp

@ -49,8 +49,12 @@ namespace storm {
if (mDft.isBasicElement(index) && isOperational(index) && !isEventDisabledViaRestriction(index)) { if (mDft.isBasicElement(index) && isOperational(index) && !isEventDisabledViaRestriction(index)) {
std::shared_ptr<const DFTBE<ValueType>> be = mDft.getBasicElement(index); std::shared_ptr<const DFTBE<ValueType>> be = mDft.getBasicElement(index);
if (be->canFail()) { if (be->canFail()) {
switch (be->type()) {
case storm::storage::DFTElementType::BE_EXP:
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
failableElements.addBE(index);
STORM_LOG_TRACE("Currently failable: " << *be);
break;
case storm::storage::BEType::EXPONENTIAL:
{ {
auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be); auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be);
if (!beExp->isColdBasicElement() || !mDft.hasRepresentant(index) || isActive(mDft.getRepresentant(index))) { if (!beExp->isColdBasicElement() || !mDft.hasRepresentant(index) || isActive(mDft.getRepresentant(index))) {
@ -59,10 +63,6 @@ namespace storm {
} }
break; break;
} }
case storm::storage::DFTElementType::BE_CONST:
failableElements.addBE(index);
STORM_LOG_TRACE("Currently failable: " << *be);
break;
default: default:
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "BE type '" << be->type() << "' is not supported."); STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "BE type '" << be->type() << "' is not supported.");
break; break;
@ -315,7 +315,7 @@ namespace storm {
template<typename ValueType> template<typename ValueType>
ValueType DFTState<ValueType>::getBERate(size_t id) const { ValueType DFTState<ValueType>::getBERate(size_t id) const {
STORM_LOG_ASSERT(mDft.isBasicElement(id), "Element is no BE."); STORM_LOG_ASSERT(mDft.isBasicElement(id), "Element is no BE.");
STORM_LOG_THROW(mDft.getBasicElement(id)->type() == storm::storage::DFTElementType::BE_EXP, storm::exceptions::NotSupportedException, "BE of type '" << mDft.getBasicElement(id)->type() << "' is not supported.");
STORM_LOG_THROW(mDft.getBasicElement(id)->beType() == storm::storage::BEType::EXPONENTIAL, storm::exceptions::NotSupportedException, "BE of type '" << mDft.getBasicElement(id)->type() << "' is not supported.");
auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(mDft.getBasicElement(id)); auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(mDft.getBasicElement(id));
if (mDft.hasRepresentant(id) && !isActive(mDft.getRepresentant(id))) { if (mDft.hasRepresentant(id) && !isActive(mDft.getRepresentant(id))) {
// Return passive failure rate // Return passive failure rate
@ -380,8 +380,11 @@ namespace storm {
if(mDft.isBasicElement(elem) && isOperational(elem) && !isEventDisabledViaRestriction(elem)) { if(mDft.isBasicElement(elem) && isOperational(elem) && !isEventDisabledViaRestriction(elem)) {
std::shared_ptr<const DFTBE<ValueType>> be = mDft.getBasicElement(elem); std::shared_ptr<const DFTBE<ValueType>> be = mDft.getBasicElement(elem);
if (be->canFail()) { if (be->canFail()) {
switch (be->type()) {
case storm::storage::DFTElementType::BE_EXP: {
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
// Nothing to do
break;
case storm::storage::BEType::EXPONENTIAL: {
auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be); auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be);
if (beExp->isColdBasicElement()) { if (beExp->isColdBasicElement()) {
// Add to failable BEs // Add to failable BEs
@ -389,9 +392,6 @@ namespace storm {
} }
break; break;
} }
case storm::storage::DFTElementType::BE_CONST:
// Nothing to do
break;
default: default:
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "BE type '" << be->type() << "' is not supported."); STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "BE type '" << be->type() << "' is not supported.");
} }
@ -412,6 +412,11 @@ namespace storm {
} }
} }
template<typename ValueType>
uint_fast64_t DFTState<ValueType>::usesIndex(storm::storage::BitVector const& state, DFTStateGenerationInfo const& stateGenerationInfo, size_t id) {
return state.getAsInt(stateGenerationInfo.getSpareUsageIndex(id), stateGenerationInfo.usageInfoBits());
}
template<typename ValueType> template<typename ValueType>
uint_fast64_t DFTState<ValueType>::extractUses(size_t from) const { uint_fast64_t DFTState<ValueType>::extractUses(size_t from) const {
STORM_LOG_ASSERT(mStateGenerationInfo.usageInfoBits() < 64, "UsageInfoBit size too large."); STORM_LOG_ASSERT(mStateGenerationInfo.usageInfoBits() < 64, "UsageInfoBit size too large.");

11
src/storm-dft/storage/dft/DFTState.h

@ -259,6 +259,17 @@ namespace storm {
* the spare. * the spare.
*/ */
uint_fast64_t uses(size_t id) const; uint_fast64_t uses(size_t id) const;
/**
* Returns the index of the used child for a spare gate.
* If no element is used, the maximal spare count is returned.
*
* @param state DFT state.
* @param stateGenerationInfo State generation info.
* @param id Id of spare gate.
* @return Index of used child. Maximal spare count if no child is usde.
*/
static uint_fast64_t usesIndex(storm::storage::BitVector const& state, DFTStateGenerationInfo const& stateGenerationInfo, size_t id);
/** /**
* This method is commonly used to get the usage information for spares. * This method is commonly used to get the usage information for spares.

24
src/storm-dft/storage/dft/DftJsonExporter.cpp

@ -1,6 +1,6 @@
#include "DftJsonExporter.h" #include "DftJsonExporter.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/exceptions/NotSupportedException.h" #include "storm/exceptions/NotSupportedException.h"
#include <algorithm> #include <algorithm>
@ -88,8 +88,16 @@ namespace storm {
} else if (element->isBasicElement()) { } else if (element->isBasicElement()) {
std::shared_ptr<DFTBE<ValueType> const> be = std::static_pointer_cast<DFTBE<ValueType> const>(element); std::shared_ptr<DFTBE<ValueType> const> be = std::static_pointer_cast<DFTBE<ValueType> const>(element);
// Set BE specific data // Set BE specific data
switch (element->type()) {
case storm::storage::DFTElementType::BE_EXP:
switch (be->beType()) {
case storm::storage::BEType::CONSTANT:
{
auto beConst = std::static_pointer_cast<BEConst<ValueType> const>(be);
std::stringstream stream;
nodeData["distribution"] = "const";
nodeData["failed"] = beConst->failed();
break;
}
case storm::storage::BEType::EXPONENTIAL:
{ {
auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be); auto beExp = std::static_pointer_cast<BEExponential<ValueType> const>(be);
std::stringstream stream; std::stringstream stream;
@ -101,16 +109,8 @@ namespace storm {
nodeData["dorm"] = stream.str(); nodeData["dorm"] = stream.str();
break; break;
} }
case storm::storage::DFTElementType::BE_CONST:
{
auto beConst = std::static_pointer_cast<BEConst<ValueType> const>(be);
std::stringstream stream;
nodeData["distribution"] = "const";
nodeData["failed"] = beConst->failed();
break;
}
default: default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->type() << "' is not known.");
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE of type '" << be->beType() << "' is not known.");
break; break;
} }
} else { } else {

16
src/storm-dft/storage/dft/elements/BEConst.cpp

@ -0,0 +1,16 @@
#include "BEConst.h"
namespace storm {
namespace storage {
template <typename ValueType>
ValueType BEConst<ValueType>::getUnreliability(ValueType time) const {
return failed() ? storm::utility::one<ValueType>() : storm::utility::zero<ValueType>();
}
// Explicitly instantiate the class.
template class BEConst<double>;
template class BEConst<RationalFunction>;
} // namespace storage
} // namespace storm

8
src/storm-dft/storage/dft/elements/BEConst.h

@ -23,8 +23,8 @@ namespace storm {
// Intentionally empty // Intentionally empty
} }
DFTElementType type() const override {
return DFTElementType::BE_CONST;
BEType beType() const override {
return BEType::CONSTANT;
} }
/*! /*!
@ -39,8 +39,10 @@ namespace storm {
return this->failed(); return this->failed();
} }
ValueType getUnreliability(ValueType time) const override;
bool isTypeEqualTo(DFTElement<ValueType> const& other) const override { bool isTypeEqualTo(DFTElement<ValueType> const& other) const override {
if (!DFTElement<ValueType>::isTypeEqualTo(other)) {
if (!DFTBE<ValueType>::isTypeEqualTo(other)) {
return false; return false;
} }
auto& otherBE = static_cast<BEConst<ValueType> const&>(other); auto& otherBE = static_cast<BEConst<ValueType> const&>(other);

24
src/storm-dft/storage/dft/elements/BEExponential.cpp

@ -0,0 +1,24 @@
#include "BEExponential.h"
#include "storm/exceptions/NotSupportedException.h"
namespace storm {
namespace storage {
template <>
double BEExponential<double>::getUnreliability(double time) const {
// 1 - e^(-lambda * t)
return 1 - exp(-this->activeFailureRate() * time);
}
template <typename ValueType>
ValueType BEExponential<ValueType>::getUnreliability(ValueType time) const {
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Computing cumulative failure probability not supported for this data type.");
}
// Explicitly instantiate the class.
template class BEExponential<double>;
template class BEExponential<RationalFunction>;
}
}

16
src/storm-dft/storage/dft/elements/BEExponential.h

@ -25,8 +25,8 @@ namespace storm {
STORM_LOG_ASSERT(!storm::utility::isZero<ValueType>(failureRate), "Exponential failure rate should not be zero."); STORM_LOG_ASSERT(!storm::utility::isZero<ValueType>(failureRate), "Exponential failure rate should not be zero.");
} }
DFTElementType type() const override {
return DFTElementType::BE_EXP;
BEType beType() const override {
return BEType::EXPONENTIAL;
} }
/*! /*!
@ -50,14 +50,12 @@ namespace storm {
* @return Dormancy factor. * @return Dormancy factor.
*/ */
ValueType dormancyFactor() const { ValueType dormancyFactor() const {
if (storm::utility::isZero<ValueType>(this->activeFailureRate())) {
// Return default value of 1
return storm::utility::one<ValueType>();
} else {
return this->passiveFailureRate() / this->activeFailureRate();
}
STORM_LOG_ASSERT(!storm::utility::isZero<ValueType>(this->activeFailureRate()), "Active failure rate of non-const BE should not be zero.");
return this->passiveFailureRate() / this->activeFailureRate();
} }
ValueType getUnreliability(ValueType time) const override;
/*! /*!
* Return whether the BE experiences transient failures. * Return whether the BE experiences transient failures.
* @return True iff BE is transient. * @return True iff BE is transient.
@ -80,7 +78,7 @@ namespace storm {
} }
bool isTypeEqualTo(DFTElement<ValueType> const& other) const override { bool isTypeEqualTo(DFTElement<ValueType> const& other) const override {
if (!DFTElement<ValueType>::isTypeEqualTo(other)) {
if (!DFTBE<ValueType>::isTypeEqualTo(other)) {
return false; return false;
} }
auto& otherBE = static_cast<BEExponential<ValueType> const&>(other); auto& otherBE = static_cast<BEExponential<ValueType> const&>(other);

20
src/storm-dft/storage/dft/elements/BESamples.cpp

@ -0,0 +1,20 @@
#include "BESamples.h"
#include "storm/exceptions/InvalidArgumentException.h"
namespace storm {
namespace storage {
template <typename ValueType>
ValueType BESamples<ValueType>::getUnreliability(ValueType time) const {
auto iter = mActiveSamples.find(time);
STORM_LOG_THROW(iter!= mActiveSamples.end(), storm::exceptions::InvalidArgumentException, "No sample for time point " << time << " given.");
return iter->second;
}
// Explicitly instantiate the class.
template class BESamples<double>;
template class BESamples<RationalFunction>;
}
}

74
src/storm-dft/storage/dft/elements/BESamples.h

@ -0,0 +1,74 @@
#pragma once
#include "DFTBE.h"
#include <map>
namespace storm {
namespace storage {
/*!
* BE where the failure distribution is defined by samples.
* A sample defines the unreliability at a time point (i.e. the cumulative distribution function F(x)).
*/
template<typename ValueType>
class BESamples : public DFTBE<ValueType> {
public:
/*!
* Constructor.
* @param id Id.
* @param name Name.
* @param activeSamples Samples defining unreliability in active state for certain time points.
*/
BESamples(size_t id, std::string const& name, std::map<ValueType, ValueType> activeSamples) :
DFTBE<ValueType>(id, name), mActiveSamples(activeSamples) {
STORM_LOG_ASSERT(activeSamples.size() > 0, "At least one sample should be given.");
STORM_LOG_ASSERT(this->canFail(), "At least one sample should have a non-zero probability.");
}
BEType beType() const override {
return BEType::SAMPLES;
}
/*!
* Return samples defining unreliability in active state.
* @return Samples for active state.
*/
std::map<ValueType, ValueType> const& activeSamples() const {
return mActiveSamples;
}
ValueType getUnreliability(ValueType time) const override;
bool canFail() const override {
// At least one sample is not zero
for (auto const& sample : mActiveSamples) {
if (!storm::utility::isZero(sample.second)) {
return true;
}
}
return true;
}
bool isTypeEqualTo(DFTElement<ValueType> const& other) const override {
if (!DFTBE<ValueType>::isTypeEqualTo(other)) {
return false;
}
auto& otherBE = static_cast<BESamples<ValueType> const&>(other);
return mActiveSamples.size() == otherBE.activeSamples().size() && std::equal(mActiveSamples.begin(), mActiveSamples.end(), otherBE.activeSamples().begin());
}
std::string toString() const override {
std::stringstream stream;
stream << "{" << this->name() << "} BE samples(" << this->activeSamples().size() << " samples)";
return stream.str();
}
private:
std::map<ValueType, ValueType> mActiveSamples;
};
}
}

33
src/storm-dft/storage/dft/elements/DFTBE.cpp

@ -0,0 +1,33 @@
#include "DFTBE.h"
#include "storm-dft/storage/dft/elements/DFTGate.h"
#include "storm-dft/storage/dft/elements/DFTDependency.h"
namespace storm {
namespace storage {
template <typename ValueType>
void DFTBE<ValueType>::extendSubDft(std::set<size_t>& elemsInSubtree, std::vector<size_t> const& parentsOfSubRoot, bool blockParents, bool sparesAsLeaves) const {
if (elemsInSubtree.count(this->id())) {
return;
}
DFTElement<ValueType>::extendSubDft(elemsInSubtree, parentsOfSubRoot, blockParents, sparesAsLeaves);
if (elemsInSubtree.empty()) {
// Parent in the subDFT, i.e., it is *not* a subDFT
return;
}
for (auto const& inDep : ingoingDependencies()) {
inDep->extendSubDft(elemsInSubtree, parentsOfSubRoot, blockParents, sparesAsLeaves);
if (elemsInSubtree.empty()) {
// Parent in the subDFT, i.e., it is *not* a subDFT
return;
}
}
}
// Explicitly instantiate the class.
template class DFTBE<double>;
template class DFTBE<RationalFunction>;
}
}

45
src/storm-dft/storage/dft/elements/DFTBE.h

@ -22,10 +22,29 @@ namespace storm {
// Intentionally empty // Intentionally empty
} }
DFTElementType type() const override {
return DFTElementType::BE;
}
/*!
* Get type of BE (constant, exponential, etc.).
* @return BE type.
*/
virtual BEType beType() const = 0;
size_t nrChildren() const override { size_t nrChildren() const override {
return 0; return 0;
} }
/*!
* Return the unreliability of the BE up to the given time point.
* Computes the cumulative distribution function F(x) for time x.
* Note that the computation assumes the BE is always active.
*
* @return Cumulative failure probability.
*/
virtual ValueType getUnreliability(ValueType time) const = 0;
/*! /*!
* Return whether the BE can fail. * Return whether the BE can fail.
* @return True iff BE is not failsafe. * @return True iff BE is not failsafe.
@ -63,23 +82,7 @@ namespace storm {
return true; return true;
} }
void extendSubDft(std::set<size_t>& elemsInSubtree, std::vector<size_t> const& parentsOfSubRoot, bool blockParents, bool sparesAsLeaves) const override {
if (elemsInSubtree.count(this->id())) {
return;
}
DFTElement<ValueType>::extendSubDft(elemsInSubtree, parentsOfSubRoot, blockParents, sparesAsLeaves);
if (elemsInSubtree.empty()) {
// Parent in the subDFT, i.e., it is *not* a subDFT
return;
}
for (auto const& inDep : ingoingDependencies()) {
inDep->extendSubDft(elemsInSubtree, parentsOfSubRoot, blockParents, sparesAsLeaves);
if (elemsInSubtree.empty()) {
// Parent in the subDFT, i.e., it is *not* a subDFT
return;
}
}
}
void extendSubDft(std::set<size_t>& elemsInSubtree, std::vector<size_t> const& parentsOfSubRoot, bool blockParents, bool sparesAsLeaves) const override;
bool checkDontCareAnymore(storm::storage::DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const override { bool checkDontCareAnymore(storm::storage::DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const override {
if (DFTElement<ValueType>::checkDontCareAnymore(state, queues)) { if (DFTElement<ValueType>::checkDontCareAnymore(state, queues)) {
@ -89,6 +92,14 @@ namespace storm {
return false; return false;
} }
bool isTypeEqualTo(DFTElement<ValueType> const& other) const override {
if (!DFTElement<ValueType>::isTypeEqualTo(other)) {
return false;
}
auto& otherBE = static_cast<DFTBE<ValueType> const&>(other);
return this->beType() == otherBE.beType();
}
private: private:
std::vector<std::shared_ptr<DFTDependency<ValueType>>> mIngoingDependencies; std::vector<std::shared_ptr<DFTDependency<ValueType>>> mIngoingDependencies;

22
src/storm-dft/transformations/DftToGspnTransformator.cpp

@ -122,11 +122,8 @@ namespace storm {
// Check which type the element is and call the corresponding translate-function. // Check which type the element is and call the corresponding translate-function.
switch (dftElement->type()) { switch (dftElement->type()) {
case storm::storage::DFTElementType::BE_EXP:
translateBEExponential(std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(dftElement));
break;
case storm::storage::DFTElementType::BE_CONST:
translateBEConst(std::static_pointer_cast<storm::storage::BEConst<ValueType> const>(dftElement));
case storm::storage::DFTElementType::BE:
translateBE(std::static_pointer_cast<storm::storage::DFTBE<ValueType> const>(dftElement));
break; break;
case storm::storage::DFTElementType::AND: case storm::storage::DFTElementType::AND:
translateAND(std::static_pointer_cast<storm::storage::DFTAnd<ValueType> const>(dftElement)); translateAND(std::static_pointer_cast<storm::storage::DFTAnd<ValueType> const>(dftElement));
@ -167,6 +164,21 @@ namespace storm {
} }
template<typename ValueType>
void DftToGspnTransformator<ValueType>::translateBE(std::shared_ptr<storm::storage::DFTBE<ValueType> const> dftBE) {
switch (dftBE->beType()) {
case storm::storage::BEType::CONSTANT:
translateBEConst(std::static_pointer_cast<storm::storage::BEConst<ValueType> const>(dftBE));
break;
case storm::storage::BEType::EXPONENTIAL:
translateBEExponential(std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(dftBE));
break;
default:
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "BE type '" << dftBE->beType() << "' not known.");
break;
}
}
template<typename ValueType> template<typename ValueType>
void DftToGspnTransformator<ValueType>::translateBEExponential(std::shared_ptr<storm::storage::BEExponential<ValueType> const> dftBE) { void DftToGspnTransformator<ValueType>::translateBEExponential(std::shared_ptr<storm::storage::BEExponential<ValueType> const> dftBE) {
double xcenter = mDft.getElementLayoutInfo(dftBE->id()).x; double xcenter = mDft.getElementLayoutInfo(dftBE->id()).x;

7
src/storm-dft/transformations/DftToGspnTransformator.h

@ -61,6 +61,13 @@ namespace storm {
*/ */
void translateGSPNElements(); void translateGSPNElements();
/*!
* Translate a BE.
*
* @param dftBE The basic event.
*/
void translateBE(std::shared_ptr<storm::storage::DFTBE<ValueType> const> dftBE);
/*! /*!
* Translate an exponential BE. * Translate an exponential BE.
* *

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

@ -20,22 +20,28 @@ namespace storm {
for (size_t i = 0; i < dft.nrElements(); ++i) { for (size_t i = 0; i < dft.nrElements(); ++i) {
std::shared_ptr<storm::storage::DFTElement<ValueType> const> element = dft.getElement(i); std::shared_ptr<storm::storage::DFTElement<ValueType> const> element = dft.getElement(i);
switch (element->type()) { switch (element->type()) {
case storm::storage::DFTElementType::BE_EXP: {
auto be_exp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(
element);
builder.addBasicElementExponential(be_exp->name(), be_exp->activeFailureRate(),
be_exp->dormancyFactor());
break;
}
case storm::storage::DFTElementType::BE_CONST: {
auto be_const = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(
element);
if (be_const->canFail()) {
STORM_LOG_TRACE("Transform " + element->name() + " [BE (const failed)]");
failedBEs.push_back(be_const->name());
case storm::storage::DFTElementType::BE: {
auto be = std::static_pointer_cast<storm::storage::DFTBE<ValueType> const>(element);
switch (be->beType()) {
case storm::storage::BEType::CONSTANT: {
auto beConst = std::static_pointer_cast<storm::storage::BEConst<ValueType> const>(element);
if (beConst->canFail()) {
STORM_LOG_TRACE("Transform " + beConst->name() + " [BE (const failed)]");
failedBEs.push_back(beConst->name());
}
// All original constant BEs are set to failsafe, failed BEs are later triggered by a new element
builder.addBasicElementConst(beConst->name(), false);
break;
}
case storm::storage::BEType::EXPONENTIAL: {
auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(element);
builder.addBasicElementExponential(beExp->name(), beExp->activeFailureRate(), beExp->dormancyFactor(), beExp->isTransient());
break;
}
default:
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "BE type '" << be->beType() << "' not known.");
break;
} }
// All original constant BEs are set to failsafe, failed BEs are later triggered by a new element
builder.addBasicElementConst(be_const->name(), false);
break; break;
} }
case storm::storage::DFTElementType::AND: case storm::storage::DFTElementType::AND:
@ -107,18 +113,23 @@ namespace storm {
for (size_t i = 0; i < dft.nrElements(); ++i) { for (size_t i = 0; i < dft.nrElements(); ++i) {
std::shared_ptr<storm::storage::DFTElement<ValueType> const> element = dft.getElement(i); std::shared_ptr<storm::storage::DFTElement<ValueType> const> element = dft.getElement(i);
switch (element->type()) { switch (element->type()) {
case storm::storage::DFTElementType::BE_EXP: {
auto be_exp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(
element);
builder.addBasicElementExponential(be_exp->name(), be_exp->activeFailureRate(),
be_exp->dormancyFactor());
break;
}
case storm::storage::DFTElementType::BE_CONST: {
auto be_const = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(
element);
// All original constant BEs are set to failsafe, failed BEs are later triggered by a new element
builder.addBasicElementConst(be_const->name(), be_const->canFail());
case storm::storage::DFTElementType::BE: {
auto be = std::static_pointer_cast<storm::storage::DFTBE<ValueType> const>(element);
switch (be->beType()) {
case storm::storage::BEType::CONSTANT: {
auto beConst = std::static_pointer_cast<storm::storage::BEConst<ValueType> const>(element);
builder.addBasicElementConst(beConst->name(), beConst->canFail());
break;
}
case storm::storage::BEType::EXPONENTIAL: {
auto beExp = std::static_pointer_cast<storm::storage::BEExponential<ValueType> const>(element);
builder.addBasicElementExponential(beExp->name(), beExp->activeFailureRate(), beExp->dormancyFactor(), beExp->isTransient());
break;
}
default:
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "BE type '" << be->beType() << "' not known.");
break;
}
break; break;
} }
case storm::storage::DFTElementType::AND: case storm::storage::DFTElementType::AND:

18
src/storm-dft/utility/FDEPConflictFinder.cpp

@ -25,29 +25,29 @@ namespace storm {
if (dft.getDynamicBehavior()[dep1Index] && dft.getDynamicBehavior()[dep2Index]) { if (dft.getDynamicBehavior()[dep1Index] && dft.getDynamicBehavior()[dep2Index]) {
if (useSMT) { // if an SMT solver is to be used if (useSMT) { // if an SMT solver is to be used
if (dft.getDependency(dep1Index)->triggerEvent() == dft.getDependency(dep2Index)->triggerEvent()) { if (dft.getDependency(dep1Index)->triggerEvent() == dft.getDependency(dep2Index)->triggerEvent()) {
STORM_LOG_DEBUG("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name() << ": Same trigger");
STORM_LOG_TRACE("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name() << ": Same trigger");
res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index)); res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index));
} else { } else {
switch (smtChecker->checkDependencyConflict(dep1Index, dep2Index, timeout)) { switch (smtChecker->checkDependencyConflict(dep1Index, dep2Index, timeout)) {
case storm::solver::SmtSolver::CheckResult::Sat: case storm::solver::SmtSolver::CheckResult::Sat:
STORM_LOG_DEBUG("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
STORM_LOG_TRACE("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index)); res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index));
break; break;
case storm::solver::SmtSolver::CheckResult::Unknown: case storm::solver::SmtSolver::CheckResult::Unknown:
STORM_LOG_DEBUG("Unknown: Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
STORM_LOG_TRACE("Unknown: Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index)); res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index));
break; break;
default: default:
STORM_LOG_DEBUG("No conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
STORM_LOG_TRACE("No conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
break; break;
} }
} }
} else { } else {
STORM_LOG_DEBUG("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
STORM_LOG_TRACE("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index)); res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index));
} }
} else { } else {
STORM_LOG_DEBUG("Static behavior: No conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
STORM_LOG_TRACE("Static behavior: No conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
break; break;
} }
} }
@ -70,10 +70,10 @@ namespace storm {
for (size_t j = i + 1; j < dft.getDependencies().size(); ++j) { for (size_t j = i + 1; j < dft.getDependencies().size(); ++j) {
dep2Index = dft.getDependencies().at(j); dep2Index = dft.getDependencies().at(j);
if (dft.getDynamicBehavior()[dep1Index] && dft.getDynamicBehavior()[dep2Index]) { if (dft.getDynamicBehavior()[dep1Index] && dft.getDynamicBehavior()[dep2Index]) {
STORM_LOG_DEBUG("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
STORM_LOG_TRACE("Conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index)); res.emplace_back(std::pair<uint64_t, uint64_t>(dep1Index, dep2Index));
} else { } else {
STORM_LOG_DEBUG("Static behavior: No conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
STORM_LOG_TRACE("Static behavior: No conflict between " << dft.getElement(dep1Index)->name() << " and " << dft.getElement(dep2Index)->name());
break; break;
} }
} }
@ -88,4 +88,4 @@ namespace storm {
class FDEPConflictFinder<storm::RationalFunction>; class FDEPConflictFinder<storm::RationalFunction>;
} }
} }
}
}

8
src/storm-dft/utility/FailureBoundFinder.cpp

@ -15,8 +15,7 @@ namespace storm {
// Count dependent events // Count dependent events
for (size_t i = 0; i < dft.nrElements(); ++i) { for (size_t i = 0; i < dft.nrElements(); ++i) {
std::shared_ptr<storm::storage::DFTElement<double> const> element = dft.getElement(i); std::shared_ptr<storm::storage::DFTElement<double> const> element = dft.getElement(i);
if (element->type() == storm::storage::DFTElementType::BE_EXP ||
element->type() == storm::storage::DFTElementType::BE_CONST) {
if (element->isBasicElement()) {
auto be = std::static_pointer_cast<storm::storage::DFTBE<double> const>(element); auto be = std::static_pointer_cast<storm::storage::DFTBE<double> const>(element);
if (be->hasIngoingDependencies()) { if (be->hasIngoingDependencies()) {
++nrDepEvents; ++nrDepEvents;
@ -81,8 +80,7 @@ namespace storm {
// Count dependent events // Count dependent events
for (size_t i = 0; i < dft.nrElements(); ++i) { for (size_t i = 0; i < dft.nrElements(); ++i) {
std::shared_ptr<storm::storage::DFTElement<double> const> element = dft.getElement(i); std::shared_ptr<storm::storage::DFTElement<double> const> element = dft.getElement(i);
if (element->type() == storm::storage::DFTElementType::BE_EXP ||
element->type() == storm::storage::DFTElementType::BE_CONST) {
if (element->isBasicElement()) {
auto be = std::static_pointer_cast<storm::storage::DFTBE<double> const>(element); auto be = std::static_pointer_cast<storm::storage::DFTBE<double> const>(element);
if (be->hasIngoingDependencies()) { if (be->hasIngoingDependencies()) {
++nrDepEvents; ++nrDepEvents;
@ -236,4 +234,4 @@ namespace storm {
class FailureBoundFinder; class FailureBoundFinder;
} }
} }
}
}

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

@ -0,0 +1,69 @@
#pragma once
#include "storm-dft/storage/dft/DFT.h"
#include "storm-dft/settings/modules/FaultTreeSettings.h"
namespace storm {
namespace utility {
/*!
* Get relevant event names from labels in properties.
*
* @param dft DFT.
* @param properties List of properties. All events occurring in a property are relevant.
* @return List of relevant event names.
*/
template <typename ValueType>
std::vector<std::string> getRelevantEventNames(storm::storage::DFT<ValueType> const& dft, std::vector<std::shared_ptr<storm::logic::Formula const>> const& properties) {
// Get necessary labels from properties
std::vector<std::shared_ptr<storm::logic::AtomicLabelFormula const>> atomicLabels;
for (auto property : properties) {
property->gatherAtomicLabelFormulas(atomicLabels);
}
// Add relevant event names from properties
std::vector<std::string> relevantEventNames;
for (auto atomic : atomicLabels) {
std::string label = atomic->getLabel();
if (label == "failed" or label == "skipped") {
// Ignore as these label will always be added if necessary
} else {
// Get name of event
if (boost::ends_with(label, "_failed")) {
relevantEventNames.push_back(label.substr(0, label.size() - 7));
} else if (boost::ends_with(label, "_dc")) {
relevantEventNames.push_back(label.substr(0, label.size() - 3));
} else if (label.find("_claimed_") != std::string::npos) {
STORM_LOG_THROW(storm::settings::getModule<storm::settings::modules::FaultTreeSettings>().isAddLabelsClaiming(), storm::exceptions::InvalidArgumentException, "Claiming labels will not be exported but are required for label '" << label << "'. Try setting --labels-claiming.");
} else {
STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Label '" << label << "' not known.");
}
}
}
return relevantEventNames;
}
/*!
* Get relevant event id from relevant event name.
*
* @param dft DFT.
* @param relevantEventNames Names of relevant events.
* @return Set of relevant event ids.
*/
template <typename ValueType>
std::set<size_t> getRelevantEvents(storm::storage::DFT<ValueType> const& dft, std::vector<std::string> const& relevantEventNames) {
// Set relevant elements
std::set<size_t> relevantEvents; // Per default no event (except the toplevel event) is relevant
for (std::string const& relevantName : relevantEventNames) {
if (relevantName == "all") {
// All events are relevant
return dft.getAllIds();
} else {
// Find and add corresponding event id
relevantEvents.insert(dft.getIndex(relevantName));
}
}
return relevantEvents;
}
} // namespace utility
} // namespace storm

2
src/storm-gspn/api/storm-gspn.cpp

@ -1,7 +1,7 @@
#include "storm-gspn/api/storm-gspn.h" #include "storm-gspn/api/storm-gspn.h"
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm-gspn/settings/modules/GSPNExportSettings.h" #include "storm-gspn/settings/modules/GSPNExportSettings.h"
#include "storm-conv/settings/modules/JaniExportSettings.h" #include "storm-conv/settings/modules/JaniExportSettings.h"
#include "storm-conv/api/storm-conv.h" #include "storm-conv/api/storm-conv.h"

3
src/storm-gspn/parser/GreatSpnEditorProjectParser.cpp

@ -88,7 +88,8 @@ namespace storm {
if (name.compare("name") == 0) { if (name.compare("name") == 0) {
builder.setGspnName(storm::adapters::XMLtoString(attr->getNodeValue())); builder.setGspnName(storm::adapters::XMLtoString(attr->getNodeValue()));
} else if (name.compare("show-color-cmd") == 0 || } else if (name.compare("show-color-cmd") == 0 ||
name.compare("show-fluid-cmd") == 0) {
name.compare("show-fluid-cmd") == 0 ||
name.compare("zoom") == 0) {
// ignore node // ignore node
} else { } else {
// Found node or attribute which is at the moment not handled by this parser. // Found node or attribute which is at the moment not handled by this parser.

2
src/storm-pars-cli/storm-pars.cpp

@ -34,7 +34,7 @@
#include "storm/storage/StronglyConnectedComponentDecomposition.h" #include "storm/storage/StronglyConnectedComponentDecomposition.h"
#include "storm/storage/SymbolicModelDescription.h" #include "storm/storage/SymbolicModelDescription.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/initialize.h" #include "storm/utility/initialize.h"
#include "storm/utility/Stopwatch.h" #include "storm/utility/Stopwatch.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"

2
src/storm-pars/api/export.h

@ -1,4 +1,4 @@
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/exceptions/NotSupportedException.h" #include "storm/exceptions/NotSupportedException.h"
#include "storm/analysis/GraphConditions.h" #include "storm/analysis/GraphConditions.h"

2
src/storm-pars/api/region.h

@ -21,7 +21,7 @@
#include "storm/environment/Environment.h" #include "storm/environment/Environment.h"
#include "storm/api/transformation.h" #include "storm/api/transformation.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/models/sparse/Model.h" #include "storm/models/sparse/Model.h"
#include "storm/exceptions/UnexpectedException.h" #include "storm/exceptions/UnexpectedException.h"
#include "storm/exceptions/InvalidOperationException.h" #include "storm/exceptions/InvalidOperationException.h"

2
src/storm-pars/parser/ParameterRegionParser.cpp

@ -4,7 +4,7 @@
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/exceptions/InvalidArgumentException.h" #include "storm/exceptions/InvalidArgumentException.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
namespace storm { namespace storm {
namespace parser { namespace parser {

2
src/storm-parsers/parser/AtomicPropositionLabelingParser.cpp

@ -11,7 +11,7 @@
#include <string> #include <string>
#include <iostream> #include <iostream>
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include "storm-parsers/parser/MappedFile.h" #include "storm-parsers/parser/MappedFile.h"
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
#include "storm/exceptions/FileIoException.h" #include "storm/exceptions/FileIoException.h"

2
src/storm-parsers/parser/AutoParser.cpp

@ -12,7 +12,7 @@
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include "storm/utility/OsDetection.h" #include "storm/utility/OsDetection.h"
namespace storm { namespace storm {

2
src/storm-parsers/parser/DeterministicSparseTransitionParser.cpp

@ -8,7 +8,7 @@
#include <string> #include <string>
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include "storm-parsers/parser/MappedFile.h" #include "storm-parsers/parser/MappedFile.h"
#include "storm/exceptions/FileIoException.h" #include "storm/exceptions/FileIoException.h"
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"

2
src/storm-parsers/parser/DirectEncodingParser.cpp

@ -23,7 +23,7 @@
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/builder.h" #include "storm/utility/builder.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/SignalHandler.h" #include "storm/utility/SignalHandler.h"

2
src/storm-parsers/parser/FormulaParser.cpp

@ -14,7 +14,7 @@
#include "storm/storage/expressions/ExpressionEvaluator.h" #include "storm/storage/expressions/ExpressionEvaluator.h"
#include "FormulaParserGrammar.h" #include "FormulaParserGrammar.h"
#include "storm/storage/expressions/ExpressionManager.h" #include "storm/storage/expressions/ExpressionManager.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
namespace storm { namespace storm {
namespace parser { namespace parser {

2
src/storm-parsers/parser/ImcaMarkovAutomatonParser.cpp

@ -2,7 +2,7 @@
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/settings/modules/BuildSettings.h" #include "storm/settings/modules/BuildSettings.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/builder.h" #include "storm/utility/builder.h"
namespace storm { namespace storm {

2
src/storm-parsers/parser/JaniParser.cpp

@ -28,7 +28,7 @@
#include "storm/storage/jani/ArrayVariable.h" #include "storm/storage/jani/ArrayVariable.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
namespace storm { namespace storm {
namespace parser { namespace parser {

2
src/storm-parsers/parser/MappedFile.cpp

@ -15,7 +15,7 @@
#include "storm/exceptions/FileIoException.h" #include "storm/exceptions/FileIoException.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
namespace storm { namespace storm {
namespace parser { namespace parser {

2
src/storm-parsers/parser/MarkovAutomatonSparseTransitionParser.cpp

@ -5,7 +5,7 @@
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
#include "storm/exceptions/FileIoException.h" #include "storm/exceptions/FileIoException.h"
#include "storm-parsers/parser/MappedFile.h" #include "storm-parsers/parser/MappedFile.h"
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"

2
src/storm-parsers/parser/NondeterministicSparseTransitionParser.cpp

@ -11,7 +11,7 @@
#include "storm/exceptions/InvalidArgumentException.h" #include "storm/exceptions/InvalidArgumentException.h"
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"

2
src/storm-parsers/parser/PrismParser.cpp

@ -6,7 +6,7 @@
#include "storm/exceptions/InvalidArgumentException.h" #include "storm/exceptions/InvalidArgumentException.h"
#include "storm/exceptions/InvalidTypeException.h" #include "storm/exceptions/InvalidTypeException.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
#include "storm/exceptions/UnexpectedException.h" #include "storm/exceptions/UnexpectedException.h"

2
src/storm-parsers/parser/ReadValues.h

@ -1,7 +1,7 @@
#ifndef _STORM_PARSER_READVALUES_H #ifndef _STORM_PARSER_READVALUES_H
#define _STORM_PARSER_READVALUES_H #define _STORM_PARSER_READVALUES_H
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
namespace storm namespace storm
{ {

2
src/storm-parsers/parser/SparseChoiceLabelingParser.cpp

@ -5,7 +5,7 @@
#include "storm/exceptions/OutOfRangeException.h" #include "storm/exceptions/OutOfRangeException.h"
#include "storm/exceptions/FileIoException.h" #include "storm/exceptions/FileIoException.h"
#include "storm-parsers/parser/MappedFile.h" #include "storm-parsers/parser/MappedFile.h"
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
namespace storm { namespace storm {
namespace parser { namespace parser {

2
src/storm-parsers/parser/SparseItemLabelingParser.cpp

@ -4,7 +4,7 @@
#include <string> #include <string>
#include <iostream> #include <iostream>
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include "storm-parsers/parser/MappedFile.h" #include "storm-parsers/parser/MappedFile.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"

2
src/storm-parsers/parser/SparseStateRewardParser.cpp

@ -4,7 +4,7 @@
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
#include "storm/exceptions/OutOfRangeException.h" #include "storm/exceptions/OutOfRangeException.h"
#include "storm/exceptions/FileIoException.h" #include "storm/exceptions/FileIoException.h"
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include "storm-parsers/parser/MappedFile.h" #include "storm-parsers/parser/MappedFile.h"
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"

2
src/storm/utility/cstring.cpp → src/storm-parsers/util/cstring.cpp

@ -1,4 +1,4 @@
#include "storm/utility/cstring.h"
#include "storm-parsers/util/cstring.h"
#include <cstring> #include <cstring>

12
src/storm/utility/cstring.h → src/storm-parsers/util/cstring.h

@ -1,12 +1,4 @@
/*
* cstring.h
*
* Created on: 30.01.2014
* Author: Manuel Sascha Weiand
*/
#ifndef STORM_UTILITY_CSTRING_H_
#define STORM_UTILITY_CSTRING_H_
#pragma once
#include <cstdint> #include <cstdint>
@ -49,5 +41,3 @@ namespace storm {
} // namespace cstring } // namespace cstring
} // namespace utility } // namespace utility
} // namespace storm } // namespace storm
#endif /* STORM_UTILITY_CSTRING_H_ */

2
src/storm-pgcl-cli/storm-pgcl.cpp

@ -23,7 +23,7 @@
#include "storm-parsers/api/storm-parsers.h" #include "storm-parsers/api/storm-parsers.h"
#include "storm/storage/SymbolicModelDescription.h" #include "storm/storage/SymbolicModelDescription.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
/*! /*!
* Initialize the settings manager. * Initialize the settings manager.

2
src/storm-pgcl/parser/PgclParser.cpp

@ -1,7 +1,7 @@
#include "PgclParser.h" #include "PgclParser.h"
// If the parser fails due to ill-formed data, this exception is thrown. // If the parser fails due to ill-formed data, this exception is thrown.
#include "storm/exceptions/WrongFormatException.h" #include "storm/exceptions/WrongFormatException.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
namespace storm { namespace storm {
namespace parser { namespace parser {

2
src/storm-pomdp/analysis/IterativePolicySearch.cpp

@ -1,5 +1,5 @@
#include "storm-pomdp/analysis/IterativePolicySearch.h" #include "storm-pomdp/analysis/IterativePolicySearch.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm-pomdp/analysis/OneShotPolicySearch.h" #include "storm-pomdp/analysis/OneShotPolicySearch.h"
#include "storm-pomdp/analysis/QualitativeAnalysis.h" #include "storm-pomdp/analysis/QualitativeAnalysis.h"

2
src/storm-pomdp/analysis/OneShotPolicySearch.cpp

@ -1,4 +1,4 @@
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm-pomdp/analysis/OneShotPolicySearch.h" #include "storm-pomdp/analysis/OneShotPolicySearch.h"

2
src/storm-pomdp/analysis/WinningRegion.cpp

@ -1,7 +1,7 @@
#include <iostream> #include <iostream>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <storm/exceptions/WrongFormatException.h> #include <storm/exceptions/WrongFormatException.h>
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/storage/expressions/Expression.h" #include "storm/storage/expressions/Expression.h"
#include "storm/storage/expressions/ExpressionManager.h" #include "storm/storage/expressions/ExpressionManager.h"

2
src/storm/abstraction/MenuGameAbstractor.cpp

@ -10,7 +10,7 @@
#include "storm/storage/dd/Add.h" #include "storm/storage/dd/Add.h"
#include "storm/storage/dd/Bdd.h" #include "storm/storage/dd/Bdd.h"
#include "storm/utility/dd.h" #include "storm/utility/dd.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm-config.h" #include "storm-config.h"
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"

2
src/storm/adapters/EigenAdapter.h

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "storm/utility/eigen.h"
#include "storm/adapters/eigen.h"
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/storage/SparseMatrix.h" #include "storm/storage/SparseMatrix.h"

2
src/storm/adapters/GmmxxAdapter.h

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "storm/utility/gmm.h"
#include "storm/adapters/gmm.h"
#include "storm/storage/SparseMatrix.h" #include "storm/storage/SparseMatrix.h"

0
src/storm/utility/eigen.h → src/storm/adapters/eigen.h

0
src/storm/utility/gmm.h → src/storm/adapters/gmm.h

2
src/storm/utility/sylvan.cpp → src/storm/adapters/sylvan.cpp

@ -1,4 +1,4 @@
#include "storm/utility/sylvan.h"
#include "storm/adapters/sylvan.h"
namespace storm { namespace storm {
namespace dd { namespace dd {

0
src/storm/utility/sylvan.h → src/storm/adapters/sylvan.h

6
src/storm/api/export.h

@ -2,9 +2,9 @@
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/utility/DirectEncodingExporter.h"
#include "storm/utility/DDEncodingExporter.h"
#include "storm/utility/file.h"
#include "storm/io/DirectEncodingExporter.h"
#include "storm/io/DDEncodingExporter.h"
#include "storm/io/file.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/storage/Scheduler.h" #include "storm/storage/Scheduler.h"

4
src/storm/utility/DDEncodingExporter.cpp → src/storm/io/DDEncodingExporter.cpp

@ -1,5 +1,5 @@
#include "storm/utility/DDEncodingExporter.h"
#include "storm/utility/file.h"
#include "storm/io/DDEncodingExporter.h"
#include "storm/io/file.h"
#include "storm/models/symbolic/StandardRewardModel.h" #include "storm/models/symbolic/StandardRewardModel.h"
namespace storm { namespace storm {

0
src/storm/utility/DDEncodingExporter.h → src/storm/io/DDEncodingExporter.h

2
src/storm/utility/DirectEncodingExporter.cpp → src/storm/io/DirectEncodingExporter.cpp

@ -1,5 +1,5 @@
#include <storm/exceptions/NotSupportedException.h> #include <storm/exceptions/NotSupportedException.h>
#include "DirectEncodingExporter.h"
#include "storm/io/DirectEncodingExporter.h"
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"

0
src/storm/utility/DirectEncodingExporter.h → src/storm/io/DirectEncodingExporter.h

2
src/storm/utility/export.h → src/storm/io/export.h

@ -5,7 +5,7 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
namespace storm { namespace storm {

0
src/storm/utility/file.h → src/storm/io/file.h

2
src/storm/modelchecker/multiobjective/deterministicScheds/DeterministicSchedsParetoExplorer.cpp

@ -16,7 +16,7 @@
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/settings/modules/CoreSettings.h" #include "storm/settings/modules/CoreSettings.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
#include "storm/utility/solver.h" #include "storm/utility/solver.h"
#include "storm/exceptions/UnexpectedException.h" #include "storm/exceptions/UnexpectedException.h"

2
src/storm/modelchecker/multiobjective/pcaa/RewardBoundedMdpPcaaWeightVectorChecker.cpp

@ -21,7 +21,7 @@
#include "storm/solver/LinearEquationSolver.h" #include "storm/solver/LinearEquationSolver.h"
#include "storm/utility/ProgressMeasurement.h" #include "storm/utility/ProgressMeasurement.h"
#include "storm/utility/SignalHandler.h" #include "storm/utility/SignalHandler.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/vector.h" #include "storm/utility/vector.h"

2
src/storm/modelchecker/multiobjective/pcaa/SparsePcaaQuery.cpp

@ -10,7 +10,7 @@
#include "storm/storage/geometry/Hyperrectangle.h" #include "storm/storage/geometry/Hyperrectangle.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/vector.h" #include "storm/utility/vector.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
#include "storm/exceptions/UnexpectedException.h" #include "storm/exceptions/UnexpectedException.h"

2
src/storm/modelchecker/prctl/helper/SparseDtmcPrctlHelper.cpp

@ -29,7 +29,7 @@
#include "storm/utility/Stopwatch.h" #include "storm/utility/Stopwatch.h"
#include "storm/utility/ProgressMeasurement.h" #include "storm/utility/ProgressMeasurement.h"
#include "storm/utility/SignalHandler.h" #include "storm/utility/SignalHandler.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/ConstantsComparator.h" #include "storm/utility/ConstantsComparator.h"

2
src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp

@ -33,7 +33,7 @@
#include "storm/utility/Stopwatch.h" #include "storm/utility/Stopwatch.h"
#include "storm/utility/ProgressMeasurement.h" #include "storm/utility/ProgressMeasurement.h"
#include "storm/utility/SignalHandler.h" #include "storm/utility/SignalHandler.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
#include "storm/utility/NumberTraits.h" #include "storm/utility/NumberTraits.h"
#include "storm/transformer/EndComponentEliminator.h" #include "storm/transformer/EndComponentEliminator.h"

2
src/storm/models/sparse/DeterministicModel.cpp

@ -3,7 +3,7 @@
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/models/sparse/StandardRewardModel.h" #include "storm/models/sparse/StandardRewardModel.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
namespace storm { namespace storm {
namespace models { namespace models {

2
src/storm/models/sparse/Model.cpp

@ -9,7 +9,7 @@
#include "storm/models/sparse/MarkovAutomaton.h" #include "storm/models/sparse/MarkovAutomaton.h"
#include "storm/models/sparse/StandardRewardModel.h" #include "storm/models/sparse/StandardRewardModel.h"
#include "storm/utility/vector.h" #include "storm/utility/vector.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
#include "storm/utility/NumberTraits.h" #include "storm/utility/NumberTraits.h"

2
src/storm/models/sparse/NondeterministicModel.cpp

@ -8,7 +8,7 @@
#include "storm/storage/memorystructure/MemoryStructureBuilder.h" #include "storm/storage/memorystructure/MemoryStructureBuilder.h"
#include "storm/storage/memorystructure/SparseModelMemoryProduct.h" #include "storm/storage/memorystructure/SparseModelMemoryProduct.h"
#include "storm/transformer/SubsystemBuilder.h" #include "storm/transformer/SubsystemBuilder.h"
#include "storm/utility/export.h"
#include "storm/io/export.h"
namespace storm { namespace storm {
namespace models { namespace models {

2
src/storm/settings/SettingsManager.cpp

@ -42,7 +42,7 @@
#include "storm/settings/modules/HintSettings.h" #include "storm/settings/modules/HintSettings.h"
#include "storm/settings/modules/OviSolverSettings.h" #include "storm/settings/modules/OviSolverSettings.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/string.h" #include "storm/utility/string.h"
#include "storm/settings/Option.h" #include "storm/settings/Option.h"

2
src/storm/solver/EigenLinearEquationSolver.h

@ -2,7 +2,7 @@
#include "storm/solver/LinearEquationSolver.h" #include "storm/solver/LinearEquationSolver.h"
#include "storm/solver/SolverSelectionOptions.h" #include "storm/solver/SolverSelectionOptions.h"
#include "storm/utility/eigen.h"
#include "storm/adapters/eigen.h"
namespace storm { namespace storm {
namespace solver { namespace solver {

2
src/storm/solver/GmmxxLinearEquationSolver.cpp

@ -7,7 +7,7 @@
#include "storm/environment/solver/GmmxxSolverEnvironment.h" #include "storm/environment/solver/GmmxxSolverEnvironment.h"
#include "storm/exceptions/AbortException.h" #include "storm/exceptions/AbortException.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/gmm.h"
#include "storm/adapters/gmm.h"
#include "storm/utility/vector.h" #include "storm/utility/vector.h"
#include "storm/utility/SignalHandler.h" #include "storm/utility/SignalHandler.h"

2
src/storm/solver/GmmxxLinearEquationSolver.h

@ -3,7 +3,7 @@
#include <ostream> #include <ostream>
#include "storm/utility/gmm.h"
#include "storm/adapters/gmm.h"
#include "storm/solver/LinearEquationSolver.h" #include "storm/solver/LinearEquationSolver.h"
#include "storm/solver/SolverSelectionOptions.h" #include "storm/solver/SolverSelectionOptions.h"

2
src/storm/solver/SmtlibSmtSolver.cpp

@ -17,7 +17,7 @@
#include "storm/exceptions/IllegalArgumentException.h" #include "storm/exceptions/IllegalArgumentException.h"
#include "storm/exceptions/IllegalFunctionCallException.h" #include "storm/exceptions/IllegalFunctionCallException.h"
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/exceptions/UnexpectedException.h" #include "storm/exceptions/UnexpectedException.h"

2
src/storm/solver/Z3LpSolver.cpp

@ -9,7 +9,7 @@
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/constants.h" #include "storm/utility/constants.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/storage/expressions/Expression.h" #include "storm/storage/expressions/Expression.h"
#include "storm/storage/expressions/ExpressionManager.h" #include "storm/storage/expressions/ExpressionManager.h"

2
src/storm/storage/Qvbs.cpp

@ -3,7 +3,7 @@
#include <algorithm> #include <algorithm>
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/utility/string.h" #include "storm/utility/string.h"
#include "storm/settings/SettingsManager.h" #include "storm/settings/SettingsManager.h"
#include "storm/settings/modules/IOSettings.h" #include "storm/settings/modules/IOSettings.h"

2
src/storm/storage/dd/Odd.cpp

@ -8,7 +8,7 @@
#include "storm/utility/macros.h" #include "storm/utility/macros.h"
#include "storm/exceptions/InvalidArgumentException.h" #include "storm/exceptions/InvalidArgumentException.h"
#include "storm/utility/file.h"
#include "storm/io/file.h"
#include "storm/adapters/RationalFunctionAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h"
#include "storm/exceptions/NotSupportedException.h" #include "storm/exceptions/NotSupportedException.h"

2
src/storm/storage/dd/sylvan/InternalSylvanBdd.h

@ -13,7 +13,7 @@
#include "storm/storage/dd/InternalBdd.h" #include "storm/storage/dd/InternalBdd.h"
#include "storm/storage/dd/InternalAdd.h" #include "storm/storage/dd/InternalAdd.h"
#include "storm/utility/sylvan.h"
#include "storm/adapters/sylvan.h"
namespace storm { namespace storm {
namespace storage { namespace storage {

2
src/storm/storage/dd/sylvan/InternalSylvanDdManager.cpp

@ -11,7 +11,7 @@
#include "storm/exceptions/NotSupportedException.h" #include "storm/exceptions/NotSupportedException.h"
#include "storm/exceptions/InvalidSettingsException.h" #include "storm/exceptions/InvalidSettingsException.h"
#include "storm/utility/sylvan.h"
#include "storm/adapters/sylvan.h"
#include "storm-config.h" #include "storm-config.h"

2
src/storm/storage/dd/sylvan/SylvanAddIterator.h

@ -6,7 +6,7 @@
#include "storm/storage/dd/AddIterator.h" #include "storm/storage/dd/AddIterator.h"
#include "storm/storage/expressions/SimpleValuation.h" #include "storm/storage/expressions/SimpleValuation.h"
#include "storm/utility/sylvan.h"
#include "storm/adapters/sylvan.h"
namespace storm { namespace storm {
namespace dd { namespace dd {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save