statable 3.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. statable-3.1.0/PKG-INFO +151 -0
  2. statable-3.1.0/README.md +124 -0
  3. statable-3.1.0/codegen/__init__.py +38 -0
  4. statable-3.1.0/codegen/c_code_generator.py +1752 -0
  5. statable-3.1.0/codegen/code_merger.py +371 -0
  6. statable-3.1.0/codegen/code_templates.py +509 -0
  7. statable-3.1.0/codegen/config.py +167 -0
  8. statable-3.1.0/codegen/enum_generator.py +377 -0
  9. statable-3.1.0/codegen/event_queue_generator.py +303 -0
  10. statable-3.1.0/codegen/interrupt_generator.py +345 -0
  11. statable-3.1.0/codegen/naming_convention.py +171 -0
  12. statable-3.1.0/codegen/osal_generator.py +282 -0
  13. statable-3.1.0/codegen/role_function_generator.py +1244 -0
  14. statable-3.1.0/codegen/sample_data.py +269 -0
  15. statable-3.1.0/codegen/state_actions_generator.py +395 -0
  16. statable-3.1.0/codegen/struct_generator.py +721 -0
  17. statable-3.1.0/codegen/timer_generator.py +299 -0
  18. statable-3.1.0/codegen/transition_generator.py +907 -0
  19. statable-3.1.0/codegen/type_mapper.py +69 -0
  20. statable-3.1.0/codegen/validate/__init__.py +38 -0
  21. statable-3.1.0/codegen/validate/change_actions.py +90 -0
  22. statable-3.1.0/codegen/validate/change_applier.py +416 -0
  23. statable-3.1.0/codegen/validate/clipboard_manager.py +47 -0
  24. statable-3.1.0/codegen/validate/data/__init__.py +30 -0
  25. statable-3.1.0/codegen/validate/data/action_definitions.py +200 -0
  26. statable-3.1.0/codegen/validate/data/keywords.py +46 -0
  27. statable-3.1.0/codegen/validate/data/prompt_templates.py +176 -0
  28. statable-3.1.0/codegen/validate/data/validation_rules.py +205 -0
  29. statable-3.1.0/codegen/validate/items/__init__.py +30 -0
  30. statable-3.1.0/codegen/validate/items/base_validator.py +25 -0
  31. statable-3.1.0/codegen/validate/items/cell_validator.py +275 -0
  32. statable-3.1.0/codegen/validate/items/custom_type_validator.py +75 -0
  33. statable-3.1.0/codegen/validate/items/event_validator.py +78 -0
  34. statable-3.1.0/codegen/validate/items/flag_validator.py +74 -0
  35. statable-3.1.0/codegen/validate/items/interrupt_validator.py +75 -0
  36. statable-3.1.0/codegen/validate/items/queue_validator.py +73 -0
  37. statable-3.1.0/codegen/validate/items/role_function_validator.py +175 -0
  38. statable-3.1.0/codegen/validate/items/state_validator.py +88 -0
  39. statable-3.1.0/codegen/validate/items/timer_validator.py +120 -0
  40. statable-3.1.0/codegen/validate/items/transition_validator.py +113 -0
  41. statable-3.1.0/codegen/validate/items/variable_validator.py +132 -0
  42. statable-3.1.0/codegen/validate/logger.py +52 -0
  43. statable-3.1.0/codegen/validate/models.py +177 -0
  44. statable-3.1.0/codegen/validate/prompt_generator.py +724 -0
  45. statable-3.1.0/codegen/validate/response_parser.py +154 -0
  46. statable-3.1.0/codegen/validate/response_validator.py +275 -0
  47. statable-3.1.0/codegen/validate/validation_dialog.py +322 -0
  48. statable-3.1.0/codegen/validate/validator.py +94 -0
  49. statable-3.1.0/codegen/variable_generator.py +419 -0
  50. statable-3.1.0/pyproject.toml +48 -0
  51. statable-3.1.0/setup.cfg +4 -0
  52. statable-3.1.0/statable/__init__.py +71 -0
  53. statable-3.1.0/statable/__main__.py +49 -0
  54. statable-3.1.0/statable/cli.py +251 -0
  55. statable-3.1.0/statable/global_defs.py +256 -0
  56. statable-3.1.0/statable/mermaid_gen.py +144 -0
  57. statable-3.1.0/statable/model.py +426 -0
  58. statable-3.1.0/statable/parser.py +64 -0
  59. statable-3.1.0/statable/sample_data.py +435 -0
  60. statable-3.1.0/statable/shared/__init__.py +24 -0
  61. statable-3.1.0/statable/shared/condition_library.py +63 -0
  62. statable-3.1.0/statable/shared/literal_library.py +66 -0
  63. statable-3.1.0/statable/shared/role_function_library.py +150 -0
  64. statable-3.1.0/statable/state_machine.py +121 -0
  65. statable-3.1.0/statable/xml_io.py +1164 -0
  66. statable-3.1.0/statable.egg-info/PKG-INFO +151 -0
  67. statable-3.1.0/statable.egg-info/SOURCES.txt +160 -0
  68. statable-3.1.0/statable.egg-info/dependency_links.txt +1 -0
  69. statable-3.1.0/statable.egg-info/entry_points.txt +2 -0
  70. statable-3.1.0/statable.egg-info/requires.txt +7 -0
  71. statable-3.1.0/statable.egg-info/top_level.txt +3 -0
  72. statable-3.1.0/statable_gui/__init__.py +23 -0
  73. statable-3.1.0/statable_gui/action_edit_dialog.py +214 -0
  74. statable-3.1.0/statable_gui/code_generation_dialog.py +486 -0
  75. statable-3.1.0/statable_gui/code_generation_settings_dialog.py +522 -0
  76. statable-3.1.0/statable_gui/common_widgets.py +537 -0
  77. statable-3.1.0/statable_gui/condition_builder_dialog.py +500 -0
  78. statable-3.1.0/statable_gui/condition_edit_dialog.py +123 -0
  79. statable-3.1.0/statable_gui/condition_template_dialog.py +58 -0
  80. statable-3.1.0/statable_gui/config.py +21 -0
  81. statable-3.1.0/statable_gui/dialogs.py +439 -0
  82. statable-3.1.0/statable_gui/event_definition_dialog.py +605 -0
  83. statable-3.1.0/statable_gui/event_delivery_settings_dialog.py +191 -0
  84. statable-3.1.0/statable_gui/event_queue_dialog.py +245 -0
  85. statable-3.1.0/statable_gui/global_defs.py +167 -0
  86. statable-3.1.0/statable_gui/global_defs_dialog.py +796 -0
  87. statable-3.1.0/statable_gui/i18n/__init__.py +118 -0
  88. statable-3.1.0/statable_gui/interrupt_handler_edit_dialog.py +810 -0
  89. statable-3.1.0/statable_gui/layer_settings_dialog.py +180 -0
  90. statable-3.1.0/statable_gui/libcntrl/__init__.py +23 -0
  91. statable-3.1.0/statable_gui/libcntrl/condition_library.py +13 -0
  92. statable-3.1.0/statable_gui/libcntrl/literal_library.py +13 -0
  93. statable-3.1.0/statable_gui/libcntrl/literal_management_dialog.py +185 -0
  94. statable-3.1.0/statable_gui/libcntrl/role_function_edit_dialog.py +145 -0
  95. statable-3.1.0/statable_gui/libcntrl/role_function_library.py +13 -0
  96. statable-3.1.0/statable_gui/literal_definition_dialog.py +62 -0
  97. statable-3.1.0/statable_gui/logger.py +83 -0
  98. statable-3.1.0/statable_gui/main_window.py +1380 -0
  99. statable-3.1.0/statable_gui/matrix_table.py +413 -0
  100. statable-3.1.0/statable_gui/preference_keys.py +18 -0
  101. statable-3.1.0/statable_gui/preferences.py +74 -0
  102. statable-3.1.0/statable_gui/role_function_dialog.py +244 -0
  103. statable-3.1.0/statable_gui/sample_data.py +11 -0
  104. statable-3.1.0/statable_gui/state_actions_dialog.py +398 -0
  105. statable-3.1.0/statable_gui/symbol_picker.py +170 -0
  106. statable-3.1.0/statable_gui/traceball.py +37 -0
  107. statable-3.1.0/statable_gui/transition_editor_direct/__init__.py +15 -0
  108. statable-3.1.0/statable_gui/transition_editor_direct/actions_tab.py +856 -0
  109. statable-3.1.0/statable_gui/transition_editor_direct/code_widget.py +344 -0
  110. statable-3.1.0/statable_gui/transition_editor_direct/coverage_analyzer.py +163 -0
  111. statable-3.1.0/statable_gui/transition_editor_direct/dialog.py +335 -0
  112. statable-3.1.0/statable_gui/transition_editor_direct/draft.py +270 -0
  113. statable-3.1.0/statable_gui/transition_editor_direct/edit_dialogs.py +160 -0
  114. statable-3.1.0/statable_gui/transition_editor_direct/overview_tab.py +173 -0
  115. statable-3.1.0/statable_gui/transition_editor_direct/palette_widget.py +233 -0
  116. statable-3.1.0/statable_gui/transition_editor_direct/relations_edit_dialog.py +156 -0
  117. statable-3.1.0/statable_gui/transition_editor_direct/relations_tab.py +230 -0
  118. statable-3.1.0/statable_gui/transition_editor_direct/system_global_dialog.py +52 -0
  119. statable-3.1.0/statable_gui/transition_editor_direct/transition_actions_dialog.py +109 -0
  120. statable-3.1.0/statable_gui/transition_editor_direct/transitions_tab.py +620 -0
  121. statable-3.1.0/statable_gui/validation_dialog.py +285 -0
  122. statable-3.1.0/statable_gui/widgets.py +1315 -0
  123. statable-3.1.0/tests/test_readme_consistency.py +482 -0
  124. statable-3.1.0/tests/test_v2_2_p1.py +800 -0
  125. statable-3.1.0/tests/test_v2_2_p12_10.py +455 -0
  126. statable-3.1.0/tests/test_v2_2_p12_2.py +442 -0
  127. statable-3.1.0/tests/test_v2_2_p12_5.py +484 -0
  128. statable-3.1.0/tests/test_v2_2_p12_6.py +383 -0
  129. statable-3.1.0/tests/test_v2_2_p12_7.py +46 -0
  130. statable-3.1.0/tests/test_v2_2_p12_8.py +360 -0
  131. statable-3.1.0/tests/test_v2_2_p12_9.py +301 -0
  132. statable-3.1.0/tests/test_v2_2_p2.py +712 -0
  133. statable-3.1.0/tests/test_v2_2_p3.py +578 -0
  134. statable-3.1.0/tests/test_v2_2_p4a.py +683 -0
  135. statable-3.1.0/tests/test_v2_2_p4b.py +428 -0
  136. statable-3.1.0/tests/test_v2_3_p1.py +209 -0
  137. statable-3.1.0/tests/test_v2_4_p1_merge.py +573 -0
  138. statable-3.1.0/tests/test_v2_5_p1.py +654 -0
  139. statable-3.1.0/tests/test_v2_5_p10.py +176 -0
  140. statable-3.1.0/tests/test_v2_5_p11.py +267 -0
  141. statable-3.1.0/tests/test_v2_5_p2.py +302 -0
  142. statable-3.1.0/tests/test_v2_5_p3.py +297 -0
  143. statable-3.1.0/tests/test_v2_5_p4.py +349 -0
  144. statable-3.1.0/tests/test_v2_5_p5.py +263 -0
  145. statable-3.1.0/tests/test_v2_5_p6.py +309 -0
  146. statable-3.1.0/tests/test_v2_5_p8.py +204 -0
  147. statable-3.1.0/tests/test_v2_5_p9.py +360 -0
  148. statable-3.1.0/tests/test_v2_6_p1.py +305 -0
  149. statable-3.1.0/tests/test_v2_6_p2.py +313 -0
  150. statable-3.1.0/tests/test_v2_6_p3.py +414 -0
  151. statable-3.1.0/tests/test_v2_7_p3.py +483 -0
  152. statable-3.1.0/tests/test_v2_7_p4.py +646 -0
  153. statable-3.1.0/tests/test_v2_7_p5_validation.py +356 -0
  154. statable-3.1.0/tests/test_v2_8_p1_ai_prompt.py +475 -0
  155. statable-3.1.0/tests/test_v2_8_p2_response_parser.py +336 -0
  156. statable-3.1.0/tests/test_v2_8_p3_response_validator.py +391 -0
  157. statable-3.1.0/tests/test_v2_8_p4_gui_integration.py +159 -0
  158. statable-3.1.0/tests/test_v3_0_g1_shared.py +166 -0
  159. statable-3.1.0/tests/test_v3_0_s1_packaging.py +129 -0
  160. statable-3.1.0/tests/test_v3_0_s2_public_api.py +136 -0
  161. statable-3.1.0/tests/test_v3_0_s3_cli.py +205 -0
  162. statable-3.1.0/tests/test_v3_0_s4_docs.py +134 -0
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: statable
3
+ Version: 3.1.0
4
+ Summary: MISRA C:2012-aware state machine design and C code generation for embedded systems
5
+ Author: Hideki Akashi
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/akashi-hideki/StaTable
8
+ Project-URL: Repository, https://github.com/akashi-hideki/StaTable
9
+ Project-URL: Issues, https://github.com/akashi-hideki/StaTable/issues
10
+ Keywords: state machine,MISRA,embedded,code generation,C
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Software Development :: Code Generators
19
+ Classifier: Topic :: Software Development :: Embedded Systems
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Provides-Extra: gui
23
+ Requires-Dist: PySide6>=6.0; extra == "gui"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.0; extra == "dev"
26
+ Requires-Dist: pycparser; extra == "dev"
27
+
28
+ # StaTable
29
+
30
+ **MISRA C:2012-aware state machine design and C code generation for embedded systems.**
31
+
32
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE)
33
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/)
34
+ [![Tests](https://img.shields.io/badge/Tests-1479%20PASS-green.svg)](https://github.com/akashi-hideki/StaTable)
35
+ [![MISRA](https://img.shields.io/badge/MISRA-C%3A2012-orange.svg)](https://www.misra.org.uk/)
36
+
37
+ StaTable is a Python-based tool for designing state machines and
38
+ generating **MISRA C:2012-compliant C code** for embedded systems.
39
+ It provides a CLI, a Python SDK, and a PySide6 GUI.
40
+
41
+ ---
42
+
43
+ ## Features
44
+
45
+ - **MISRA C:2012-aware C code generation** — validated with `cppcheck` + official MISRA addon
46
+ - **Multi-layer state machines** — Driver / Middleware / Application with priority execution
47
+ - **State actions (Entry / Exit / Do)** — table-driven dispatch with user-code markers
48
+ - **35 validation rules** across 11 categories with AI-assisted diagnostics
49
+ - **Marker-based user code preservation** — regenerate without losing your custom code
50
+ - **CLI + SDK + GUI** — integrate into any workflow
51
+ - **Pure Python** — easy to install and extend
52
+ - **i18n**: English and Simplified Chinese (简体中文)
53
+
54
+ ---
55
+
56
+ ## Installation
57
+
58
+ **SDK + CLI only:**
59
+
60
+ ```
61
+ pip install statable
62
+ ```
63
+
64
+ **With GUI (PySide6):**
65
+
66
+ ```
67
+ pip install "statable[gui]"
68
+ ```
69
+
70
+ **Development:**
71
+
72
+ ```
73
+ pip install "statable[dev]"
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Quick Start
79
+
80
+ ### CLI
81
+
82
+ ```
83
+ statable-cli version
84
+ statable-cli generate --xml design.xml --out generated/ --format json
85
+ statable-cli validate --xml design.xml --format json --exit-on-error
86
+ ```
87
+
88
+ ### Python SDK
89
+
90
+ ```
91
+ from statable import State, Event, Transition, StateMachine, StateType, EventKind
92
+ from statable.global_defs import GlobalDefinitions
93
+ from codegen import CCodeGenerator, CodeGenerationConfig
94
+
95
+ sm = StateMachine()
96
+ sm.add_state(State(name="Idle", type=StateType.INITIAL))
97
+ sm.add_state(State(name="Running"))
98
+ sm.add_event(Event(name="START", kind=EventKind.SIGNAL))
99
+ sm.set_initial("Idle")
100
+ sm.add_transition(Transition(source="Idle", event="START", target="Running"))
101
+
102
+ cfg = CodeGenerationConfig()
103
+ gen = CCodeGenerator(config=cfg)
104
+ files = gen.generate_all_layers([("Application", sm)], GlobalDefinitions())
105
+ gen.save_generated_code(files, "generated/")
106
+ ```
107
+
108
+ ### GUI
109
+
110
+ ```
111
+ python -m statable
112
+ ```
113
+
114
+ Menu: **Language / 语言** → switch between **English** and **简体中文**.
115
+
116
+ ---
117
+
118
+ ## Requirements
119
+
120
+ - Python 3.10 or later
121
+ - PySide6 >= 6.0 (for GUI)
122
+ - pycparser (optional, for advanced parsing)
123
+
124
+ ---
125
+
126
+ ## Links
127
+
128
+ - **Homepage**: https://github.com/akashi-hideki/StaTable
129
+ - **Documentation**: https://github.com/akashi-hideki/StaTable/blob/main/README.md
130
+ - **Issues**: https://github.com/akashi-hideki/StaTable/issues
131
+ - **Chinese README**: https://github.com/akashi-hideki/StaTable/blob/main/README_zh-CN.md
132
+
133
+ ---
134
+
135
+ ## License
136
+
137
+ Apache License 2.0 — free for commercial and personal use.
138
+
139
+ See [LICENSE](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE) for details.
140
+
141
+ ---
142
+
143
+ ## Acknowledgments
144
+
145
+ - [PySide6](https://www.qt.io/qt-for-python) — Qt 6 for Python
146
+ - [cppcheck](https://cppcheck.sourceforge.io/) — static analysis
147
+ - All contributors and users
148
+
149
+ ---
150
+
151
+ If StaTable helps you, please consider giving it a ⭐ on GitHub.
@@ -0,0 +1,124 @@
1
+ # StaTable
2
+
3
+ **MISRA C:2012-aware state machine design and C code generation for embedded systems.**
4
+
5
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE)
6
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/)
7
+ [![Tests](https://img.shields.io/badge/Tests-1479%20PASS-green.svg)](https://github.com/akashi-hideki/StaTable)
8
+ [![MISRA](https://img.shields.io/badge/MISRA-C%3A2012-orange.svg)](https://www.misra.org.uk/)
9
+
10
+ StaTable is a Python-based tool for designing state machines and
11
+ generating **MISRA C:2012-compliant C code** for embedded systems.
12
+ It provides a CLI, a Python SDK, and a PySide6 GUI.
13
+
14
+ ---
15
+
16
+ ## Features
17
+
18
+ - **MISRA C:2012-aware C code generation** — validated with `cppcheck` + official MISRA addon
19
+ - **Multi-layer state machines** — Driver / Middleware / Application with priority execution
20
+ - **State actions (Entry / Exit / Do)** — table-driven dispatch with user-code markers
21
+ - **35 validation rules** across 11 categories with AI-assisted diagnostics
22
+ - **Marker-based user code preservation** — regenerate without losing your custom code
23
+ - **CLI + SDK + GUI** — integrate into any workflow
24
+ - **Pure Python** — easy to install and extend
25
+ - **i18n**: English and Simplified Chinese (简体中文)
26
+
27
+ ---
28
+
29
+ ## Installation
30
+
31
+ **SDK + CLI only:**
32
+
33
+ ```
34
+ pip install statable
35
+ ```
36
+
37
+ **With GUI (PySide6):**
38
+
39
+ ```
40
+ pip install "statable[gui]"
41
+ ```
42
+
43
+ **Development:**
44
+
45
+ ```
46
+ pip install "statable[dev]"
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Quick Start
52
+
53
+ ### CLI
54
+
55
+ ```
56
+ statable-cli version
57
+ statable-cli generate --xml design.xml --out generated/ --format json
58
+ statable-cli validate --xml design.xml --format json --exit-on-error
59
+ ```
60
+
61
+ ### Python SDK
62
+
63
+ ```
64
+ from statable import State, Event, Transition, StateMachine, StateType, EventKind
65
+ from statable.global_defs import GlobalDefinitions
66
+ from codegen import CCodeGenerator, CodeGenerationConfig
67
+
68
+ sm = StateMachine()
69
+ sm.add_state(State(name="Idle", type=StateType.INITIAL))
70
+ sm.add_state(State(name="Running"))
71
+ sm.add_event(Event(name="START", kind=EventKind.SIGNAL))
72
+ sm.set_initial("Idle")
73
+ sm.add_transition(Transition(source="Idle", event="START", target="Running"))
74
+
75
+ cfg = CodeGenerationConfig()
76
+ gen = CCodeGenerator(config=cfg)
77
+ files = gen.generate_all_layers([("Application", sm)], GlobalDefinitions())
78
+ gen.save_generated_code(files, "generated/")
79
+ ```
80
+
81
+ ### GUI
82
+
83
+ ```
84
+ python -m statable
85
+ ```
86
+
87
+ Menu: **Language / 语言** → switch between **English** and **简体中文**.
88
+
89
+ ---
90
+
91
+ ## Requirements
92
+
93
+ - Python 3.10 or later
94
+ - PySide6 >= 6.0 (for GUI)
95
+ - pycparser (optional, for advanced parsing)
96
+
97
+ ---
98
+
99
+ ## Links
100
+
101
+ - **Homepage**: https://github.com/akashi-hideki/StaTable
102
+ - **Documentation**: https://github.com/akashi-hideki/StaTable/blob/main/README.md
103
+ - **Issues**: https://github.com/akashi-hideki/StaTable/issues
104
+ - **Chinese README**: https://github.com/akashi-hideki/StaTable/blob/main/README_zh-CN.md
105
+
106
+ ---
107
+
108
+ ## License
109
+
110
+ Apache License 2.0 — free for commercial and personal use.
111
+
112
+ See [LICENSE](https://github.com/akashi-hideki/StaTable/blob/main/LICENSE) for details.
113
+
114
+ ---
115
+
116
+ ## Acknowledgments
117
+
118
+ - [PySide6](https://www.qt.io/qt-for-python) — Qt 6 for Python
119
+ - [cppcheck](https://cppcheck.sourceforge.io/) — static analysis
120
+ - All contributors and users
121
+
122
+ ---
123
+
124
+ If StaTable helps you, please consider giving it a ⭐ on GitHub.
@@ -0,0 +1,38 @@
1
+ # codegen package
2
+ """
3
+ StaTable code generation layer
4
+
5
+ [v1.5 added]
6
+ - Keep re-exports minimal
7
+ - CCodeGenerator loads many submodules at generation time,
8
+ so it is not re-exported at top level (to reduce startup time)
9
+ """
10
+
11
+ __version__ = "3.1.0"
12
+
13
+ __all__ = [
14
+ 'CCodeGenerator',
15
+ 'CodeGenerationConfig',
16
+ 'ConfigManager',
17
+ 'validate',
18
+ '__version__',
19
+ ]
20
+
21
+
22
+ def __getattr__(name):
23
+ """\n PEP 562 lazy import\n"""
24
+ if name == 'CCodeGenerator':
25
+ from .c_code_generator import CCodeGenerator
26
+ return CCodeGenerator
27
+ if name == 'CodeGenerationConfig':
28
+ from .config import CodeGenerationConfig
29
+ return CodeGenerationConfig
30
+ if name == 'ConfigManager':
31
+ from .config import ConfigManager
32
+ return ConfigManager
33
+ if name == 'validate':
34
+ import importlib
35
+ return importlib.import_module('.validate', __name__)
36
+ raise AttributeError(
37
+ f"module 'codegen' has no attribute {name!r}"
38
+ )