-
Notifications
You must be signed in to change notification settings - Fork 0
/
simulator_errors.py
48 lines (35 loc) · 1.45 KB
/
simulator_errors.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
from enum import Enum
class Errors:
'''
Errors for the simulator class.
These focus on errors that aren't about undefined runtime behavior but rather about invalid logic, addresses, too many constraints, etc.
'''
class TranslatorError(Exception):
pass
class InvalidConstraints(Exception):
pass # this may be worth moving to a warning if we foresee this being valid?
class SuperPageNotCleared(Exception):
pass # this may be worth moving to a warning if we foresee this being valid?
class UnalignedAddress(Exception):
pass # this may be worth moving to a warning if we foresee this being valid?
class PTEMarkedInvalid(Exception):
pass
class WriteNoReadError(Exception):
pass
class LeafMarkedAsPointer(Exception):
pass
class UnexpectedLeaf(Exception):
pass
class NonGlobalAfterGlobal(Exception):
pass
class InvalidXWR(Exception):
pass # this may be worth moving to a warning if we foresee this being valid?
class InvalidDAU(Exception):
pass # this may be worth moving to a warning if we foresee this being valid?
# TranslatorError = TranslatorError
# InvalidConstraints = InvalidConstraints
# SuperPageNotCleared = SuperPageNotCleared
# PTEMarkedInvalid = PTEMarkedInvalid
# UnalignedAddress = UnalignedAddress
# WriteNoReadError = WriteNoReadError
# LeafMarkedAsPointer = LeafMarkedAsPointer