-
Notifications
You must be signed in to change notification settings - Fork 9
/
cli_options_enums.py
99 lines (78 loc) · 1.98 KB
/
cli_options_enums.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# This module contains enumerations of different options in VATA CLI.
# There are enumerations for possible operations, direction of operations,
# algorithms and also for the different encodings of automata.
class Unknown(object):
UNKNOWN = -1
class OperationsEnum(object):
LOAD = 0
WITNESS = 1
CMPL = 2
UNION = 3
ISECT = 4
SIM = 5
RED = 6
EQUIV = 7
INCL = 8
HELP = 9
MIN = LOAD
MAX = HELP
OperationsToStringCommand = {\
OperationsEnum.LOAD : 'load',
OperationsEnum.WITNESS : 'witness',
OperationsEnum.CMPL : 'cmpl',
OperationsEnum.UNION : 'union',
OperationsEnum.ISECT : 'isect',
OperationsEnum.SIM : 'sim',
OperationsEnum.RED : 'red',
OperationsEnum.EQUIV : 'equiv',
OperationsEnum.INCL : 'incl',
OperationsEnum.HELP : 'help'}
class DirectionsEnum(object):
DOWN = 0
UP = 1
FWD = 0
BWD = 1
MIN = DOWN
MAX = UP
DirectionsEnumFAToString = {\
DirectionsEnum.BWD : 'bwd',
DirectionsEnum.FWD : 'fwd'}
DirectionsEnumToString = {\
DirectionsEnum.DOWN : 'down',
DirectionsEnum.UP : 'up'}
class OrderEnum(object):
BREADTH = 0
DEPTH = 1
MIN = BREADTH
MAX = DEPTH
OrderEnumToString = {\
OrderEnum.BREADTH : 'breadth',
OrderEnum.DEPTH : 'depth'}
class AlgsEnum(object):
AC = 0
CONGR = 1
MIN = AC
MAX = CONGR
AlgsEnumToString = {\
AlgsEnum.AC : 'antichains',
AlgsEnum.CONGR : 'congr'}
BoolToString = {\
True : 'yes',
False : 'no'}
class EncodingsEnum(object):
EXPL = 0
BDD_TD = 1
BDD_BU = 2
EXPL_FA = 3
MIN = EXPL
MAX = EXPL_FA
EncodingToString = {\
EncodingsEnum.EXPL : 'expl',
EncodingsEnum.EXPL_FA : 'expl_fa',
EncodingsEnum.BDD_TD : 'bdd-td',
EncodingsEnum.BDD_BU : 'bdd-bu'}
def isCorrectCode(code, enum):
if code >= enum.MIN and code <= enum.MAX:
return True
else:
return False