-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy paththeory_settings.py
57 lines (42 loc) · 1.25 KB
/
theory_settings.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
# Copyright (C) 2023 IBM Corp.
# SPDX-License-Identifier: Apache-2.0
from . import util
from .converter import ConverterSettings
from .graph.settings import GraphSettings
from .parser import ParserSettings
from .serializer import SerializerSettings
from .settings import Settings
__all__ = [
'TheorySettings',
]
class TheorySettings(Settings):
"""Theory settings."""
#: Graph settings.
graph = GraphSettings
#: Converter settings.
converter = ConverterSettings
#: Parser settings.
parser = ParserSettings
#: Serializer settings.
serializer = SerializerSettings
#: Prelude settings.
prelude = None
#: Prefix of generated ids.
generated_id_prefix = '_'
#: Whether to record proofs.
record_proofs = True
#: Whether to override :meth:`Object.__repr__`.
override_object_repr = True
_debug = False
@property
def debug(self):
"""Whether to enable debugging."""
return self._debug
@debug.setter
def debug(self, value):
util.logging.basicConfig()
self._debug = bool(value)
if self._debug:
util.logging.getLogger().setLevel(util.logging.DEBUG)
else:
util.logging.getLogger().setLevel(util.logging.WARNING)