30 using DFTStatePointer = std::shared_ptr<storm::dft::storage::DFTState<ValueType>>;
32 using ExplorationHeuristicPointer = std::shared_ptr<ExplorationHeuristic>;
35 struct ModelComponents {
49 std::vector<ValueType> exitRates;
52 boost::optional<storm::models::sparse::ChoiceLabeling> choiceLabeling;
55 bool deterministicModel;
62 MatrixBuilder(
bool canHaveNondeterminism);
69 void setRemapping(StateType
id) {
70 STORM_LOG_ASSERT(
id < stateRemapping.size(),
"Invalid index for remapping.");
71 stateRemapping[id] = currentRowGroup;
78 if (canHaveNondeterminism) {
79 builder.newRowGroup(currentRow);
90 void addTransition(StateType index, ValueType value) {
91 builder.addNextValue(currentRow, index, value);
105 builder.replaceColumns(stateRemapping, mappingOffset);
113 StateType getCurrentRowGroup() {
114 return currentRowGroup;
124 StateType getRemapping(StateType
id) {
125 STORM_LOG_ASSERT(
id < stateRemapping.size(),
"Invalid index for remapping.");
126 return stateRemapping[id];
133 size_t mappingOffset;
137 std::vector<uint_fast64_t> stateRemapping;
141 StateType currentRowGroup;
144 StateType currentRow;
147 bool canHaveNondeterminism;
168 void buildModel(
size_t iteration,
double approximationThreshold = 0.0,
176 std::shared_ptr<storm::models::sparse::Model<ValueType>>
getModel();
186 std::shared_ptr<storm::models::sparse::Model<ValueType>>
getModelApproximation(
bool lowerBound,
bool expectedTime);
194 void exploreStateSpace(
double approximationThreshold);
199 void initializeNextIteration();
204 void buildLabeling();
213 StateType getOrAddStateIndex(DFTStatePointer
const& state);
220 void setMarkovian(
bool markovian);
237 ValueType getLowerBound(DFTStatePointer
const& state)
const;
246 ValueType getUpperBound(DFTStatePointer
const& state)
const;
256 ValueType computeMTTFAnd(std::vector<ValueType>
const& rates,
size_t size)
const;
258 void printNotExplored()
const;
268 std::shared_ptr<storm::models::sparse::Model<ValueType>> createModel(
bool copy);
271 const size_t INITIAL_BITVECTOR_SIZE = 20000;
273 const StateType OFFSET_PSEUDO_STATE = std::numeric_limits<StateType>::max() / 2;
283 std::shared_ptr<storm::dft::storage::DFTStateGenerationInfo> stateGenerationInfo;
293 bool uniqueFailedState =
false;
296 size_t initialStateIndex = 0;
302 ModelComponents modelComponents;
305 MatrixBuilder matrixBuilder;
314 std::map<StateType, std::pair<DFTStatePointer, ExplorationHeuristicPointer>> statesNotExplored;
320 std::map<StateType, std::pair<DFTStatePointer, ExplorationHeuristicPointer>> skippedStates;
323 std::vector<std::vector<size_t>> subtreeBEs;