Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DFTRestriction.h
Go to the documentation of this file.
1#pragma once
2
3#include "DFTChildren.h"
4
5namespace storm::dft {
6namespace storage {
7namespace elements {
8
13template<typename ValueType>
14class DFTRestriction : public DFTChildren<ValueType> {
15 using DFTElementPointer = std::shared_ptr<DFTElement<ValueType>>;
16 using DFTElementVector = std::vector<DFTElementPointer>;
17
18 public:
25 DFTRestriction(size_t id, std::string const& name, DFTElementVector const& children) : DFTChildren<ValueType>(id, name, children) {
26 // Intentionally left empty.
27 }
28
32 virtual ~DFTRestriction() = default;
33
34 bool isRestriction() const override {
35 return true;
36 }
37
42 virtual bool isSeqEnforcer() const {
43 return false;
44 }
45
50 virtual bool isMutex() const {
51 return false;
52 }
53
58 bool allChildrenBEs() const {
59 for (auto const& elem : this->children()) {
60 if (!elem->isBasicElement()) {
61 return false;
62 }
63 }
64 return true;
65 }
66
67 void extendSpareModule(std::set<size_t>&) const override {
68 // Do nothing
69 }
70
74
75 protected:
79
83};
84
85} // namespace elements
86} // namespace storage
87} // namespace storm::dft
Abstract base class for a DFT element with children.
Definition DFTChildren.h:13
DFTElementVector const & children() const
Get children.
Definition DFTChildren.h:45
virtual size_t id() const
Get id.
Definition DFTElement.h:73
virtual std::string const & name() const
Get name.
Definition DFTElement.h:89
Abstract base class for restrictions.
bool allChildrenBEs() const
Returns whether all children are BEs.
virtual bool isMutex() const
Return whether the restriction is a mutex.
virtual bool isSeqEnforcer() const
Return whether the restriction is a sequence enforcer.
bool checkDontCareAnymore(storm::dft::storage::DFTState< ValueType > &, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &) const override
bool isRestriction() const override
Check whether the element is a restriction.
void extendSpareModule(std::set< size_t > &) const override
void failsafe(storm::dft::storage::DFTState< ValueType > &, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &) const override
virtual ~DFTRestriction()=default
Destructor.
DFTRestriction(size_t id, std::string const &name, DFTElementVector const &children)
Constructor.
void fail(storm::dft::storage::DFTState< ValueType > &state, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &) const override