mapFolding 0.16.2__py3-none-any.whl → 0.17.0__py3-none-any.whl

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 (80) hide show
  1. easyRun/A000682.py +2 -2
  2. easyRun/NOTcountingFolds.py +16 -8
  3. easyRun/countFolds.py +9 -2
  4. easyRun/generateAllModules.py +14 -0
  5. easyRun/meanders.py +4 -4
  6. mapFolding/__init__.py +1 -0
  7. mapFolding/_theSSOT.py +3 -2
  8. mapFolding/_theTypes.py +3 -0
  9. mapFolding/algorithms/A000136constraintPropagation.py +95 -0
  10. mapFolding/algorithms/A000136elimination.py +163 -0
  11. mapFolding/algorithms/A000136eliminationParallel.py +77 -0
  12. mapFolding/algorithms/A086345.py +75 -0
  13. mapFolding/algorithms/matrixMeanders.py +59 -18
  14. mapFolding/algorithms/matrixMeandersNumPyndas.py +841 -0
  15. mapFolding/algorithms/oeisIDbyFormula.py +2 -2
  16. mapFolding/algorithms/symmetricFolds.py +35 -0
  17. mapFolding/basecamp.py +100 -153
  18. mapFolding/dataBaskets.py +142 -65
  19. mapFolding/filesystemToolkit.py +4 -32
  20. mapFolding/oeis.py +5 -12
  21. mapFolding/reference/A086345Wu.py +25 -0
  22. mapFolding/reference/irvineJavaPort.py +3 -3
  23. mapFolding/reference/matrixMeandersAnalysis/signatures.py +3 -0
  24. mapFolding/reference/meandersDumpingGround/matrixMeandersNumPyV1finalForm.py +1 -1
  25. mapFolding/someAssemblyRequired/A007822/A007822rawMaterials.py +10 -45
  26. mapFolding/someAssemblyRequired/A007822/_asynchronousAnnex.py +51 -0
  27. mapFolding/someAssemblyRequired/A007822/makeA007822AsynchronousModules.py +39 -196
  28. mapFolding/someAssemblyRequired/A007822/makeA007822Modules.py +57 -43
  29. mapFolding/someAssemblyRequired/RecipeJob.py +84 -34
  30. mapFolding/someAssemblyRequired/__init__.py +4 -8
  31. mapFolding/someAssemblyRequired/_toolkitContainers.py +38 -7
  32. mapFolding/someAssemblyRequired/infoBooth.py +41 -23
  33. mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +140 -164
  34. mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +63 -96
  35. mapFolding/someAssemblyRequired/makingModules_count.py +26 -30
  36. mapFolding/someAssemblyRequired/makingModules_doTheNeedful.py +10 -72
  37. mapFolding/someAssemblyRequired/{mapFolding → mapFoldingModules}/makeMapFoldingModules.py +30 -35
  38. mapFolding/someAssemblyRequired/meanders/makeMeandersModules.py +13 -11
  39. mapFolding/someAssemblyRequired/toolkitMakeModules.py +5 -31
  40. mapFolding/someAssemblyRequired/toolkitNumba.py +3 -2
  41. mapFolding/someAssemblyRequired/transformationTools.py +12 -15
  42. mapFolding/syntheticModules/A007822/algorithm.py +45 -50
  43. mapFolding/syntheticModules/A007822/asynchronous.py +92 -36
  44. mapFolding/syntheticModules/A007822/initializeState.py +19 -23
  45. mapFolding/syntheticModules/A007822/theorem2.py +20 -24
  46. mapFolding/syntheticModules/A007822/theorem2Numba.py +23 -25
  47. mapFolding/syntheticModules/A007822/theorem2Trimmed.py +19 -23
  48. mapFolding/syntheticModules/countParallelNumba.py +1 -2
  49. mapFolding/syntheticModules/daoOfMapFoldingNumba.py +5 -4
  50. mapFolding/syntheticModules/initializeState.py +1 -1
  51. mapFolding/syntheticModules/meanders/bigInt.py +59 -22
  52. mapFolding/syntheticModules/theorem2.py +1 -1
  53. mapFolding/syntheticModules/theorem2Numba.py +30 -9
  54. mapFolding/syntheticModules/theorem2Trimmed.py +2 -2
  55. mapFolding/tests/test_computations.py +29 -3
  56. {mapfolding-0.16.2.dist-info → mapfolding-0.17.0.dist-info}/METADATA +11 -8
  57. mapfolding-0.17.0.dist-info/RECORD +107 -0
  58. mapFolding/_dataPacking.py +0 -68
  59. mapFolding/algorithms/matrixMeandersBeDry.py +0 -182
  60. mapFolding/algorithms/matrixMeandersNumPy.py +0 -333
  61. mapFolding/algorithms/matrixMeandersPandas.py +0 -334
  62. mapFolding/reference/meandersDumpingGround/A005316intOptimized.py +0 -122
  63. mapFolding/reference/meandersDumpingGround/A005316optimized128bit.py +0 -79
  64. mapFolding/reference/meandersDumpingGround/matrixMeandersBaseline.py +0 -65
  65. mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineAnnex.py +0 -84
  66. mapFolding/reference/meandersDumpingGround/matrixMeandersSimpleQueue.py +0 -90
  67. mapFolding/syntheticModules/A007822/algorithmNumba.py +0 -94
  68. mapFolding/syntheticModules/A007822/asynchronousAnnex.py +0 -66
  69. mapFolding/syntheticModules/A007822/asynchronousAnnexNumba.py +0 -70
  70. mapFolding/syntheticModules/A007822/asynchronousNumba.py +0 -79
  71. mapFolding/syntheticModules/A007822/asynchronousTheorem2.py +0 -65
  72. mapFolding/syntheticModules/A007822/asynchronousTrimmed.py +0 -56
  73. mapFolding/syntheticModules/dataPacking.py +0 -26
  74. mapFolding/syntheticModules/dataPackingA007822.py +0 -92
  75. mapfolding-0.16.2.dist-info/RECORD +0 -115
  76. /mapFolding/someAssemblyRequired/{mapFolding → mapFoldingModules}/__init__.py +0 -0
  77. {mapfolding-0.16.2.dist-info → mapfolding-0.17.0.dist-info}/WHEEL +0 -0
  78. {mapfolding-0.16.2.dist-info → mapfolding-0.17.0.dist-info}/entry_points.txt +0 -0
  79. {mapfolding-0.16.2.dist-info → mapfolding-0.17.0.dist-info}/licenses/LICENSE +0 -0
  80. {mapfolding-0.16.2.dist-info → mapfolding-0.17.0.dist-info}/top_level.txt +0 -0
@@ -1,36 +1,25 @@
1
1
  """addSymmetryCheckAsynchronous."""
2
- from astToolkit import (
3
- Be, extractFunctionDef, Grab, identifierDotAttribute, Make, NodeChanger, NodeTourist, parsePathFilename2astModule,
4
- Then)
2
+ from astToolkit import Be, Grab, identifierDotAttribute, Make, NodeChanger, NodeTourist, Then
3
+ from astToolkit.containers import LedgerOfImports
4
+ from astToolkit.transformationTools import write_astModule
5
5
  from hunterMakesPy import raiseIfNone
6
6
  from mapFolding import packageSettings
7
- from mapFolding.someAssemblyRequired import (
8
- identifierCallableSourceDispatcherDEFAULT, identifierCountingDEFAULT, identifierDataclassInstanceDEFAULT, IfThis,
9
- logicalPathInfixAlgorithmDEFAULT)
10
- from mapFolding.someAssemblyRequired.A007822.A007822rawMaterials import (
11
- A007822adjustFoldsTotal, astExprCall_filterAsymmetricFoldsDataclass, identifier_filterAsymmetricFolds,
12
- identifierCounting, identifierDataclass, logicalPathInfixA007822, sourceCallableDispatcherA007822,
13
- sourceCallableIdentifierA007822)
14
- from mapFolding.someAssemblyRequired.infoBooth import identifierCallableSourceDEFAULT
15
- from mapFolding.someAssemblyRequired.makingModules_count import makeTheorem2, numbaOnTheorem2, trimTheorem2
16
- from mapFolding.someAssemblyRequired.toolkitMakeModules import (
17
- getLogicalPath, getModule, getPathFilename, write_astModule)
7
+ from mapFolding.someAssemblyRequired import defaultA007822, IfThis
8
+ from mapFolding.someAssemblyRequired.A007822.A007822rawMaterials import ExprCallFilterAsymmetricFoldsState
9
+ from mapFolding.someAssemblyRequired.toolkitMakeModules import getModule, getPathFilename
18
10
  from pathlib import PurePath
19
11
  import ast
20
12
 
21
- identifier_asynchronous = 'asynchronous'
22
- identifier_getSymmetricFoldsTotal = 'getSymmetricFoldsTotal'
23
- identifier_initializeConcurrencyManager = 'initializeConcurrencyManager'
24
- identifier_processCompletedFutures = '_processCompletedFutures'
13
+ # TODO figure out asynchronous + numba.
25
14
 
26
- astExprCall_initializeConcurrencyManager: ast.Expr = Make.Expr(Make.Call(Make.Name(identifier_initializeConcurrencyManager), listParameters=[Make.Name('maxWorkers')]))
15
+ astExprCall_initializeConcurrencyManager: ast.Expr = Make.Expr(Make.Call(Make.Name(defaultA007822['function']['initializeConcurrencyManager']), listParameters=[Make.Name('maxWorkers')]))
27
16
  AssignTotal2CountingIdentifier: ast.Assign = Make.Assign(
28
- [Make.Attribute(Make.Name(identifierDataclass), identifierCounting, context=Make.Store())]
29
- , value=Make.Call(Make.Name(identifier_getSymmetricFoldsTotal))
17
+ [Make.Attribute(Make.Name(defaultA007822['variable']['stateInstance']), defaultA007822['variable']['counting'], context=Make.Store())]
18
+ , value=Make.Call(Make.Name(defaultA007822['function']['getSymmetricFoldsTotal']))
30
19
  )
31
20
 
32
21
  def addSymmetryCheckAsynchronous(astModule: ast.Module, identifierModule: str, identifierCallable: str | None = None, logicalPathInfix: identifierDotAttribute | None = None, sourceCallableDispatcher: str | None = None) -> PurePath: # noqa: ARG001
33
- """Add symmetry check to the counting function.
22
+ """Make the check for symmetry in each folding pattern in a group of folds asynchronous to the rest of the symmetric map folding algorithm.
34
23
 
35
24
  To do asynchronous filtering, a few things must happen.
36
25
  1. When the algorithm finds a `groupOfFolds`, the call to `filterAsymmetricFolds` must be non-blocking.
@@ -45,16 +34,13 @@ def addSymmetryCheckAsynchronous(astModule: ast.Module, identifierModule: str, i
45
34
  Each `leafBelow` array will be 28 * 8-bits, so if the queue has only 0.3% of the total calls in it, that is 28 GiB of data.
46
35
  """
47
36
  astFunctionDef_count: ast.FunctionDef = raiseIfNone(NodeTourist(
48
- findThis = Be.FunctionDef.nameIs(IfThis.isIdentifier(sourceCallableIdentifierA007822))
37
+ findThis = Be.FunctionDef.nameIs(IfThis.isIdentifier(defaultA007822['function']['counting']))
49
38
  , doThat = Then.extractIt
50
39
  ).captureLastMatch(astModule))
51
40
 
52
- NodeChanger(Be.Return, Then.insertThisAbove([A007822adjustFoldsTotal])).visit(astFunctionDef_count)
53
-
54
41
  NodeChanger(
55
- findThis=Be.AugAssign.targetIs(IfThis.isAttributeNamespaceIdentifier(identifierDataclass, identifierCounting))
56
- , doThat=Then.replaceWith(astExprCall_filterAsymmetricFoldsDataclass)
57
- ).visit(astFunctionDef_count)
42
+ Be.Assign.valueIs(IfThis.isCallIdentifier(defaultA007822['function']['filterAsymmetricFolds']))
43
+ , Then.replaceWith(ExprCallFilterAsymmetricFoldsState)).visit(astFunctionDef_count)
58
44
 
59
45
  NodeChanger(
60
46
  findThis=Be.While.testIs(IfThis.isCallIdentifier('activeLeafGreaterThan0'))
@@ -62,9 +48,10 @@ def addSymmetryCheckAsynchronous(astModule: ast.Module, identifierModule: str, i
62
48
  ).visit(astFunctionDef_count)
63
49
 
64
50
  NodeChanger(
65
- findThis=Be.FunctionDef.nameIs(IfThis.isIdentifier(sourceCallableIdentifierA007822))
51
+ findThis=Be.FunctionDef.nameIs(IfThis.isIdentifier(defaultA007822['function']['counting']))
66
52
  , doThat=Then.replaceWith(astFunctionDef_count)
67
53
  ).visit(astModule)
54
+ del astFunctionDef_count
68
55
 
69
56
  astFunctionDef_doTheNeedful: ast.FunctionDef = raiseIfNone(NodeTourist(
70
57
  findThis = Be.FunctionDef.nameIs(IfThis.isIdentifier(sourceCallableDispatcher))
@@ -72,188 +59,44 @@ def addSymmetryCheckAsynchronous(astModule: ast.Module, identifierModule: str, i
72
59
  ).captureLastMatch(astModule))
73
60
 
74
61
  astFunctionDef_doTheNeedful.body.insert(0, astExprCall_initializeConcurrencyManager)
75
- astFunctionDef_doTheNeedful.args.args.append(Make.arg('maxWorkers', Make.BitOr.join([Make.Name('int'), Make.Constant(None)])))
76
- astFunctionDef_doTheNeedful.args.defaults.append(Make.Constant(None))
62
+ astFunctionDef_doTheNeedful.args.args.append(Make.arg('maxWorkers', Make.Name('int')))
77
63
 
78
64
  NodeChanger(
79
65
  findThis=Be.FunctionDef.nameIs(IfThis.isIdentifier(sourceCallableDispatcher))
80
66
  , doThat=Then.replaceWith(astFunctionDef_doTheNeedful)
81
67
  ).visit(astModule)
68
+ del astFunctionDef_doTheNeedful
82
69
 
83
- astImportFrom = ast.ImportFrom(getLogicalPath(packageSettings.identifierPackage, logicalPathInfix, identifierModule + 'Annex')
84
- , [Make.alias(identifier_filterAsymmetricFolds), Make.alias(identifier_getSymmetricFoldsTotal), Make.alias(identifier_initializeConcurrencyManager)], 0)
85
-
86
- astModule.body.insert(0, astImportFrom)
87
-
88
- pathFilename: PurePath = getPathFilename(packageSettings.pathPackage, logicalPathInfix, identifierModule)
89
- pathFilenameAnnex: PurePath = getPathFilename(packageSettings.pathPackage, logicalPathInfix, identifierModule + 'Annex')
90
-
91
- write_astModule(astModule, pathFilename, packageSettings.identifierPackage)
92
- del astModule
93
- # ----------------- Ingredients Module Annex ------------------------------------------------------------------------------
94
- ImaString = """from concurrent.futures import Future as ConcurrentFuture, ThreadPoolExecutor
95
- from hunterMakesPy import raiseIfNone
96
- from mapFolding import Array1DLeavesTotal
97
- from queue import Empty, Queue
98
- from threading import Thread
99
- import numpy"""
100
-
101
- astModule = ast.parse(ImaString)
102
- del ImaString
103
-
104
- ImaString = f"""concurrencyManager = None
105
- {identifierCounting}Total: int = 0
106
- processingThread = None
107
- queueFutures: Queue[ConcurrentFuture[int]] = Queue()
108
- """
109
- astModule.body.extend(ast.parse(ImaString).body)
110
- del ImaString
111
-
112
- ImaString = f"""def {identifier_initializeConcurrencyManager}(maxWorkers: int | None = None, {identifierCounting}: int = 0) -> None:
113
- global concurrencyManager, queueFutures, {identifierCounting}Total, processingThread
114
- concurrencyManager = ThreadPoolExecutor(max_workers=maxWorkers)
115
- queueFutures = Queue()
116
- {identifierCounting}Total = {identifierCounting}
117
- processingThread = Thread(target={identifier_processCompletedFutures})
118
- processingThread.start()
119
- """
120
- astModule.body.append(raiseIfNone(extractFunctionDef(ast.parse(ImaString), identifier_initializeConcurrencyManager)))
121
- del ImaString
122
-
123
- ImaString = f"""def {identifier_processCompletedFutures}() -> None:
124
- global queueFutures, {identifierCounting}Total
125
- while True:
126
- try:
127
- claimTicket: ConcurrentFuture[int] = queueFutures.get(timeout=1)
128
- if claimTicket is None:
129
- break
130
- {identifierCounting}Total += claimTicket.result()
131
- except Empty:
132
- continue
133
- """
134
- astModule.body.append(raiseIfNone(extractFunctionDef(ast.parse(ImaString), identifier_processCompletedFutures)))
135
- del ImaString
136
-
137
- ImaString = f"""def _{identifier_filterAsymmetricFolds}(leafBelow: Array1DLeavesTotal) -> int:
138
- {identifierCounting} = 0
139
- leafComparison: Array1DLeavesTotal = numpy.zeros_like(leafBelow)
140
- leavesTotal = leafBelow.size - 1
141
-
142
- indexLeaf = 0
143
- leafConnectee = 0
144
- while leafConnectee < leavesTotal + 1:
145
- leafNumber = int(leafBelow[indexLeaf])
146
- leafComparison[leafConnectee] = (leafNumber - indexLeaf + leavesTotal) % leavesTotal
147
- indexLeaf = leafNumber
148
- leafConnectee += 1
149
-
150
- indexInMiddle = leavesTotal // 2
151
- indexDistance = 0
152
- while indexDistance < leavesTotal + 1:
153
- ImaSymmetricFold = True
154
- leafConnectee = 0
155
- while leafConnectee < indexInMiddle:
156
- if leafComparison[(indexDistance + leafConnectee) % (leavesTotal + 1)] != leafComparison[(indexDistance + leavesTotal - 1 - leafConnectee) % (leavesTotal + 1)]:
157
- ImaSymmetricFold = False
158
- break
159
- leafConnectee += 1
160
- {identifierCounting} += ImaSymmetricFold
161
- indexDistance += 1
162
- return {identifierCounting}
163
- """
164
- astModule.body.append(raiseIfNone(extractFunctionDef(ast.parse(ImaString), f'_{identifier_filterAsymmetricFolds}')))
165
- del ImaString
70
+ imports = LedgerOfImports(astModule)
71
+ removeImports = NodeChanger(IfThis.isAnyOf(Be.ImportFrom, Be.Import), Then.removeIt)
72
+ removeImports.visit(astModule)
166
73
 
167
- ImaString = f"""
168
- def {identifier_filterAsymmetricFolds}(leafBelow: Array1DLeavesTotal) -> None:
169
- global concurrencyManager, queueFutures
170
- queueFutures.put_nowait(raiseIfNone(concurrencyManager).submit(_{identifier_filterAsymmetricFolds}, leafBelow.copy()))
171
- """
172
- astModule.body.append(raiseIfNone(extractFunctionDef(ast.parse(ImaString), identifier_filterAsymmetricFolds)))
173
- del ImaString
174
-
175
- ImaString = f"""
176
- def {identifier_getSymmetricFoldsTotal}() -> int:
177
- global concurrencyManager, queueFutures, processingThread
178
- raiseIfNone(concurrencyManager).shutdown(wait=True)
179
- queueFutures.put(None)
180
- raiseIfNone(processingThread).join()
181
- return {identifierCounting}Total
182
- """
183
- astModule.body.append(raiseIfNone(extractFunctionDef(ast.parse(ImaString), identifier_getSymmetricFoldsTotal)))
184
- del ImaString
185
- write_astModule(astModule, pathFilenameAnnex, packageSettings.identifierPackage)
186
-
187
- return pathFilename
74
+ astModuleAsynchronousAnnex: ast.Module = getModule(logicalPathInfix=defaultA007822['logicalPath']['assembly'], identifierModule='_asynchronousAnnex')
75
+ imports.walkThis(astModuleAsynchronousAnnex)
76
+ removeImports.visit(astModuleAsynchronousAnnex)
188
77
 
189
- def makeAsynchronousNumbaOnTheorem2(astModule: ast.Module, identifierModule: str, identifierCallable: str | None = None, logicalPathInfix: identifierDotAttribute | None = None, sourceCallableDispatcher: str | None = None) -> PurePath:
190
- """Make the asynchronous numba on theorem2 module."""
191
- pathFilename: PurePath = numbaOnTheorem2(astModule, identifierModule, identifierCallable, logicalPathInfix, sourceCallableDispatcher)
192
-
193
- astModule = parsePathFilename2astModule(pathFilename)
194
-
195
- listAssignToMove: list[ast.Assign] = []
196
-
197
- findThis = IfThis.isAnyOf(IfThis.isAssignAndTargets0Is(IfThis.isNameIdentifier(identifierCountingDEFAULT))
198
- , Be.AugAssign.targetIs(IfThis.isNameIdentifier(identifierCountingDEFAULT)))
199
- NodeTourist(findThis, Then.appendTo(listAssignToMove)).visit(astModule)
200
-
201
- NodeChanger(findThis, Then.removeIt).visit(astModule)
202
-
203
- NodeChanger(
204
- findThis=Be.Assign.valueIs(IfThis.isCallIdentifier(identifierCallableSourceDEFAULT))
205
- , doThat=Then.insertThisBelow(listAssignToMove)
206
- ).visit(astModule)
207
-
208
- write_astModule(astModule, pathFilename, packageSettings.identifierPackage)
209
-
210
- return pathFilename
211
-
212
- def makeAsynchronousTheorem2(astModule: ast.Module, identifierModule: str, identifierCallable: str | None = None, logicalPathInfix: identifierDotAttribute | None = None, sourceCallableDispatcher: str | None = None) -> PurePath:
213
- """Make the asynchronous theorem2 module."""
214
- pathFilename: PurePath = makeTheorem2(astModule, identifierModule, identifierCallable, logicalPathInfix, sourceCallableDispatcher)
215
-
216
- astModule = parsePathFilename2astModule(pathFilename)
217
-
218
- astAttribute = Make.Attribute(Make.Name(identifierDataclassInstanceDEFAULT), identifierCountingDEFAULT)
219
- astAssign = Make.Assign([astAttribute], value=Make.Constant(0))
78
+ NodeChanger(Be.FunctionDef.nameIs(IfThis.isIdentifier(defaultA007822['function']['filterAsymmetricFolds']))
79
+ , Grab.nameAttribute(Then.replaceWith(f"_{defaultA007822['function']['filterAsymmetricFolds']}"))
80
+ ).visit(astModule)
220
81
 
221
- NodeChanger[ast.Call, ast.Call](
222
- findThis = IfThis.isCallIdentifier(identifier_initializeConcurrencyManager)
223
- , doThat = Grab.argsAttribute(lambda args: [*args, astAttribute]) # pyright: ignore[reportArgumentType]
224
- ).visit(astModule)
82
+ NodeChanger(Be.FunctionDef.nameIs(IfThis.isIdentifier(f"_{defaultA007822['function']['filterAsymmetricFolds']}"))
83
+ , Then.removeIt
84
+ ).visit(astModuleAsynchronousAnnex)
225
85
 
226
- NodeChanger(
227
- findThis = Be.Expr.valueIs(IfThis.isCallIdentifier(identifier_initializeConcurrencyManager))
228
- , doThat = Then.insertThisBelow([astAssign])
229
- ).visit(astModule)
86
+ astModule.body = [*imports.makeList_ast(), *astModuleAsynchronousAnnex.body, *astModule.body]
230
87
 
231
- identifierAnnex: identifierDotAttribute = getLogicalPath(packageSettings.identifierPackage, logicalPathInfix, identifier_asynchronous + 'Annex')
232
- identifierAnnexNumba: identifierDotAttribute = identifierAnnex + 'Numba'
233
-
234
- NodeChanger(
235
- findThis=Be.ImportFrom.moduleIs(IfThis.isIdentifier(identifierAnnex))
236
- , doThat=Grab.moduleAttribute(Then.replaceWith(identifierAnnexNumba))
237
- ).visit(astModule)
88
+ pathFilename: PurePath = getPathFilename(packageSettings.pathPackage, logicalPathInfix, identifierModule)
238
89
 
239
- write_astModule(astModule, pathFilename, packageSettings.identifierPackage)
90
+ write_astModule(astModule, pathFilename, identifierPackage=packageSettings.identifierPackage)
240
91
 
241
92
  return pathFilename
242
93
 
243
- def _makeA007822AsynchronousModules() -> None:
244
-
245
- astModule: ast.Module = getModule(logicalPathInfix=logicalPathInfixAlgorithmDEFAULT)
246
- pathFilename: PurePath = addSymmetryCheckAsynchronous(astModule, 'asynchronous', None, logicalPathInfixA007822, sourceCallableDispatcherA007822)
247
-
248
- astModule = getModule(logicalPathInfix=logicalPathInfixA007822, identifierModule='asynchronous')
249
- pathFilename = makeAsynchronousTheorem2(astModule, 'asynchronousTheorem2', None, logicalPathInfixA007822, identifierCallableSourceDispatcherDEFAULT)
250
-
251
- astModule = parsePathFilename2astModule(pathFilename)
252
- pathFilename = trimTheorem2(astModule, 'asynchronousTrimmed', None, logicalPathInfixA007822, identifierCallableSourceDispatcherDEFAULT)
253
-
254
- astModule = parsePathFilename2astModule(pathFilename)
255
- pathFilename = makeAsynchronousNumbaOnTheorem2(astModule, 'asynchronousNumba', None, logicalPathInfixA007822, identifierCallableSourceDispatcherDEFAULT)
94
+ def makeA007822AsynchronousModules() -> None:
95
+ """Make asynchronous modules for A007822."""
96
+ astModule: ast.Module = getModule(logicalPathInfix=defaultA007822['logicalPath']['synthetic'], identifierModule=defaultA007822['module']['algorithm'])
97
+ pathFilename: PurePath = addSymmetryCheckAsynchronous(astModule, defaultA007822['module']['asynchronous'], defaultA007822['function']['counting'] # noqa: F841 # pyright: ignore[reportUnusedVariable]
98
+ , defaultA007822['logicalPath']['synthetic'], defaultA007822['function']['dispatcher'])
256
99
 
257
100
  if __name__ == '__main__':
258
- _makeA007822AsynchronousModules()
101
+ makeA007822AsynchronousModules()
259
102
 
@@ -1,75 +1,89 @@
1
1
  """addSymmetryCheck."""
2
- from astToolkit import Be, identifierDotAttribute, Make, NodeChanger, NodeTourist, parsePathFilename2astModule, Then
2
+ from astToolkit import (
3
+ Be, Grab, identifierDotAttribute, Make, NodeChanger, NodeTourist, parsePathFilename2astModule, Then)
4
+ from astToolkit.containers import LedgerOfImports
5
+ from astToolkit.transformationTools import write_astModule
3
6
  from hunterMakesPy import raiseIfNone
4
7
  from mapFolding import packageSettings
5
- from mapFolding.someAssemblyRequired import (
6
- identifierCallableSourceDEFAULT, identifierCallableSourceDispatcherDEFAULT, identifierCountingDEFAULT,
7
- identifierDataclassInstanceDEFAULT, IfThis)
8
+ from mapFolding.someAssemblyRequired import default, defaultA007822, IfThis
8
9
  from mapFolding.someAssemblyRequired.A007822.A007822rawMaterials import (
9
- A007822adjustFoldsTotal, A007822incrementCount, FunctionDef_filterAsymmetricFolds, logicalPathInfixA007822,
10
- sourceCallableDispatcherA007822, sourceCallableIdentifierA007822)
11
- from mapFolding.someAssemblyRequired.makingModules_count import (
12
- makeMapFoldingNumba, makeTheorem2, numbaOnTheorem2, trimTheorem2)
13
- from mapFolding.someAssemblyRequired.makingModules_doTheNeedful import makeInitializeState, makeUnRePackDataclass
14
- from mapFolding.someAssemblyRequired.toolkitMakeModules import (
15
- getLogicalPath, getModule, getPathFilename, write_astModule)
16
- from os import PathLike
10
+ A007822adjustFoldsTotal, A007822incrementCount, FunctionDef_filterAsymmetricFolds)
11
+ from mapFolding.someAssemblyRequired.makingModules_count import makeTheorem2, numbaOnTheorem2, trimTheorem2
12
+ from mapFolding.someAssemblyRequired.makingModules_doTheNeedful import makeInitializeState
13
+ from mapFolding.someAssemblyRequired.toolkitMakeModules import getModule, getPathFilename
17
14
  from pathlib import PurePath
18
15
  import ast
19
16
 
20
17
  def addSymmetryCheck(astModule: ast.Module, identifierModule: str, identifierCallable: str | None = None, logicalPathInfix: identifierDotAttribute | None = None, sourceCallableDispatcher: str | None = None) -> PurePath: # noqa: ARG001
21
- """Add logic to check for symmetric folds."""
22
- # NOTE HEY HEY! Are you trying to figure out why there is more than one copy of `filterAsymmetricFolds`? See the TODO NOTE, below.
18
+ """Modify the multidimensional map folding algorithm by checking for symmetry in each folding pattern in a group of folds."""
19
+ NodeChanger(Be.Name.idIs(IfThis.isIdentifier(default['variable']['stateDataclass']))
20
+ , Grab.idAttribute(Then.replaceWith(defaultA007822['variable']['stateDataclass']))
21
+ ).visit(astModule)
23
22
 
24
- astFunctionDef_count: ast.FunctionDef = raiseIfNone(NodeTourist(
25
- findThis = Be.FunctionDef.nameIs(IfThis.isIdentifier(identifierCallableSourceDEFAULT))
23
+ NodeChanger(Be.alias.nameIs(IfThis.isIdentifier(default['variable']['stateDataclass']))
24
+ , Grab.nameAttribute(Then.replaceWith(defaultA007822['variable']['stateDataclass']))
25
+ ).visit(astModule)
26
+
27
+ FunctionDef_count: ast.FunctionDef = raiseIfNone(NodeTourist(
28
+ findThis = Be.FunctionDef.nameIs(IfThis.isIdentifier(default['function']['counting']))
26
29
  , doThat = Then.extractIt
27
30
  ).captureLastMatch(astModule))
28
- astFunctionDef_count.name = sourceCallableIdentifierA007822
31
+ FunctionDef_count.name = identifierCallable or defaultA007822['function']['counting']
29
32
 
30
- NodeChanger(Be.Return, Then.insertThisAbove([A007822adjustFoldsTotal])).visit(astFunctionDef_count)
33
+ NodeChanger(Be.Return, Then.insertThisAbove([A007822adjustFoldsTotal])).visit(FunctionDef_count)
31
34
 
32
35
  NodeChanger(
33
- findThis=Be.AugAssign.targetIs(IfThis.isAttributeNamespaceIdentifier(identifierDataclassInstanceDEFAULT, identifierCountingDEFAULT))
36
+ findThis=Be.AugAssign.targetIs(IfThis.isAttributeNamespaceIdentifier(default['variable']['stateInstance'], default['variable']['counting']))
34
37
  , doThat=Then.replaceWith(A007822incrementCount)
35
- ).visit(astFunctionDef_count)
38
+ ).visit(FunctionDef_count)
39
+
40
+ imports = LedgerOfImports(astModule)
41
+ NodeChanger(IfThis.isAnyOf(Be.ImportFrom, Be.Import), Then.removeIt).visit(astModule)
42
+ imports.addImport_asStr('numpy')
36
43
 
37
- # TODO NOTE This will insert a copy of `filterAsymmetricFolds` for each `ast.ImportFrom` in the source module. Find or make a
38
- # system to replace the `Ingredients` paradigm.
39
- NodeChanger(Be.ImportFrom, Then.insertThisBelow([FunctionDef_filterAsymmetricFolds])).visit(astModule)
44
+ astModule.body = [*imports.makeList_ast(), FunctionDef_filterAsymmetricFolds, *astModule.body]
40
45
 
41
46
  pathFilename: PurePath = getPathFilename(packageSettings.pathPackage, logicalPathInfix, identifierModule)
42
47
 
43
- write_astModule(astModule, pathFilename, packageSettings.identifierPackage)
48
+ write_astModule(astModule, pathFilename, identifierPackage=packageSettings.identifierPackage)
44
49
 
45
50
  return pathFilename
46
51
 
47
- def _makeA007822Modules() -> None:
48
- astModule = getModule(logicalPathInfix='algorithms')
49
- pathFilename = addSymmetryCheck(astModule, 'algorithm', None, logicalPathInfixA007822, None)
52
+ def _numbaOnTheorem2(astModule: ast.Module, identifierModule: str, identifierCallable: str | None = None, logicalPathInfix: identifierDotAttribute | None = None, sourceCallableDispatcher: str | None = None) -> PurePath:
53
+ pathFilename: PurePath = numbaOnTheorem2(astModule, identifierModule, identifierCallable, logicalPathInfix, sourceCallableDispatcher)
54
+ astModule = parsePathFilename2astModule(pathFilename)
55
+
56
+ NodeChanger(Be.AnnAssign.valueIs(IfThis.isAttributeNamespaceIdentifier(defaultA007822['variable']['stateInstance'], 'indices'))
57
+ , lambda node: Grab.valueAttribute(Then.replaceWith(Make.Call(Make.Name('List'), [raiseIfNone(node.value)])))(node)
58
+ ).visit(astModule)
50
59
 
51
- astModule = getModule(logicalPathInfix=logicalPathInfixA007822, identifierModule='algorithm')
52
- pathFilename: PurePath = makeMapFoldingNumba(astModule, 'algorithmNumba', None, logicalPathInfixA007822, sourceCallableDispatcherA007822)
60
+ astModule.body.insert(0, Make.ImportFrom('numba.typed', [Make.alias('List')]))
53
61
 
54
- # NOTE I can't handle parallel right now.
62
+ write_astModule(astModule, pathFilename, identifierPackage=packageSettings.identifierPackage)
55
63
 
56
- astModule = getModule(logicalPathInfix=logicalPathInfixA007822, identifierModule='algorithm')
57
- makeInitializeState(astModule, 'initializeState', 'transitionOnGroupsOfFolds', logicalPathInfixA007822)
64
+ return pathFilename
58
65
 
59
- astModule = getModule(logicalPathInfix=logicalPathInfixA007822, identifierModule='algorithm')
60
- pathFilename = makeTheorem2(astModule, 'theorem2', None, logicalPathInfixA007822, identifierCallableSourceDispatcherDEFAULT)
66
+ def makeA007822Modules() -> None:
67
+ """Make."""
68
+ astModule: ast.Module = getModule(logicalPathInfix='algorithms')
69
+ pathFilename: PurePath = addSymmetryCheck(astModule, defaultA007822['module']['algorithm'], defaultA007822['function']['counting']
70
+ , defaultA007822['logicalPath']['synthetic'], None)
61
71
 
62
- astModule = parsePathFilename2astModule(pathFilename)
63
- pathFilename = trimTheorem2(astModule, 'theorem2Trimmed', None, logicalPathInfixA007822, identifierCallableSourceDispatcherDEFAULT)
72
+ astModule = getModule(logicalPathInfix=defaultA007822['logicalPath']['synthetic'], identifierModule=defaultA007822['module']['algorithm'])
73
+ makeInitializeState(astModule, defaultA007822['module']['initializeState']
74
+ , defaultA007822['function']['initializeState'], defaultA007822['logicalPath']['synthetic'], None, identifiers=defaultA007822)
75
+
76
+ astModule = getModule(logicalPathInfix=defaultA007822['logicalPath']['synthetic'], identifierModule=defaultA007822['module']['algorithm'])
77
+ pathFilename = makeTheorem2(astModule, 'theorem2', defaultA007822['function']['counting']
78
+ , defaultA007822['logicalPath']['synthetic'], defaultA007822['function']['dispatcher'], identifiers=defaultA007822)
64
79
 
65
80
  astModule = parsePathFilename2astModule(pathFilename)
66
- pathFilename = numbaOnTheorem2(astModule, 'theorem2Numba', None, logicalPathInfixA007822, identifierCallableSourceDispatcherDEFAULT)
67
- # TODO from mapFolding.syntheticModules.dataPackingA007822 import unRePackDataclass
68
- # @unRePackDataclass
81
+ pathFilename = trimTheorem2(astModule, 'theorem2Trimmed', defaultA007822['function']['counting']
82
+ , defaultA007822['logicalPath']['synthetic'], defaultA007822['function']['dispatcher'])
69
83
 
70
- # TODO Make this decorator.
71
- # astImportFrom: ast.ImportFrom = Make.ImportFrom(getLogicalPath(packageSettings.identifierPackage, logicalPathInfixA007822, 'theorem2Numba'), list_alias=[Make.alias(sourceCallableIdentifierA007822)])
72
- # makeUnRePackDataclass(astImportFrom, 'dataPackingA007822')
84
+ astModule = parsePathFilename2astModule(pathFilename)
85
+ pathFilename = _numbaOnTheorem2(astModule, 'theorem2Numba', defaultA007822['function']['counting']
86
+ , defaultA007822['logicalPath']['synthetic'], defaultA007822['function']['dispatcher'])
73
87
 
74
88
  if __name__ == '__main__':
75
- _makeA007822Modules()
89
+ makeA007822Modules()
@@ -1,33 +1,29 @@
1
1
  """Configuration by dataclass."""
2
2
 
3
- from ast import Module
4
3
  from astToolkit import identifierDotAttribute, parseLogicalPath2astModule
4
+ from astToolkit.containers import IngredientsFunction, IngredientsModule, LedgerOfImports
5
+ from astToolkit.transformationTools import pythonCode2ast_expr
6
+ from hunterMakesPy import autoDecodingRLE
7
+ # TODO 'The____' identifiers are a vestigial semiotic system. Do I still need to import `asname`? If so, would different
8
+ # identifiers better integrate into the current semiotics?
5
9
  from mapFolding import (
6
10
  DatatypeElephino as TheDatatypeElephino, DatatypeFoldsTotal as TheDatatypeFoldsTotal,
7
11
  DatatypeLeavesTotal as TheDatatypeLeavesTotal, getPathFilenameFoldsTotal, getPathRootJobDEFAULT, packageSettings)
8
- from mapFolding.dataBaskets import MapFoldingState
9
- from mapFolding.someAssemblyRequired import identifierDataclassInstanceDEFAULT, ShatteredDataclass
12
+ from mapFolding.dataBaskets import MapFoldingState, SymmetricFoldsState
13
+ from mapFolding.someAssemblyRequired import DatatypeConfiguration, default, ShatteredDataclass
10
14
  from mapFolding.someAssemblyRequired.transformationTools import shatter_dataclassesDOTdataclass
11
15
  from pathlib import Path, PurePosixPath
16
+ from typing import cast
17
+ import ast
12
18
  import dataclasses
13
19
 
14
- @dataclasses.dataclass
20
+ @dataclasses.dataclass(slots=True)
15
21
  class RecipeJobTheorem2:
16
22
  """Configuration recipe for generating map folding computation jobs.
17
23
 
18
24
  This dataclass serves as the central configuration hub for the code transformation
19
- assembly line that converts generic map folding algorithms into highly optimized,
20
- specialized computation modules. The recipe encapsulates all parameters required
21
- for source code analysis, target file generation, datatype mapping, and compilation
22
- optimization settings.
23
-
24
- The transformation process operates by extracting functions from source modules,
25
- embedding concrete parameter values, eliminating dead code paths, and generating
26
- standalone Python modules optimized for specific map dimensions.
27
-
28
- The recipe maintains both source configuration (where to find the generic algorithm)
29
- and target configuration (where to write the optimized module), along with the
30
- computational state that provides concrete values for the transformation process.
25
+ assembly line that converts generic map folding algorithms into optimized,
26
+ specialized modules.
31
27
 
32
28
  Attributes
33
29
  ----------
@@ -81,24 +77,24 @@ class RecipeJobTheorem2:
81
77
  Type alias for leaf count datatype.
82
78
  """
83
79
 
84
- state: MapFoldingState
80
+ state: MapFoldingState | SymmetricFoldsState
85
81
  """The map folding computation state containing dimensions and initial values."""
86
82
  foldsTotalEstimated: int = 0
87
83
  """Estimated total number of folds for progress tracking."""
88
84
  shatteredDataclass: ShatteredDataclass = dataclasses.field(default=None, init=True) # pyright: ignore[reportAssignmentType]
89
85
  """Deconstructed dataclass metadata for code transformation."""
90
86
 
91
- # Source -----------------------------------------
92
- source_astModule: Module = parseLogicalPath2astModule('mapFolding.syntheticModules.theorem2Numba') # noqa: RUF009
87
+ # ------- Source -----------------------------------------
88
+ source_astModule: ast.Module = parseLogicalPath2astModule(f'{packageSettings.identifierPackage}.{default['logicalPath']['synthetic']}.theorem2Numba') # noqa: RUF009
93
89
  """Parsed AST of the source module containing the generic algorithm."""
94
- sourceCountCallable: str = 'count'
90
+ identifierCallableSource: str = default['function']['counting']
95
91
  """Name of the counting function to extract."""
96
92
 
97
- sourceLogicalPathModuleDataclass: identifierDotAttribute = 'mapFolding.dataBaskets'
93
+ sourceLogicalPathModuleDataclass: identifierDotAttribute = f'{packageSettings.identifierPackage}.dataBaskets'
98
94
  """Logical path to the dataclass module."""
99
- sourceDataclassIdentifier: str = 'MapFoldingState'
95
+ sourceDataclassIdentifier: str = default['variable']['stateDataclass']
100
96
  """Name of the source dataclass."""
101
- sourceDataclassInstance: str = identifierDataclassInstanceDEFAULT
97
+ sourceDataclassInstance: str = default['variable']['stateInstance']
102
98
  """Instance identifier for the dataclass."""
103
99
 
104
100
  sourcePathPackage: PurePosixPath | None = PurePosixPath(packageSettings.pathPackage) # noqa: RUF009
@@ -106,7 +102,7 @@ class RecipeJobTheorem2:
106
102
  sourcePackageIdentifier: str | None = packageSettings.identifierPackage
107
103
  """Name of the source package."""
108
104
 
109
- # Filesystem, names of physical objects ------------------------------------------
105
+ # ------- Filesystem, names of physical objects ------------------------------------------
110
106
  pathPackage: PurePosixPath | None = None
111
107
  """Override path for the target package."""
112
108
  pathModule: PurePosixPath | None = PurePosixPath(getPathRootJobDEFAULT()) # noqa: RUF009
@@ -116,23 +112,23 @@ class RecipeJobTheorem2:
116
112
  pathFilenameFoldsTotal: PurePosixPath = dataclasses.field(default=None, init=True) # pyright: ignore[reportAssignmentType]
117
113
  """Path for writing fold count results."""
118
114
 
119
- # Logical identifiers, as opposed to physical identifiers ------------------------
115
+ # ------- Logical identifiers, as opposed to physical identifiers ------------------------
120
116
  packageIdentifier: str | None = None
121
117
  """Target package identifier."""
122
118
  logicalPathRoot: identifierDotAttribute | None = None
123
119
  """Logical path root; probably corresponds to physical filesystem directory."""
124
120
  moduleIdentifier: str = dataclasses.field(default=None, init=True) # pyright: ignore[reportAssignmentType]
125
121
  """Target module identifier."""
126
- countCallable: str = sourceCountCallable
122
+ identifierCallable: str = identifierCallableSource
127
123
  """Name of the counting function in generated module."""
128
- dataclassIdentifier: str | None = sourceDataclassIdentifier
124
+ identifierDataclass: str | None = sourceDataclassIdentifier
129
125
  """Target dataclass identifier."""
130
- dataclassInstance: str | None = sourceDataclassInstance
126
+ identifierDataclassInstance: str | None = sourceDataclassInstance
131
127
  """Target dataclass instance identifier."""
132
128
  logicalPathModuleDataclass: identifierDotAttribute | None = sourceLogicalPathModuleDataclass
133
129
  """Logical path to target dataclass module."""
134
130
 
135
- # Datatypes ------------------------------------------
131
+ # ------- Datatypes ------------------------------------------
136
132
  type DatatypeFoldsTotal = TheDatatypeFoldsTotal
137
133
  """Type alias for datatype linked to the magnitude of `foldsTotal`."""
138
134
  type DatatypeElephino = TheDatatypeElephino
@@ -205,11 +201,65 @@ class RecipeJobTheorem2:
205
201
  """
206
202
  pathFilenameFoldsTotal = PurePosixPath(getPathFilenameFoldsTotal(self.state.mapShape))
207
203
 
208
- if self.moduleIdentifier is None: # pyright: ignore[reportUnnecessaryComparison]
209
- self.moduleIdentifier = pathFilenameFoldsTotal.stem
210
-
211
204
  if self.pathFilenameFoldsTotal is None: # pyright: ignore[reportUnnecessaryComparison]
212
205
  self.pathFilenameFoldsTotal = pathFilenameFoldsTotal
213
206
 
214
- if self.shatteredDataclass is None and self.logicalPathModuleDataclass and self.dataclassIdentifier and self.dataclassInstance: # pyright: ignore[reportUnnecessaryComparison]
215
- self.shatteredDataclass = shatter_dataclassesDOTdataclass(self.logicalPathModuleDataclass, self.dataclassIdentifier, self.dataclassInstance)
207
+ if self.moduleIdentifier is None: # pyright: ignore[reportUnnecessaryComparison]
208
+ self.moduleIdentifier = self.pathFilenameFoldsTotal.stem
209
+
210
+ if self.shatteredDataclass is None and self.logicalPathModuleDataclass and self.identifierDataclass and self.identifierDataclassInstance: # pyright: ignore[reportUnnecessaryComparison]
211
+ self.shatteredDataclass = shatter_dataclassesDOTdataclass(self.logicalPathModuleDataclass, self.identifierDataclass, self.identifierDataclassInstance)
212
+
213
+ def moveShatteredDataclass_arg2body(identifier: str, job: RecipeJobTheorem2) -> ast.AnnAssign | ast.Assign:
214
+ """Embed a shattered dataclass field assignment into the function body.
215
+
216
+ (AI generated docstring)
217
+
218
+ This helper retrieves the pre-fabricated assignment for `identifier` from `job.shatteredDataclass`, hydrates the literal
219
+ payload from `job.state`, and returns the node ready for insertion into a generated function body. Scalar entries receive the
220
+ concrete integer value, array entries are encoded using the auto-decoding run-length encoded method from `hunterMakesPy`, and
221
+ other constructors are left untouched so downstream tooling can decide how to finalize them.
222
+
223
+ Parameters
224
+ ----------
225
+ identifier : str
226
+ Field name keyed in `job.shatteredDataclass.Z0Z_field2AnnAssign`.
227
+ job : RecipeJobTheorem2
228
+ Job descriptor that supplies the current computation state and shattered metadata.
229
+
230
+ Returns
231
+ -------
232
+ Ima___Assign : ast.AnnAssign | ast.Assign
233
+ Assignment node mutated with state-backed values for the requested field.
234
+ """
235
+ Ima___Assign, elementConstructor = job.shatteredDataclass.Z0Z_field2AnnAssign[identifier]
236
+ match elementConstructor:
237
+ case 'scalar':
238
+ cast(ast.Constant, cast(ast.Call, Ima___Assign.value).args[0]).value = int(eval(f"job.state.{identifier}")) # noqa: S307
239
+ case 'array':
240
+ dataAsStrRLE: str = autoDecodingRLE(eval(f"job.state.{identifier}"), assumeAddSpaces=True) # noqa: S307
241
+ dataAs_ast_expr: ast.expr = pythonCode2ast_expr(dataAsStrRLE)
242
+ cast(ast.Call, Ima___Assign.value).args = [dataAs_ast_expr]
243
+ case _:
244
+ pass
245
+ return Ima___Assign
246
+
247
+ # TODO Use this concept in general modules, not just custom jobs.
248
+ def customizeDatatypeViaImport(ingredientsFunction: IngredientsFunction, ingredientsModule: IngredientsModule, listDatatypeConfigurations: list[DatatypeConfiguration]) -> tuple[IngredientsFunction, IngredientsModule]:
249
+ """Customize data types in the given ingredients by adjusting imports.
250
+
251
+ In the ecosystem of "Ingredients", "Recipes", "DataBaskets," and "shattered dataclasses," a ton of code is dedicated to
252
+ preserving _abstract_ names for datatypes, such as `Array1DLeavesTotal` and `DatatypeFoldsTotal`. This function well
253
+ illustrates why I put so much effort into preserving the abstract names. (Normally, Python will _immediately_ replace an alias
254
+ name with the type for which it is a proxy.) Because transformed code, even if it has been through 10 transformations (see,
255
+ for example, `mapFolding.syntheticModules.A007822.asynchronousNumba` or its equivalent), ought to still have the abstract
256
+ names, this function gives you the power to change the datatype from numpy to numba and/or from 8-bits to 16-bits merely by
257
+ changing the import statements. You shouldn't need to change any "business" logic.
258
+
259
+ NOTE This will not remove potentially conflicting existing imports from other modules.
260
+ """
261
+ for datatypeConfig in listDatatypeConfigurations:
262
+ ingredientsFunction.imports.removeImportFrom(datatypeConfig.typeModule, None, datatypeConfig.datatypeIdentifier)
263
+ ingredientsFunction.imports.addImportFrom_asStr(datatypeConfig.typeModule, datatypeConfig.typeIdentifier, datatypeConfig.type_asname)
264
+
265
+ return ingredientsFunction, ingredientsModule
@@ -73,20 +73,16 @@ calculations through the strategic application of compiler optimization techniqu
73
73
  """
74
74
 
75
75
  from mapFolding.someAssemblyRequired.infoBooth import (
76
+ default as default,
77
+ Default as Default,
78
+ defaultA007822 as defaultA007822,
76
79
  dictionaryEstimatesMapFolding as dictionaryEstimatesMapFolding,
77
- identifierCallableSourceDEFAULT as identifierCallableSourceDEFAULT,
78
- identifierCallableSourceDispatcherDEFAULT as identifierCallableSourceDispatcherDEFAULT,
79
- identifierCountingDEFAULT as identifierCountingDEFAULT,
80
- identifierDataclassInstanceDEFAULT as identifierDataclassInstanceDEFAULT,
81
- identifierModuleDataPackingDEFAULT as identifierModuleDataPackingDEFAULT,
82
- identifierModuleSourceAlgorithmDEFAULT as identifierModuleSourceAlgorithmDEFAULT,
83
- logicalPathInfixAlgorithmDEFAULT as logicalPathInfixAlgorithmDEFAULT,
84
- logicalPathInfixDEFAULT as logicalPathInfixDEFAULT,
85
80
  )
86
81
 
87
82
  from mapFolding.someAssemblyRequired._toolIfThis import IfThis as IfThis
88
83
 
89
84
  from mapFolding.someAssemblyRequired._toolkitContainers import (
85
+ DatatypeConfiguration as DatatypeConfiguration,
90
86
  DeReConstructField2ast as DeReConstructField2ast,
91
87
  ShatteredDataclass as ShatteredDataclass,
92
88
  )