Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DFTElementState.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
storm/utility/macros.h
"
4
5
namespace
storm::dft
{
6
namespace
storage {
7
8
enum class
DFTElementState
{
Operational
= 0,
Failed
= 2,
Failsafe
= 1,
DontCare
= 3 };
9
10
inline
std::ostream&
operator<<
(std::ostream& os,
DFTElementState
st) {
11
switch
(st) {
12
case
DFTElementState::Operational
:
13
return
os <<
"Operational"
;
14
case
DFTElementState::Failed
:
15
return
os <<
"Failed"
;
16
case
DFTElementState::Failsafe
:
17
return
os <<
"Failsafe"
;
18
case
DFTElementState::DontCare
:
19
return
os <<
"Don't Care"
;
20
default
:
21
STORM_LOG_ASSERT
(
false
,
"Element state not known."
);
22
return
os;
23
}
24
}
25
26
inline
char
toChar
(
DFTElementState
st) {
27
switch
(st) {
28
case
DFTElementState::Operational
:
29
return
'O'
;
30
case
DFTElementState::Failed
:
31
return
'F'
;
32
case
DFTElementState::Failsafe
:
33
return
'S'
;
34
case
DFTElementState::DontCare
:
35
return
'-'
;
36
default
:
37
STORM_LOG_ASSERT
(
false
,
"Element state not known."
);
38
return
' '
;
39
}
40
}
41
42
enum class
DFTDependencyState
{
Passive
= 0,
Unsuccessful
= 1,
Successful
= 2,
DontCare
= 3 };
43
44
inline
std::ostream&
operator<<
(std::ostream& os,
DFTDependencyState
st) {
45
switch
(st) {
46
case
DFTDependencyState::Passive
:
47
return
os <<
"Passive"
;
48
case
DFTDependencyState::Successful
:
49
return
os <<
"Successful"
;
50
case
DFTDependencyState::Unsuccessful
:
51
return
os <<
"Unsuccessful"
;
52
case
DFTDependencyState::DontCare
:
53
return
os <<
"Don't Care"
;
54
default
:
55
STORM_LOG_ASSERT
(
false
,
"Element state not known."
);
56
return
os;
57
}
58
}
59
60
inline
char
toChar
(
DFTDependencyState
st) {
61
switch
(st) {
62
case
DFTDependencyState::Passive
:
63
return
'P'
;
64
case
DFTDependencyState::Successful
:
65
return
'S'
;
66
case
DFTDependencyState::Unsuccessful
:
67
return
'U'
;
68
case
DFTDependencyState::DontCare
:
69
return
'-'
;
70
default
:
71
STORM_LOG_ASSERT
(
false
,
"Element state not known."
);
72
return
' '
;
73
}
74
}
75
76
}
// namespace storage
77
}
// namespace storm::dft
macros.h
STORM_LOG_ASSERT
#define STORM_LOG_ASSERT(cond, message)
Definition
macros.h:11
storm::dft::storage::DFTDependencyState
DFTDependencyState
Definition
DFTElementState.h:42
storm::dft::storage::DFTDependencyState::Successful
@ Successful
storm::dft::storage::DFTDependencyState::Unsuccessful
@ Unsuccessful
storm::dft::storage::DFTDependencyState::DontCare
@ DontCare
storm::dft::storage::DFTDependencyState::Passive
@ Passive
storm::dft::storage::operator<<
std::ostream & operator<<(std::ostream &os, DFTElementState st)
Definition
DFTElementState.h:10
storm::dft::storage::toChar
char toChar(DFTElementState st)
Definition
DFTElementState.h:26
storm::dft::storage::DFTElementState
DFTElementState
Definition
DFTElementState.h:8
storm::dft::storage::DFTElementState::Operational
@ Operational
storm::dft::storage::DFTElementState::DontCare
@ DontCare
storm::dft::storage::DFTElementState::Failsafe
@ Failsafe
storm::dft::storage::DFTElementState::Failed
@ Failed
storm::dft
Definition
SFTBDDPropertyFormulaAdapter.h:19
src
storm-dft
storage
DFTElementState.h
Generated by
1.9.8