pyinto 0.0.1__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 (170) hide show
  1. pyinto-0.0.1/CHANGELOG.md +221 -0
  2. pyinto-0.0.1/LICENSE +21 -0
  3. pyinto-0.0.1/MANIFEST.in +2 -0
  4. pyinto-0.0.1/PKG-INFO +127 -0
  5. pyinto-0.0.1/README.md +100 -0
  6. pyinto-0.0.1/STATUS.md +158 -0
  7. pyinto-0.0.1/docs/GLOSSARY.md +83 -0
  8. pyinto-0.0.1/docs/TRANSLATION_STATUS.md +21 -0
  9. pyinto-0.0.1/docs/specification/INDEX.md +10 -0
  10. pyinto-0.0.1/docs/specification/composition.md +299 -0
  11. pyinto-0.0.1/docs/specification/construct.md +604 -0
  12. pyinto-0.0.1/docs/specification/conversion.md +23 -0
  13. pyinto-0.0.1/docs/specification/frontend.md +733 -0
  14. pyinto-0.0.1/docs/target_implementation/INDEX.md +9 -0
  15. pyinto-0.0.1/docs/target_implementation/admission-reference.md +75 -0
  16. pyinto-0.0.1/docs/target_implementation/construct-reference.md +89 -0
  17. pyinto-0.0.1/docs/target_implementation/declaration-reference.md +243 -0
  18. pyinto-0.0.1/docs/target_implementation/implementation-guide.md +148 -0
  19. pyinto-0.0.1/docs/target_implementation/verification-guide.md +43 -0
  20. pyinto-0.0.1/pyproject.toml +94 -0
  21. pyinto-0.0.1/setup.cfg +4 -0
  22. pyinto-0.0.1/src/pyinto/__init__.py +15 -0
  23. pyinto-0.0.1/src/pyinto/admission.py +154 -0
  24. pyinto-0.0.1/src/pyinto/analysis/__init__.py +5 -0
  25. pyinto-0.0.1/src/pyinto/analysis/closures.py +83 -0
  26. pyinto-0.0.1/src/pyinto/api.py +62 -0
  27. pyinto-0.0.1/src/pyinto/constructs/__init__.py +224 -0
  28. pyinto-0.0.1/src/pyinto/constructs/admission.py +592 -0
  29. pyinto-0.0.1/src/pyinto/constructs/base.py +101 -0
  30. pyinto-0.0.1/src/pyinto/constructs/classes.py +582 -0
  31. pyinto-0.0.1/src/pyinto/constructs/collections.py +366 -0
  32. pyinto-0.0.1/src/pyinto/constructs/control.py +500 -0
  33. pyinto-0.0.1/src/pyinto/constructs/formatting.py +65 -0
  34. pyinto-0.0.1/src/pyinto/constructs/functions.py +497 -0
  35. pyinto-0.0.1/src/pyinto/constructs/intrinsic.py +294 -0
  36. pyinto-0.0.1/src/pyinto/constructs/operations.py +593 -0
  37. pyinto-0.0.1/src/pyinto/constructs/type_rules.py +58 -0
  38. pyinto-0.0.1/src/pyinto/constructs/types.py +340 -0
  39. pyinto-0.0.1/src/pyinto/constructs/updates.py +58 -0
  40. pyinto-0.0.1/src/pyinto/constructs/values.py +148 -0
  41. pyinto-0.0.1/src/pyinto/frontend/__init__.py +5 -0
  42. pyinto-0.0.1/src/pyinto/frontend/annotations.py +154 -0
  43. pyinto-0.0.1/src/pyinto/frontend/classes.py +550 -0
  44. pyinto-0.0.1/src/pyinto/frontend/context.py +154 -0
  45. pyinto-0.0.1/src/pyinto/frontend/decorator_effects.py +86 -0
  46. pyinto-0.0.1/src/pyinto/frontend/decorators.py +195 -0
  47. pyinto-0.0.1/src/pyinto/frontend/docstrings.py +18 -0
  48. pyinto-0.0.1/src/pyinto/frontend/errors.py +15 -0
  49. pyinto-0.0.1/src/pyinto/frontend/expressions.py +708 -0
  50. pyinto-0.0.1/src/pyinto/frontend/functions.py +779 -0
  51. pyinto-0.0.1/src/pyinto/frontend/imports.py +99 -0
  52. pyinto-0.0.1/src/pyinto/frontend/interface_mapping.py +329 -0
  53. pyinto-0.0.1/src/pyinto/frontend/parser.py +252 -0
  54. pyinto-0.0.1/src/pyinto/frontend/statement_services.py +85 -0
  55. pyinto-0.0.1/src/pyinto/frontend/statements.py +748 -0
  56. pyinto-0.0.1/src/pyinto/interface_mapping/__init__.py +23 -0
  57. pyinto-0.0.1/src/pyinto/interface_mapping/declarations.py +189 -0
  58. pyinto-0.0.1/src/pyinto/interface_mapping/registry.py +299 -0
  59. pyinto-0.0.1/src/pyinto/interfaces/__init__.py +9 -0
  60. pyinto-0.0.1/src/pyinto/interfaces/builtins.py +43 -0
  61. pyinto-0.0.1/src/pyinto/interfaces/language.py +156 -0
  62. pyinto-0.0.1/src/pyinto/intrinsics.py +155 -0
  63. pyinto-0.0.1/src/pyinto/model/__init__.py +5 -0
  64. pyinto-0.0.1/src/pyinto/model/value_types.py +55 -0
  65. pyinto-0.0.1/src/pyinto/realizations/__init__.py +13 -0
  66. pyinto-0.0.1/src/pyinto/realizations/artifacts.py +39 -0
  67. pyinto-0.0.1/src/pyinto/realizations/call_layout.py +121 -0
  68. pyinto-0.0.1/src/pyinto/realizations/host.py +84 -0
  69. pyinto-0.0.1/src/pyinto/realizations/layout.py +124 -0
  70. pyinto-0.0.1/src/pyinto/realizations/registry.py +555 -0
  71. pyinto-0.0.1/src/pyinto/realizations/regulation.py +312 -0
  72. pyinto-0.0.1/src/pyinto.egg-info/PKG-INFO +127 -0
  73. pyinto-0.0.1/src/pyinto.egg-info/SOURCES.txt +168 -0
  74. pyinto-0.0.1/src/pyinto.egg-info/dependency_links.txt +1 -0
  75. pyinto-0.0.1/src/pyinto.egg-info/requires.txt +9 -0
  76. pyinto-0.0.1/src/pyinto.egg-info/top_level.txt +1 -0
  77. pyinto-0.0.1/tests/test_active_pack_control_admission_iteration21.py +291 -0
  78. pyinto-0.0.1/tests/test_admission_audit_iteration18.py +327 -0
  79. pyinto-0.0.1/tests/test_artifact_dispatch_iteration47.py +287 -0
  80. pyinto-0.0.1/tests/test_augmentation_comparison_chain_iteration25.py +245 -0
  81. pyinto-0.0.1/tests/test_binding_context.py +187 -0
  82. pyinto-0.0.1/tests/test_boolean_none_conditional_phase21.py +333 -0
  83. pyinto-0.0.1/tests/test_call_realization_iteration16.py +387 -0
  84. pyinto-0.0.1/tests/test_call_sequence_iteration19.py +98 -0
  85. pyinto-0.0.1/tests/test_callable_values_phase10.py +291 -0
  86. pyinto-0.0.1/tests/test_ci_release_iteration59.py +101 -0
  87. pyinto-0.0.1/tests/test_class_component_iteration13.py +116 -0
  88. pyinto-0.0.1/tests/test_class_composition_phase19.py +380 -0
  89. pyinto-0.0.1/tests/test_closure_contract_phase12.py +339 -0
  90. pyinto-0.0.1/tests/test_construct_admission_iteration20.py +208 -0
  91. pyinto-0.0.1/tests/test_construct_capability_audit_phase20.py +155 -0
  92. pyinto-0.0.1/tests/test_construct_contract_phase6.py +158 -0
  93. pyinto-0.0.1/tests/test_construct_pipeline.py +329 -0
  94. pyinto-0.0.1/tests/test_construct_realization_boundary.py +95 -0
  95. pyinto-0.0.1/tests/test_contract_trace.py +72 -0
  96. pyinto-0.0.1/tests/test_control_local_declarations_iteration35.py +216 -0
  97. pyinto-0.0.1/tests/test_conversion_api.py +73 -0
  98. pyinto-0.0.1/tests/test_decorator_normalizers_iteration8.py +156 -0
  99. pyinto-0.0.1/tests/test_default_arguments_phase26.py +300 -0
  100. pyinto-0.0.1/tests/test_desugaring_boundary_iteration22.py +106 -0
  101. pyinto-0.0.1/tests/test_development_python_realizer_boundary.py +49 -0
  102. pyinto-0.0.1/tests/test_distribution_audit_iteration36.py +44 -0
  103. pyinto-0.0.1/tests/test_exception_control_phase14.py +336 -0
  104. pyinto-0.0.1/tests/test_expression_component_iteration10.py +87 -0
  105. pyinto-0.0.1/tests/test_expression_model_phase7.py +182 -0
  106. pyinto-0.0.1/tests/test_expression_order_admission_iteration23.py +189 -0
  107. pyinto-0.0.1/tests/test_fixed_tuple_unpack_iteration31.py +186 -0
  108. pyinto-0.0.1/tests/test_fixed_tuples_phase13.py +326 -0
  109. pyinto-0.0.1/tests/test_for_realization_slots.py +162 -0
  110. pyinto-0.0.1/tests/test_formatting_print_iteration30.py +201 -0
  111. pyinto-0.0.1/tests/test_frontend_components_iteration9.py +72 -0
  112. pyinto-0.0.1/tests/test_frontend_module_boundaries.py +63 -0
  113. pyinto-0.0.1/tests/test_frontend_normalization_state_iteration7.py +167 -0
  114. pyinto-0.0.1/tests/test_function_component_iteration12.py +100 -0
  115. pyinto-0.0.1/tests/test_function_model_phase8.py +254 -0
  116. pyinto-0.0.1/tests/test_function_return_contract_iteration6.py +152 -0
  117. pyinto-0.0.1/tests/test_function_value_calls_phase11.py +376 -0
  118. pyinto-0.0.1/tests/test_global_augassign_iteration45.py +293 -0
  119. pyinto-0.0.1/tests/test_homogeneous_lists_phase15.py +342 -0
  120. pyinto-0.0.1/tests/test_implicit_for_binding_iteration34.py +190 -0
  121. pyinto-0.0.1/tests/test_interface_exports_stage1.py +70 -0
  122. pyinto-0.0.1/tests/test_interface_function_named_arguments_iteration39.py +236 -0
  123. pyinto-0.0.1/tests/test_interface_mapping_declarations_iteration41.py +285 -0
  124. pyinto-0.0.1/tests/test_interface_mapping_names_iteration36.py +33 -0
  125. pyinto-0.0.1/tests/test_interface_mapping_variadic_overloads_iteration40.py +302 -0
  126. pyinto-0.0.1/tests/test_intrinsic_operations_phase22.py +313 -0
  127. pyinto-0.0.1/tests/test_intrinsic_overloads_iteration28.py +256 -0
  128. pyinto-0.0.1/tests/test_intrinsic_registry_iteration27.py +353 -0
  129. pyinto-0.0.1/tests/test_iteration_admission_iteration17.py +139 -0
  130. pyinto-0.0.1/tests/test_keyword_arguments_phase25.py +204 -0
  131. pyinto-0.0.1/tests/test_lambda_values_phase30.py +246 -0
  132. pyinto-0.0.1/tests/test_language_bindings.py +283 -0
  133. pyinto-0.0.1/tests/test_lexical_scopes_phase9.py +347 -0
  134. pyinto-0.0.1/tests/test_loop_and_context.py +302 -0
  135. pyinto-0.0.1/tests/test_membership_iteration32.py +185 -0
  136. pyinto-0.0.1/tests/test_memory_port.py +244 -0
  137. pyinto-0.0.1/tests/test_model_independence_phase5.py +102 -0
  138. pyinto-0.0.1/tests/test_module_boundaries.py +96 -0
  139. pyinto-0.0.1/tests/test_module_import_interface_mapping_iteration38.py +295 -0
  140. pyinto-0.0.1/tests/test_naming_decorator_stage3.py +137 -0
  141. pyinto-0.0.1/tests/test_port_integration.py +130 -0
  142. pyinto-0.0.1/tests/test_projection_dispatch_iteration48.py +306 -0
  143. pyinto-0.0.1/tests/test_public_identity.py +86 -0
  144. pyinto-0.0.1/tests/test_published_documentation.py +303 -0
  145. pyinto-0.0.1/tests/test_realization_admission_iteration15.py +199 -0
  146. pyinto-0.0.1/tests/test_realization_boundary_audit_iteration14.py +121 -0
  147. pyinto-0.0.1/tests/test_realizes_decorator_stage2.py +216 -0
  148. pyinto-0.0.1/tests/test_recursive_type_spelling_iteration43.py +266 -0
  149. pyinto-0.0.1/tests/test_selective_decorators_phase27_29.py +395 -0
  150. pyinto-0.0.1/tests/test_self_defined_varargs_iteration46.py +279 -0
  151. pyinto-0.0.1/tests/test_single_inheritance_phase18.py +384 -0
  152. pyinto-0.0.1/tests/test_slice_iteration33.py +217 -0
  153. pyinto-0.0.1/tests/test_specification_baseline.py +172 -0
  154. pyinto-0.0.1/tests/test_standard_intrinsics_iteration29.py +248 -0
  155. pyinto-0.0.1/tests/test_statement_component_iteration11.py +98 -0
  156. pyinto-0.0.1/tests/test_static_classes_phase17.py +424 -0
  157. pyinto-0.0.1/tests/test_string_float_phase24.py +194 -0
  158. pyinto-0.0.1/tests/test_surface_structure_iteration24.py +150 -0
  159. pyinto-0.0.1/tests/test_symbol_value_type_iteration3.py +60 -0
  160. pyinto-0.0.1/tests/test_target_declaration_migration_stage4.py +73 -0
  161. pyinto-0.0.1/tests/test_target_documentation.py +78 -0
  162. pyinto-0.0.1/tests/test_target_package_boundary.py +73 -0
  163. pyinto-0.0.1/tests/test_type_representation_iteration4.py +87 -0
  164. pyinto-0.0.1/tests/test_type_slots_and_separators_iteration42.py +287 -0
  165. pyinto-0.0.1/tests/test_typed_aggregations_phase23.py +295 -0
  166. pyinto-0.0.1/tests/test_typed_dictionaries_phase16.py +389 -0
  167. pyinto-0.0.1/tests/test_typed_globals_iteration44.py +249 -0
  168. pyinto-0.0.1/tests/test_typed_integer_operators_iteration26.py +210 -0
  169. pyinto-0.0.1/tests/test_value_type_iteration5.py +113 -0
  170. pyinto-0.0.1/tests/test_variant_validation_iteration49.py +227 -0
@@ -0,0 +1,221 @@
1
+ # pyinto Changelog
2
+
3
+ Development changes for 0.0.1. This is not a formal release history.
4
+
5
+
6
+ ## 0.0.1 (Alpha, unpublished)
7
+
8
+ Initial development setup and Construct experiments after the design shift.
9
+
10
+ version: 0.0.1
11
+
12
+
13
+ Added:
14
+
15
+
16
+ - In Iteration 49, exposed finite Construct variant domains (`VARIANTS` / `variant_domain()`) in the Model and added registration-time rejection of invalid variant names and omitted `default` variants that do not exist. Structural projection now requires an explicit variant for multi-variant or open-domain Constructs. Added `variant @= '*'` to match any variant, exact-variant precedence, and duplicate rejection, while preserving Composition's Template/Slot chaining and Admission checks. Open variant domains such as `IntrinsicCall` remain unenumerated.
17
+ - In Iteration 48, added Target Pack declarations `pack_semantics` (`preservation`/`projection`) and `pack_unhandled` (`error`/`traverse`) to Shikumi and the Registry. A Structural projection Target can explicitly choose `traverse` for unregistered Realizers and continue visiting descendants. Projection does not require execution-semantic `supports` checks, but Admission registration still validates the entire Model. Preservation and Composition retain their strict defaults. Added regression coverage using a non-text Target that extracts only function names and return types.
18
+ - In Iteration 47, introduced Shikumi declarations selecting Composition or Structural Realizer dispatch per Target Pack and Target-owned Artifact Sessions. Preserved Composition's deferred Template/Slot chain; `TextArtifactSession` performs final string rendering on the Target side. Structural dispatch visits all Constructs in `Model.parts()` order, and `visit` callbacks modify Target-specific state. After dispatch, the Host calls `finish()` and receives an artifact of arbitrary type. Kept the Model, Frontend, and Admission unchanged and verified C, development-only Python, and new non-text Targets.
19
+ - In Iteration 46, added restricted support for typed `*args` in top-level user-defined functions. Variadic `TupleType`, `ParameterRole.VARIADIC`, `FunctionSignature.variadic_parameter`, and extra positional arguments in the existing `FunctionCall` preserve default/keyword binding for fixed parameters, source-order evaluation, and tuple typing. The body can access the variadic tuple with `len`, `sum`, and `for`; Target realization of variadic tuples is an explicit new Admission obligation. Reject dynamic argument unpacking, variadic function values, nested functions/methods with variadics, and `**kwargs`. No new C Realization was added; existing Interface Mapping behavior remains.
20
+ - In Iteration 41, added Shikumi parent/child declarations `@maps(function)` / `@signature(...)` and `factory @= ...`, and an `InterfaceMappingRegistry.from_declarations()` API that converts them to existing function Mappings. Reuses the existing routes for multiple signatures, named arguments, defaults, statically typed variadic positional arguments, and ambiguity rejection. Migrated the external Device example. Function objects are restricted to their defining module name; re-exports and class/method Mappings were not extended. Existing Frontend and Target realization contracts are unchanged.
21
+ - As the Iteration 40 external Interface function Mapping extension, added `InterfaceVariadicParameter` for static variadic positional arguments and explicit registration of multiple signatures under one function name. Argument expressions are normalized just once regardless of candidate count; only the uniquely matching signature's factory runs, selected by type, arity, names, and defaults. Explicitly reject duplicate registrations, no match, ambiguous matches, type mismatches, dynamic argument expansion, and side-effecting argument reorderings whose evaluation order cannot be preserved. The Model, Admission, Target realization rules, and the previously accepted single-signature cases are unchanged.
22
+ - Following Iteration 38, published `InterfaceParameter` to declare external Interface function Mapping parameters by name, value type, and trailing immutable literal default. Ordinary Python positional, keyword, and mixed calls normalize into Model arguments in declaration order. Reject unknown, duplicate, missing, type-incompatible, or unpacked arguments, and reorderings of side-effecting expressions that cannot preserve evaluation order. Retained the old positional-only Mapping acceptance, removal of `_force`, and existing Model/Target contracts.
23
+ - Extended absolute imports in the Python Source Adapter: `import module[.submodule] [as alias]` and `from package import submodule [as alias]` in the initial import section now resolve names statically against explicitly registered external APIs. Multi-level attribute function calls normalize to the same Interface Mapping. Module name collisions, unregistered names, and dynamic attribute paths are explicitly rejected. Model semantics, C Target Realizations, and the policy of never executing Python source are unchanged.
24
+ - In public-surface redesign step 3, added Shikumi `@naming` for declaring Target naming rules with a no-argument decorator marker. It uses the same `NAMING` information as `naming @= True` and retains class-level exclusion from `@realizes(element)` and legacy role descriptors, duplicate naming-rule rejection per Target, and the `requirement_line` Slot constraint. The C Target and development Python Realizer would migrate from legacy syntax in a later step; Model, Frontend, and Target conversion coverage did not change.
25
+ - In public-surface redesign step 2, added Shikumi `@realizes(element)`. Public Host Constructs, direct Builtin Call element `builtin.PrintCall`, and type `ValueKind` / `PortType` use the same keys in the existing Registry routes for Constructs, Calls, and type spellings. Kept `print` Call separate from `PrintValues`, and rejected old/new duplicate registrations, invalid targets, unsupported Contracts, and invalid Slots. Existing `handles`/`binds`/`spells`/`naming`, C/Python Target implementations, and Frontend acceptance remained unchanged. `@naming`, removal of legacy descriptors, and other public Call elements were deferred.
26
+ - In public-surface reorganization step 1, added `pyinto.interfaces.language` / `builtins` and `pyinto.model.value_types`. These re-export existing Construct classes and `ValueKind` enum with identity preserved, providing Target authors with entry points that do not expose internal file layout or string keys for types. The conversion API, Shikumi role descriptions, C Target, and the Model's semantic and acceptance/rejection contracts remain unchanged. `@realizes(element)` and `@naming` were deferred pending target-identity auditing.
27
+ - In Model expressiveness expansion step 12 (Iteration 35), enabled statically normalized, explicitly typed new variable declarations inside `if/else`, `while/else`, `for/else`, and `with` bodies, using existing `Initialize` / `Block` (FRT_071). References are allowed only after declaration in the same or nested body, and rejected after the body, in other clauses, or before declaration.
28
+ - In Model expressiveness expansion step 11 (Iteration 34), enabled `for` to introduce one implicit variable when the element type is known (CST_073 / FRT_070). Separated an introduction flag on `IterationEntry` from the prerequisite `iteration.binding.introduced` Admission contract and avoided artificial initialization on empty iteration. Existing iteration over previously declared variables remains valid; references from outside the loop or its `else` clause are not accepted.
29
+ - In Model expressiveness expansion step 10 (Iteration 33), added `SliceValue` for typed lists and strings (CST_072 / FRT_069). It preserves omitted bounds, negative steps, index clipping, and the runtime error for a zero step. Shallow list copying and Unicode string selection are independently registered as semantic obligations for Admission.
30
+ - In Model expressiveness expansion step 9 (Iteration 32), normalized `in` / `not in` for typed list elements and dictionary keys into an independent Membership Construct (CST_071 / FRT_068). Registered evaluation order, kind-specific lookup, and result negation with Construct-provider AdmissionRules.
31
+ - In Model expressiveness expansion step 8 (Iteration 31), added fixed-length tuple unpacking assignment `UnpackAssign` into previously declared names (CST_070 / FRT_067). Registered independent contracts for exactly-once evaluation of the RHS as a whole and left-to-right updates of assignment targets; unsupported Realizations must reject it.
32
+ - In Model expressiveness expansion step 7 (Iteration 30), added `FormattedString`, which preserves ordered pieces of f-strings without formatting specifications, and `PrintValues`, which emits zero or multiple values together (CST_069 / FRT_066). Reused existing typed `str` conversion `IntrinsicDefinition` and separated stringification and output contracts.
33
+ - In Model expressiveness expansion step 6 (Iteration 29), extended the standard Intrinsic provider table with 15 signatures for zero-argument `str`/`int`/`float` and one-argument typed conversions among `int`/`float`/`str`/`bool`, plus Unicode `str.upper`/`str.lower` operations (CST_068 / FRT_065). Added per-signature semantic contracts and acceptance/rejection regression tests.
34
+ - In Model expressiveness expansion step 5 (Iteration 28), made `IntrinsicRegistry` support multiple static signatures under the same operation key and added signature-local `IntrinsicTypeVar` / `IntrinsicListType` (CST_067 / FRT_064). Added unique static candidate selection; rejection of duplicate, ambiguous, type-incompatible, and unbound-type-variable cases; expression statements for methods returning `None`; and signature-specific contract and Admission regression tests.
35
+ - In Model expressiveness expansion step 4 (Iteration 27), introduced provider-defined `IntrinsicDefinition` / `IntrinsicRegistry` with static signatures and semantic contracts, and `IntrinsicCall` preserving call evaluation order (CST_066 / FRT_063). Verified positive and negative type/arity cases, duplicate provider keys, precedence for existing declarations on name collision, call contracts, and Slots.
36
+ - In Model expressiveness expansion step 3 (Iteration 26), introduced `IntegerTrueDivision` for true division of integers producing a float, plus five bitwise binary operations on integers, unary `~`, and augmented bitwise assignment in the Model and Frontend (CST_065 / FRT_062). Added positive and negative tests covering negative numbers, negative shift counts, arbitrary precision, and type mismatches.
37
+ - In Model expressiveness expansion step 2 (Iteration 25), added `AugAssign` for rebinding previously declared `int`/`float` names and typed instance fields, and `ComparisonChain` for three-or-more-part comparisons among same-typed `int`/`float`/`str` operands (CST_063–064 / FRT_060–061). Added negative tests for input types/operators and regression tests for binary comparison and ordinary assignment.
38
+ - In Model expressiveness expansion step 1 (Iteration 24), added the no-op `Pass` and static docstring metadata for `Program`, `FunctionDefinition`, and `ClassDefinition` (CST_062 / FRT_059). Updated the package Admission registry and independent audit ledger, and added positive and negative Model/Frontend tests.
39
+ - In post-Phase-30 foundation refinement step 23, derived existing evaluation-order contracts for typed binary expressions, Port Calls, and `FunctionValueCall` from Construct-side `AdmissionRule` and rejected Realizations lacking the appropriate declaration before rendering (CMP_020). Conservatively detected missing, duplicate, or reordered Value Slots in simple Templates.
40
+ - In post-Phase-30 foundation refinement step 22, revisited Frontend normalization and Model/Realization boundaries for keyword arguments, defaults, dataclasses, lambdas, signed constants, and future typed primitive operations in the canonical audit. Recorded the Model semantics versus Target realization distinction, unchanged contracts, and decisions deferred to future specifications.
41
+ - Added regression tests for equivalence between dataclass and explicitly typed `__init__` Models, declaration-order binding and source-order evaluation, omitted defaults versus explicit arguments, collision avoidance for lambda internal names, and rejection of unsupported general decorators and mutable defaults. Existing semantic contracts, Target Packs, and `AdmissionRule` remain unchanged; the evaluation-order and Slot issues from step 23 remain pending.
42
+ - In post-Phase-30 foundation refinement step 21, registered independent Construct-provider AdmissionRules for `For` with `break`/`continue` and normally completed `else`, and for `With` entry/exit including exceptional exit. Matched them to `supports` declared by standard C/Python Packs (CMP_019).
43
+ - In post-Phase-30 foundation refinement step 20, introduced explicit Construct-provider `AdmissionDeclaration` / `AdmissionRegistry`. Distinguished contracts of the 67 concrete core Constructs from those of external Port providers and rejected unregistered Models before composition (CMP_018). Moved admission rules out of bindings to the neutral provider side and removed Target Pack self-registration of contracts.
44
+ - In post-Phase-30 foundation refinement step 19, corrected evaluation-order contracts for five bound direct-call forms. Even positional calls in parameter order require `call.arguments.left_to_right` with at least two explicit arguments; rebinding that reorders them additionally requires `call.arguments.reordered` (CMP_017). Omitted defaults do not count as evaluated argument expressions.
45
+ - In post-Phase-30 foundation refinement step 18, added tests mechanically linking the Model semantic-information audit to Realization admission rules. They detect missing classifications for new guard fields or non-field obligations, and missing rule registrations. Prototype forms of `IntrinsicCall`, `AugAssign`, and comparison chains tested extensions to open operation names and evaluation contracts (CMP_016).
46
+ - In post-Phase-30 foundation refinement step 17, the Frontend checks the iteration-source type for `for` and element-type compatibility with previously declared targets. Fixed erroneous acceptance of non-iterables such as `int`, element mismatches, and dictionary iteration (FRT_003). Added checks for `supports` according to the iteration form for `IterationEntry` and `For` (CMP_015).
47
+ - In post-Phase-30 foundation refinement step 16, added positive and negative tests for composite contracts across five direct-call forms. Rejected missing, duplicated, or evaluation-order-altering actual-argument Slots in simple string Templates before composition (CMP_014). Verified generated output of static Templates/TemplatePlans preserving source order and omitted arguments and confirmed side-effect order by executing generated Python Target code.
48
+ - In post-Phase-30 foundation refinement step 15, introduced Target Pack `supports` declarations and contract matching after Realization selection. Mechanically extracted from Model instances obligations for function/constructor/method argument binding, nontrivial evaluation order, omitted arguments, `VIRTUAL`/`SUPER`, and class Receiver identity, rejecting undeclared obligations before rendering or requirements collection (CMP_013). Standard Target Packs without bindings for the new subjects retained their previous acceptance scope.
49
+ - In post-Phase-30 foundation refinement step 14, classified the declared fields of all 67 Construct classes in the canonical audit ledger and added a test that finds newly added classes or fields omitted from that ledger. Enabled generating `devdocs/canonical_documents/REALIZATION_BOUNDARY_AUDIT.md` from Python canonical sources and recorded unprotected contracts and test scenarios for evaluation order, argument omission, `super`, iteration forms, short-circuiting, and other behaviors.
50
+ - Added five tests for independent class-type reservation, shared Context among class/function/expression/statement components, `super` method calls, single application of dataclass behavior, and parse-state isolation after failure. Updated Contrace's implementation traversal to the new structure.
51
+ - Added five regression tests for argument evaluation order in the standalone function component, nested functions/lambdas, fresh state across parses, and scope restoration on failure.
52
+ - Added regression tests for sharing parse Context with an independent statement normalizer, function bodies containing exceptions, restoring control-flow state on failure, and recreating services between parses.
53
+ - Added regression tests for independent expression normalization, agreement between per-parse Context and Port normalizers, expressions involving function values and lambdas, and lack of shared state after re-parsing or failure.
54
+ - Added regression tests for the independent `PortNormalizer`, import resolution, decorator/Port alias collisions, and lack of shared state after failed parsing with a reused Frontend.
55
+ - Added regression tests for normalizing registered external decorators into static methods, class structure, and typed function Models, and rejection of unknown handlers, signature mismatches, and repeated applications. Target Realizations and existing Model contracts are unchanged.
56
+ - Added regression tests counting identifier generation in nested field/method/assignment paths with lambda actual arguments, and checking nested scopes and failure recovery. Model semantic contracts and Target Realization acceptance remain unchanged.
57
+ - Added regression tests for return-type mismatches during direct Model construction, `None`/`Any`/`object`, nominal inheritance, Returns inside control statements, ownership boundaries for nested functions, and Frontend diagnostics. Existing decorator and Realization semantics are unchanged.
58
+ - Added regression tests for value-type projection, direction of nominal inheritance, type coherence of direct/indirect calls, and Frontend acceptance. Existing Realization, decorator, and scope semantics are unchanged.
59
+ - Added `pyproject.toml`, the MIT License, author `minoru-jp`, and a `src` layout.
60
+ - Created Japanese canonical sources and generated documents for README, STATUS, and CHANGELOG.
61
+ - Integrated `shikumi-devdoc` document generation with `shikumi-contrace` contract/test associations.
62
+ - Prototyped four Construct slots, a Python AST Frontend, and C source generation.
63
+ - Added pytest tests compiling and executing generated C.
64
+ - Added tests for replacing Bindings, validation errors, missing registrations, and duplicate registrations.
65
+ - Added an independent Python Target Pack, checks for Slot names, roles, and duplicate definitions, and execution tests across languages.
66
+ - Added an exploratory external, Python-executable Port (`demo_ports`) and a separate adapter mapping it to Target-language Domain Constructs.
67
+ - Added explicit fully qualified name registration and duplicate checks in `PortRegistry`, Python-only handling of the `_force` constant, and explicit rejection of unknown dependencies.
68
+ - Added an external `DeviceIsReady` Construct/C Target Pack with a `device.h` requirement, plus GCC/Clang compilation, linking, and execution tests of the separate C implementation.
69
+ - Added `shikumi-contrace` contracts for Ports and tests confirming deliberately different Python and C behaviors.
70
+ - Added external instance Port declarations via `PortClassDefinition`, with constructor variants, explicitly registered methods/properties, and strict acceptance and rejection.
71
+ - Added `ConstructStart` and `ExplicitCleanup` Constructs. Normal realization did not place Cleanup automatically; a registered explicit `release` call could request Cleanup for the original Construct.
72
+ - Added separate `demo_memory_ports` and `demo_memory_ports_henkan` packages; tested Python execution of `ManualMemoryRegion.integer(minimum=..., maximum=...)` and C dynamic allocation, assignment, reading, and explicit freeing.
73
+ - Added compact/wide Target Pack storage type selection by constraints, C compilation/execution, rejection of out-of-range/unregistered/aliased cases, and Port contract integration tests.
74
+ - Implemented a shared Composer, final Renderer, and Shikumi rules for a single template and selection callback.
75
+ - Implemented propagation of type spellings based on aliased Port-reference type declarations and value-range contracts.
76
+ - Added the `While` Construct containing a condition Value, body Block, and normal-completion Block.
77
+ - Added C/Python `while` Target Bindings and verified recursive composition and execution using the existing Composer.
78
+ - Added Target-independent `Break`/`Continue` Constructs usable with `while ... else`.
79
+ - Structured `For`/`IterationEntry`/`Range` and `With`/`ContextEntry`, with supported C/Python Bindings and verification tests.
80
+ - C's `range`-based `for` Binding now evaluates arguments once, uses an independent iteration variable, and suppresses `else` after interruption.
81
+ - Added `root`, `current`, `parent`, `ancestors`, and `path` structure references to `EmitContext` used for Binding selection. The original Construct must not be modified.
82
+ - Added generation of `GLOSSARY.md` from shikumi-devdoc Vocabulary canonical sources, covering Model, Construct, Interface, Realization, Template, Slot, and related terms.
83
+ - Established an initial SDD baseline by authoring Construct, Frontend, and Composition specifications via shikumi-devdoc Specification, plus an INDEX and render/synchronization checks.
84
+ - Added reinforcing tests for current specification IDs, retaining the policy not to prematurely rename Realization components or add new Interface features.
85
+ - Added specifications CST_007/008 and CMP_008 and Model/Realization boundary regression tests.
86
+ - Added Conversion API clauses CVT_001–003, Composition clause CMP_009, and tests for source conversion, Target replacement, and explicit Port designation.
87
+ - Added specifications CST_009 and CMP_010, plus tests for Model immutability, multiple range forms, and rejection of incorrectly used Slots.
88
+ - Added specifications CST_010–012 and CMP_011 and tests for standalone Model use, reuse across Targets, and boundaries of output Slots.
89
+ - Added specifications CST_013–014 and CMP_012, static and example-based checks of dynamic With entries, construction-time rejection, and external Construct compatibility checks.
90
+ - In SDD Phase 7, introduced Target-independent Models for `Arithmetic`, `IntegerUnary`, `BooleanOperation`, and `BooleanNot`, plus Python Frontend expression normalization.
91
+ - Added specifications CST_015–016 and FRT_007–008 and tests checking types, structures, evaluation order, and rejection when Target Realizations are unavailable.
92
+ - In SDD Phase 8, added `FunctionSignature`, `Parameter`, `FunctionDefinition`, `FunctionCall`, and `Return` to the Model; the Python Frontend can normalize typed functions, explicit returns, and local scopes.
93
+ - Specified CST_017–018 and FRT_009–010, with tests for recursion, forward references, type mismatches, isolated scopes, and rejection of unsupported Realizations.
94
+ - In SDD Phase 9, extended Python Frontend lexical resolution to directly nested functions at arbitrary depth; `FunctionSignature.scope` and `Symbol.scope` distinguish declarations with identical names.
95
+ - Added CST_019 and FRT_011–012 and tests for outer-variable references, same-level recursion, forward references, name shadowing, and rejection of unsupported syntax. No new Construct classes or Realizations were added.
96
+ - In SDD Phase 10, introduced recursive `ValueType` / `CallableType` and `ValueKind.FUNCTION`, associating each function declaration's value reference with `FunctionSignature.value_symbol`.
97
+ - Added CST_020–021 and FRT_013–014 and tests for typed function-value references, passing and returning function values, type mismatches, and indirect-call rejection. Existing `with` semantics and Realizations were unchanged.
98
+ - In SDD Phase 11, added `FunctionValueCall` and support in the Model/Frontend for indirect positional calls through function-typed variables, arguments, and expressions returning a Callable. Direct `FunctionCall` contracts were unchanged.
99
+ - Added CST_022 and FRT_015–016 and tests for function-value evaluation order, type consistency, multi-stage indirect calls, static closure capture paths, and rejection when Realizations are unsupported.
100
+ - In SDD Phase 12, introduced read-only, Target-independent `henkan.analysis.lexical_captures()`. It derives each function's direct captures in first-occurrence order from existing declaration scopes and References/FunctionCalls; no dedicated Closure Construct was introduced.
101
+ - Specified in CST_023–024 and FRT_017 the responsibility split between static captures and per-call runtime environments. Added regression tests for deep nesting, sibling-function references, function-value passing, repeated factory calls, self-recursion, and rejection of unsupported syntax.
102
+ - In SDD Phase 13, added recursive fixed-length `TupleType` and `TupleValue` / `TupleElement`, allowing `tuple[...]` annotations, literals, nesting, and static nonnegative positional access in the Model/Frontend. Combinations with parameters, return values, and Callable types are also checked by type shape.
103
+ - Added CST_025–026 and FRT_018–019 and tests covering element order, recursive types, bounds, invalid types, and unsupported Target Realizations. Existing `with` semantics were unchanged.
104
+ - In SDD Phase 14, added `Raise`, `ExceptHandler`, and `Try`. Introduced static raising and type-specific catching of `ValueError`, `TypeError`, and `RuntimeError`, along with `try`/`except`/`else`/`finally` structure, to the Model/Frontend. Defined string-type requirements for raised messages and explicit rejection of unsupported exception forms.
105
+ - Added CST_027–029 and FRT_020–021 and tests for exception clause ordering, normal completion, control transfers, `finally` precedence, non-mutation of the source Model, and rejection of unsupported Realizations. Existing `with` semantics and implementation were unchanged.
106
+ - In SDD Phase 15, added recursive `ListType` / `ValueKind.LIST` and `ListValue`, `ListElement`, and `ListElementAssign`, bringing typed homogeneous mutable lists, dynamic integer-index reads, and type-checked element updates to the Model/Frontend.
107
+ - Added CST_030–031 and FRT_022–023 and tests for empty/nested lists, combinations with functions, Callables and tuples, aliasing, captured references, type mismatches, and rejection of unsupported Realizations. Existing `with`, tuple, and exception semantics were unchanged.
108
+ - In SDD Phase 16, added `DictType` / `ValueKind.DICT` and `DictEntry`, `DictValue`, `DictElement`, and `DictElementAssign`. Typed mutable `dict[int, V]` and `dict[str, V]` Models preserve ordered key/value expressions, reference sharing, replacement of existing keys, insertion of new keys, and failure on missing-key access.
109
+ - Added CST_032–033 and FRT_024–025 and tests for recursive dictionary/list/tuple/Callable types, contextual typing of empty dictionaries, functions, closures, aliases, and explicit rejection of unsupported syntax or absent Realizations. Existing `with`, tuple, list, and exception semantics were unchanged.
110
+ - In SDD Phase 17, added `InstanceType` / `ValueKind.INSTANCE`, `ClassSignature` / `ClassDefinition`, `FieldDefinition` / `FieldInitialize` / `FieldRead` / `FieldWrite`, and `InstanceCreation` / `MethodCall`. Reused `FunctionDefinition` for class methods and marked receivers explicitly with `ParameterRole.RECEIVER`, not merely by name or position.
111
+ - Specified CST_034–036 and FRT_026–028. Added tests for statically declared/initialized fields, nominal typing, aliased attribute access, explicit receiver and module namespace separation, rejection of unsupported dynamic mechanisms, and absent Realizations. Existing `with` and other semantics were unchanged.
112
+ - In SDD Phase 18, represented static single inheritance with `InstanceType.base`, `ClassSignature.base`, and hierarchical declaration references. Added virtual dispatch for ordinary method calls, lexical immediate-parent lookup for `super()`, derived-to-base compatibility, and invariants for parent initialization and overriding signatures.
113
+ - Added CST_037–039 and FRT_029–031 with tests for multi-level inheritance, virtual calls through base types, `super` calls on the same receiver, and rejection of type mismatches or non-static inheritance. No new class Realizations were supplied; existing `with` semantics remain unchanged.
114
+ - In SDD Phase 19, added verification of combinations of statically inherited classes with functions, first-class function values, tuples, lists, dictionaries, and closures. Typed element references and function return values can act as method receivers; calls through Callable-typed instance fields normalize to existing `FieldRead` / `FunctionValueCall`.
115
+ - Added CST_040–041 and FRT_032–034 with 30 composition, boundary, and unsupported-Realization regression cases. No new Constructs or Target Realizations were added; existing `with` and other semantics were unchanged.
116
+ - In SDD Phase 20, audited capabilities of the Model, Frontend, and Realization and the boundaries of unadopted syntax. Recorded priority candidates such as Boolean constants, general None values, and conditional expressions, and the next specification-review steps, in `devdocs/reviews/phase20_construct_capability_audit_ja.md`.
117
+ - Added 37 independent tests observing accepted and rejected cases from Phase 19. Existing Construct semantics, Frontend, Target Realizations, and normative shikumi-devdoc CST/FRT specifications were unchanged.
118
+ - In SDD Phase 22, added `Length`, `Absolute`, and `Extremum` to the Model/Frontend. Normalized built-in `len` for strings, tuples, lists, and dictionaries; `abs` and `min`/`max` with at least two arguments are restricted to integers.
119
+ - Added CST_045–047 and FRT_039–041 and checks for types, expression evaluation order, name-resolution boundaries, and unsupported Realizations. Existing Range/Call/With, function, and collection semantics were unchanged; replaced older Phase-20 rejection tests with cases still unsupported under the new specification.
120
+ - In SDD Phase 21, added strict Boolean constants as `BooleanLiteral`, general expression-level `NoneLiteral`, and typed `ConditionalExpression` to the Model/Frontend. Did not introduce Python truthiness or implicit Optional/Union; preserved child expression structure, type checking, and the contract not to evaluate the unchosen branch.
121
+ - Added CST_042–044 and FRT_035–038 and tests for accepted and invalid types, combinations with functions/compound types, and explicit rejection of unsupported Realizations. Updated expectations in older unsupported-case diagnostics to current type mismatches without changing existing Literal, Return, or `with` contracts.
122
+ - In SDD Phase 23, added `IntegerSum` and `BooleanAggregate` to the Constructs/Frontend. `sum` is restricted to integer lists/tuples/ranges with an optional integer start; `any`/`all` accept Boolean lists/tuples and define short-circuit behavior and results on empty containers.
123
+ - Added CST_048–049 and FRT_042–044 with regression cases for evaluation order, empty containers, explicit types, name resolution, and missing Realizations. Updated an old unsupported-`sum` test and the old FRT_041 unadopted list for the new specification, preserving `with` and existing expression semantics.
124
+ - In SDD Phase 24, added an independent floating-point value kind (`ValueKind.FLOAT` / `FloatingLiteral`), floating-point addition/subtraction/multiplication/division, signs and comparisons, and Unicode string concatenation, repetition, comparison, substring membership, and indexing to the Model/Frontend.
125
+ - Added CST_050–055 and FRT_045–047 with 49 new verification cases. Preserved existing integer/string Literal and integer-operation behavior, `with`, numeric Interfaces, and Realization semantics; Target Realizations for the new cases remain unimplemented.
126
+ - In SDD Phase 25, accepted static keyword actual arguments for direct `FunctionCall`, `InstanceCreation`, and ordinary/`super` `MethodCall`. Stores arguments in parameter order separately from source `evaluation_order`, exposing evaluation-order contracts for side-effecting expressions to Realizations.
127
+ - Added CST_056 and FRT_048–049 and regression tests for named-argument binding, type matching, mixing positional/keyword arguments, rejection of duplicate/missing/unpacked arguments, existing indirect-call limits, and unsupported Realizations. Existing `with` and other semantics were unchanged.
128
+ - In SDD Phase 26, added immutable scalar literal defaults to trailing typed parameters in `FunctionSignature` / `Parameter` and implemented static completion of omitted actual arguments for direct `FunctionCall`, `InstanceCreation`, and ordinary/`super` `MethodCall`.
129
+ - Added CST_057 and FRT_050–051 and regression cases for explicit-argument evaluation order, distinguishing omitted positions, `NoneLiteral`, type errors, rejection of mutable defaults, unsupported indirect calls through function values, and existing structures. Did not add general Python default expressions or Target Realizations.
130
+ - In SDD Phase 30, introduced `LambdaValue`. Typed lambda parameters and return values in an explicit Callable context, reusing `FunctionDefinition` and static lexical reference/capture structures.
131
+ - Added CST_061 and FRT_056–057, and tests for typed lambdas, nesting, combinations with function parameters/return values and collections, rejection of insufficient type context and unadopted syntax, and missing Realizations. Existing `with`, class, and other semantics were unchanged.
132
+ - In SDD Phases 27–29, accepted built-in `@staticmethod` / `@classmethod` and explicitly imported `@dataclass` as separate restricted features. Added `MethodKind` distinct from ordinary methods, `CLASS_RECEIVER`, `ClassMethodCall`, and `ClassReceiverCreation`, plus synthesis of dataclass initialization into existing class structures.
133
+ - Added CST_058–060 and FRT_052–055 and regression cases for acceptance/rejection, inheritance, argument evaluation order, and defaults. Did not add general decorators, descriptors, general dataclass code generation, or Target Realizations; existing `with` and other contracts remained unchanged.
134
+ - Reorganized the Frontend as a package, separating explicit type-annotation normalization, registration of decorator names and import-alias resolution, and common diagnostics. Added FRT_058 and internal-boundary tests. Unknown or unimplemented effects are rejected without evaluation or inference; existing Model/Realization semantics are unchanged.
135
+ - Declared cross-domain internal operation signatures in `FrontendOperations` and consolidated mutable declaration, class, and control-flow state in `ParseContext`, initialized independently for each parse. Added tests for reparsing, isolation after failure, and module boundaries.
136
+ - Added tests for `Symbol` value-type identity, separation of Port types, and receiver constraints. No backward-compatibility layer was provided for the old `Symbol` constructor; refinements to Realization contract selection and argument evaluation order were deferred.
137
+
138
+ Changed:
139
+
140
+
141
+ - In Iteration 50, moved the validation C Target from the planned independent `targets/c` distribution to `tests/support/c_realizer`, alongside the Python Realizer as non-distributed Host reference implementations. Migrated C-dependent tests, Contrace, examples, and development settings; prohibited reverse Host-to-C imports and audited that the C Realizer depends only on public Host APIs. Preserved C Composition, Admission, generation, and rejection behavior and consolidated wheel distribution into the Host alone. Earlier experiments with an independent C wheel remain part of the history.
142
+ - In Iteration 45, extended Iteration 44's explicit `global` writes to existing typed module variables to `AugAssign` for `int`/`float`. Preserved original module `Symbol` identity and contracts for evaluating the target once, reading before the RHS, and rebinding. Included `AugAssign` in function-local name precollection, fixing the mistaken interpretation of `counter += 1` without `global` as a module write. The Model, Admission, and Targets were unchanged; unsupported Realizations still reject.
143
+ - In Iteration 44, the Python Source Adapter began accepting limited references and simple reassignment of typed module variables through an initial `global` statement. It requires typed module declarations preceding the function and maps them to existing `Assign` while preserving the original `Symbol.scope` and identity. Rejects later/unknown/Port names, collisions, non-initial or control-body declarations, nested functions/methods, `nonlocal`, augmented assignments, and `for` targets. No Model/Target Constructs or Realizations changed; preserving shared-state semantics remains the Target's responsibility.
144
+ - In Iteration 43, standardized dynamic type-spelling Selectors to two arguments `(shape, spell)`. `spell` recursively invokes registered type spellings of the same Target and explicitly rejects unregistered inner types, invalid results, or cycles. Migrated Port-type Selectors and the memory-Port example while retaining fixed type names, Target separation, and Model type semantics.
145
+ - In Iteration 42, passed the complete `ValueType`/`PortType` shapes held by the Model to Realization type-spelling Selectors. Added a `return_type` Slot to `FunctionDefinition` and unified its type-rendering route with `Parameter`, `Initialize`, and `FieldDefinition`. For tuple-type Slots, added per-Slot separator specification through `separators @=`, retaining default newline layout, explicit rejection of unknown types and inline multiline results, and existing Target output. Model type semantics and Frontend acceptance did not change.
146
+ - In public-surface redesign step 5, standardized Target declarations on `@realizes(element)` and `@naming`. Removed legacy `handles`/`binds`/`spells` information types, assignment descriptors, and Registry branches, and compatibility for `naming @= True`. Updated tests, demos, and current canonical specifications while preserving ordinary conversion, contract checking, and explicit rejection. Generic public elements for external direct Calls were not implemented.
147
+ - In public-surface redesign step 4, migrated every declaration in the independent C Target and private development Python Realizer to `@realizes(element)` / `@naming`. Compared registration results and generation/rejection behavior before and after migration for 17+24 Construct registrations, direct `print` Call, three primitive C types, variants, and naming rules. Legacy Host compatibility for `handles`/`binds`/`spells`/`naming @= True`, semantic contracts, and Frontend acceptance remained.
148
+ - In Iteration 36 migration step 8, re-audited the public/distribution boundary between Host and C Target. Excluded development-only Contrace contract modules inadvertently bundled in the Host wheel while retaining source-side development tests. Added regressions for distribution names, dependency versions, and explicit Realization selection. Installed the two independent wheels in separate environments and tested C generation, compilation/execution, and unsupported-Construct rejection. Model semantics and Frontend acceptance stayed the same.
149
+ - In Iteration 36 migration step 7, revised README, GLOSSARY, STATUS, and current specification terminology to match the implemented structure. Clarified ownership among Model/Interface/Construct, the Host/Target Implementation split, and Python Interface Mapping versus Model type information. Historical changelog and audit terminology was kept; implementation, semantics, and acceptance/rejection did not change.
150
+ - In Iteration 36 migration step 6, moved former Python Target rules from `src/pyinto/targets/python/` to `tests/support/python_realizer/` as a private development Realizer. Updated tests and Contrace and excluded it from the Host wheel. Surface APIs, language semantics, and realization coverage were unchanged; no new guarantee of type preservation or perfect Python round-tripping was made.
151
+ - In Iteration 36 migration step 5, moved the C Language Implementation to `targets/c/src/pyinto_target_c/` in the same repository to clarify its distribution dependency boundary with the Host. Removed the C Target re-export from `pyinto.realizations.c` and switched to explicitly supplying `pyinto_target_c.c_bindings()`. Added independent C distribution settings and dependency-direction tests, preserving C generation, rejection contracts, and Model normalization. Separate-repository migration and development Python Realizer cleanup were deferred.
152
+ - In Iteration 36 migration step 4c, renamed external Python API mapping to `pyinto.interface_mapping`, `InterfaceMappingRegistry`, and related names. `convert()` / `PythonFrontend` now use the `interface_mappings=` argument. Preserved modeling, Admission, and rejection for registered functions/classes/methods/attributes. Type-related `PortType`, `ValueKind.PORT_OBJECT`, and `port:` keys were deferred, retaining names specific to external sample libraries.
153
+ - In Iteration 36 migration step 4b, renamed realization-rule registration to `RealizationRegistry` and moved `pyinto.bindings/` to `pyinto.realizations/`. Placed Template/Slot/Layout/Renderer under `realizations.layout`, standardized the public conversion argument to `realizations=`, and context references to `registry`. Retained Target factory names such as `c_bindings()` and Shikumi's `binds` because they serve different purposes, preserving success/rejection paths and semantic contracts.
154
+ - In Iteration 36 migration step 4a, renamed the standard language-structure contract ledger from `CORE_ADMISSION` to `LANGUAGE_ADMISSION` and its listed names to `LANGUAGE_CONSTRUCT_NAMES`. Renamed `AdmissionRegistry.require_core()` to `require_baseline()` to avoid restricting the operation to a particular Interface. Default registrations, extension policy, rejection of removals/replacements, and unknown-Construct rejection stayed unchanged.
155
+ - In Iteration 36 migration step 3, renamed distribution/import namespaces and sample/test Adapter packages from `henkan` to `pyinto`. Retained old `BindingRegistry`, `PortRegistry`, `CORE_ADMISSION`, and Target Pack internal APIs, and unchanged semantic and acceptance/rejection contracts.
156
+ - Continue to reject Port rebinding or declarations inside control bodies, newly bound names directly under `try`/`except`/`finally`, and lambda captures of new control-local or implicit `for` variables. Retain function/module ownership of Symbols and existing Realizations. Conclude Model expressiveness expansion for now and prioritize Python Pack realization/semantic-preservation verification in the next stage.
157
+ - Reject mixed/empty tuples with ambiguous types, implicit type determination for unknown Iterables, and introduction of reserved names. Do not add corresponding Realizations to standard Python/C Packs; existing iteration and control-flow contracts remain unchanged.
158
+ - Preserve single-index access. Reject dictionary/tuple slices, mismatched types, and undeclared names. Add Model positive/negative tests and contract audits, but no standard Target Pack recipes.
159
+ - Preserve the old `StringContains` for string membership, rejecting searches of incompatible types, non-collections, or membership inside comparison chains. Add Model-only positive and negative tests, not new Target Pack recipes.
160
+ - Verify rejection of mismatched tuple positional types/lengths and undeclared, nested, or starred targets, while regression-testing swaps and duplicate destinations. Keep the extension Model-first without adding standard Python/C Pack rules.
161
+ - Retain the old Call for single-string `print`; extended printing requires the new Construct's Admission rule. Do not add Python/C Target Pack recipes and reject `!r`/`!a`, format specifications, keyword arguments, or arbitrary-object stringification.
162
+ - Set `PythonFrontend`'s default `IntrinsicRegistry` to the standard table above. An explicitly supplied `intrinsics` still replaces the entire default table, which can be explicitly extended using `standard_intrinsics().extend(...)`. Existing dedicated Constructs such as `Length`, the Model's `IntrinsicCall`, and Python/C Target Packs are unchanged. Runtime conversion errors, float string representations, and Unicode case mapping remain unimplemented Realization contracts; a `supports` declaration alone does not prove preservation.
163
+ - `IntrinsicCall` keeps its resolved concrete static signature; operation-series variants are not subdivided by type. Matching candidates does not re-normalize expressions, infer types, perform implicit conversions, or select Realizations. Default Intrinsic tables and standard Python/C Pack acceptance remain unchanged.
164
+ - Initially keep the default Intrinsic table empty; only explicitly registered non-conflicting operations are recognized via `PythonFrontend(intrinsics=...)` / `convert(intrinsics=...)`. Added operation-name and once-only/evaluation-order obligations for receivers and arguments to Construct-provider Admission. Did not extend standard Python/C Packs, dedicated existing built-in Constructs, general inference, dynamic attributes, or overloads.
165
+ - Registered true-division numerical contracts and contracts for infinite-sign-extension bitwise semantics and shift counts in Construct-provider `AdmissionRule`, along with evaluation-order obligations. Do not import Target-specific widths or shift rules into the Model, or change C/Python standard Pack realization coverage. Updated the audit ledger and Japanese canonical source.
166
+ - Registered once-only target evaluation, read-before-RHS and rebinding, plus comparison-chain intermediate-value once-only evaluation, short-circuiting, and order with Construct-provider `AdmissionRule`; updated the audit ledger. Both remain Model-first with no new Python/C recipes; neither `supports` declarations nor generated code are asserted to constitute a general proof of semantic preservation.
167
+ - Treat only the leading string constant as a docstring, distinct from executable expressions. Retain static class-field rules, restricted dataclasses, and inherited-constructor constraints. Target Pack and Realization admission coverage is unchanged.
168
+ - Standard C `Comparison` conservatively rejects complex operands whose evaluation order C cannot guarantee, retaining comparisons of simple references and integer literals. Standard Python `Comparison` explicitly registers `supports`. Do not put Target-specific ordering in the Model; preservation by TemplatePlans and generated code remains subject to individual execution tests.
169
+ - Without changing Model structure or Frontend acceptance for `For`/`With`, added Target execution tests for C `range` iteration and Python `for`/`with`. Comparison operand evaluation order remains explicitly pending for step 23.
170
+ - Reject overriding baseline rules, unregistered derived Constructs, and unregistered children omitted by Templates. Pass explicit Admission to `realize` and contracts through `PortRegistry` to `convert`. Port demo providers declare independent Constructs, and missing `supports` is rejected before rendering. Existing pending contracts, desugaring, Model types, and Model semantics are unchanged.
171
+ - Without adding Target-specific execution ordering to the Model, enforced existing Model ordering obligations as prechecks for Realizations. Added negative tests modeling Targets that cannot guarantee evaluation order and a canonical-document-based audit plan for boundaries/desugaring. Textual Slot ordering alone does not prove Target execution order. Migration of external Construct contract ownership, pending standard Pack coverage, and changes to desugared forms were deferred.
172
+ - Consolidated extraction of required contracts into `AdmissionRule` declarations. Adding admission rules to `BindingRegistry` retains standard rules, and undeclared support is still rejected before rendering. Short-circuiting, `finally`, and environment lifetimes remain explicitly unprotected; Model and Frontend syntax acceptance is unchanged.
173
+ - Retained Target-neutral `For` Models, including non-Range iteration. Standard C Pack covers `range` only, while standard Python Pack outputs `range`, string, list, tuple, and general Iterable loops; `supports` alone does not guarantee semantic preservation.
174
+ - Does not automatically prove arbitrary Realization semantic preservation: derivation of dynamic `TemplatePlan`, evaluation order within recipes, and concrete `super` calls need separate execution verification. Model/Frontend acceptance and standard Target Pack coverage are unchanged.
175
+ - The field audit in step 14 remains a non-normative ledger; admission matching does not imply coverage of every audited contract. `supports` is an author's capability declaration, not proof of correct Target execution. Enforcement for iteration, `finally`, short-circuiting, closures, and similar semantics remains incomplete.
176
+ - In post-Phase-30 foundation refinement step 13, moved class normalization from `ClassNormalization` Mixin to an independent `ClassNormalizer` with typed `ClassServices` dependencies. Normalizers are independent objects for each parse, obsolete `FrontendOperations` stub base was removed, and cross-component operations go through `PythonFrontend` delegation entry points. Existing semantic contracts and Realizations were unchanged.
177
+ - In post-Phase-30 foundation refinement step 12, moved function declarations, calls, lambdas, and lexical resolution from Mixins to `FunctionNormalizer`. Limited `FunctionServices` to needed cross-domain operations and linked classes/statements/expressions via `PythonFrontend` delegation. Parse Context and decorator registration remain shared per parse. Existing semantics and Realizations were unchanged.
178
+ - In post-Phase-30 foundation refinement step 11, moved statement, control-flow, and exception normalization to an independent `StatementNormalizer`; narrowed `StatementServices` to the other operations needed. `PythonFrontend` now delegates Block/statement entry points. Existing syntax acceptance/rejection and Model/Realization contracts were preserved.
179
+ - In post-Phase-30 foundation refinement step 10, moved expression normalization from `PythonFrontend` multiple inheritance into `ExpressionNormalizer`, making required name/function/class operations explicit in `ExpressionServices`. Clarified responsibilities with per-parse sharing of `ParseContext` and Port normalizer and centralized state recreation. Other Mixins and existing semantics/Realizations were untouched.
180
+ - In post-Phase-30 foundation refinement step 9, moved Port expression/declaration normalization from a Frontend Mixin into an independent `PortNormalizer`, which receives only typed value/scope references and `ParseContext`, inheriting no other normalizer methods. Split explicit imports for type names, Ports, and decorators into `ImportNormalizer`, clarifying per-parse lifetimes. Existing acceptance/rejection and Model/Realization semantics were unchanged.
181
+ - In post-Phase-30 foundation refinement step 8, extended `DecoratorRegistry` with registration of class/method/function effect-normalization handlers. Migrated the existing three decorators to the mechanism and reused class extension plans between collection and construction. Retained rejection of unregistered effects; did not add general Python decorator execution or multi-stage application.
182
+ - In post-Phase-30 foundation refinement step 7, passed instance-expression receivers downstream as already-normalized Values, eliminating duplicate normalization in field reads/writes and method calls. Unified save/restore of normal-function and lambda state in `ParseContext.callable_scope`, making scope lifetimes explicit even on failure.
183
+ - In post-Phase-30 foundation refinement step 6, began checking owned Returns against declared return types when constructing `FunctionDefinition`, including Returns in branches, loops, With, and Try. Nested functions are checked separately, with no control-flow reachability inference. Simplified Frontend ordinary-return and lambda type checking to use shared `assignable`.
184
+ - In post-Phase-30 foundation refinement step 5, derived structural Value type shape exclusively from `value_type`, removing five redundant type-shape forwarding properties. Made `assignable` explicit in type rules and aligned derived-instance arguments accepted by `FunctionValueCall` with direct calls. Typed collections and Callables retain strict equality.
185
+ - In post-Phase-30 foundation refinement step 4, unified `FunctionSignature.return_type` and Frontend type annotations around `ValueType`. Removed scattered return-type fields and the seven-element annotation tuple; separated Port annotations from normal value types. Existing semantic contracts and Realizations were unchanged.
186
+ - Put aside the original plan to define a bespoke notation from the outset and changed direction to construct Constructs from ordinary Python code.
187
+ - Removed C-specific snippet generation from Constructs and moved it to replaceable Language Bindings validated by Shikumi declarations.
188
+ - Split Shikumi rule definitions, registration, and snippet realization into named modules, and added the Target Pack declaration format.
189
+ - Moved C code-generation rules to `targets/c/pack.py`, still retaining recursive composition inside Constructs at that stage.
190
+ - Enabled collection of `requires` declared on Constructs in a Target Pack into the generation context and their application to Program.
191
+ - Reduced excessive parentheses in C comparison snippets so equality comparisons compile even under strict Clang warnings.
192
+ - Following design decision 12, made the Frontend require type annotations on all new variable definitions.
193
+ - Following design decision 13, removed the fixed four-slot Construct design (emit, Snippets, AAA+Cleanup) and switched to pure structure and deferred Template/Slot composition.
194
+ - Rewrote the Python and C Target Packs and external Port adapters for the new approach.
195
+ - Implemented Port release as an explicit operation Construct, not a Cleanup Slot request.
196
+ - Reworked pytest and Shikumi-Contrace contracts comprehensively for the new realization model.
197
+ - Extended Frontend, Contrace, and pytest to check typed `while` conditions, nesting, `else`, and rejection of unsupported syntax.
198
+ - Changed C's `while ... else` Binding into a `for` expansion with interruption detection, verifying normal completion with `break` and `continue`.
199
+ - Added new structure and realization contracts to Shikumi-Contrace. Maintained the policy of not generating English published documents at that development stage.
200
+ - Fixed Composer Slot composition order to first occurrence within the Template and reinitialized header/auxiliary-name generation state per composition request.
201
+ - Renamed the public project and Python import name to `henkan` and updated examples, contracts, and tests.
202
+ - In SDD Phase 2, removed `Named`/`Layout` helper-type dependencies from `Construct.parts()`, replacing them with pure Model components such as `Identifier`, `Symbol`, and tuples.
203
+ - Moved separators between multiple `with` entries into Python Target realization rules and separated output requirements into a reserved Composer-side Slot.
204
+ - In SDD Phase 3, removed `Program.to_source()` / `to_c()` and unified conversion entry points under `henkan.convert()` / `realize()`.
205
+ - Migrated tests, examples, and Contrace from `ProgramPort` to an independent `CompositionPort`, removing Model dependence on Realization.
206
+ - In SDD Phase 4, removed range-specific projection from `For.parts()` and made the C range Binding provide extra Slots through `TemplatePlan`.
207
+ - In SDD Phase 5, removed the Program required-header Slot from Model `HOLES` and treated it as a Program-specific output Slot validated by Shikumi declarations.
208
+ - Reject non-`int`/`str` Literal values at construction time, clarifying the Target-independent Model value domain.
209
+ - In SDD Phase 6, redefined `HOLES` as names of possible Model components of a Construct, not existing Slots, and changed static component validation to `accepts_part_name()`.
210
+ - Changed Model type/operator invariant checks for `Comparison`, `Initialize`, `Assign`, `Branch`, and `While` from `parts()` access time to construction time.
211
+ - Updated FRT_014 and Phase-10 indirect-call rejection tests when new separate indirect-call contracts were added; corrected two malformed tuple descriptions in historical test data.
212
+ - Began post-Phase-30 module reorganization by splitting Constructs into types, base, values, type rules, collections, operations, control, functions, and classes. Updated single-file AST checks and Contrace implementation traversal to cover each definition module.
213
+ - In post-Phase-30 module reorganization step 2, split the large `frontend/parser.py` rules into classes, functions, statements, expressions, and ports; the parser handles the parse entry point and connects imports/type annotations.
214
+ - Configured Contrace to traverse new Frontend definition modules while retaining existing acceptance/rejection rules and Model/Realization semantic contracts. No public API compatibility aliases or English published documents were added at that point.
215
+ - In module reorganization step 3, changed `Symbol` type information to a single stored field holding `ValueType`, `PortType`, or `None`. Distinguished ordinary values from Port/built-in declarations, made old type categories and composite shapes derived properties, and reduced redundant type-checking and signature construction.
216
+
217
+ Removed:
218
+
219
+
220
+ - Removed the earlier limited Branch v0 (Python/Rust source generation), along with its tests and contracts.
221
+ - Removed the old `ConstructStart` / `ExplicitCleanup` and Snippets/four-stage declarations dependent on AAA+Cleanup.
pyinto-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 minoru-jp
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ include README.md STATUS.md CHANGELOG.md LICENSE
2
+ recursive-include docs *.md
pyinto-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyinto
3
+ Version: 0.0.1
4
+ Summary: Experimental Python-to-Model normalization and target-defined artifact realization
5
+ Author: minoru-jp
6
+ License-Expression: MIT
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: shikumi>=0.2.4
19
+ Provides-Extra: dev
20
+ Requires-Dist: shikumi==0.2.4; extra == "dev"
21
+ Requires-Dist: shikumi-devdoc==0.3.5; extra == "dev"
22
+ Requires-Dist: shikumi-contrace==0.1.0; extra == "dev"
23
+ Requires-Dist: pytest<10,>=8; extra == "dev"
24
+ Requires-Dist: ruff==0.16.10; extra == "dev"
25
+ Requires-Dist: basedpyright==1.40.1; extra == "dev"
26
+ Dynamic: license-file
27
+
28
+ # pyinto
29
+
30
+ **pyinto is a Host library that normalizes typed Python code into a Target-independent Model and lets Target Implementations realize that Model as a wide range of artifacts.**
31
+
32
+ ## ⚠️ Development status
33
+
34
+ pyinto is an **experimental Alpha-stage library**. Its APIs, Model, specifications, and design are subject to change. **Breaking changes may be introduced without advance notice or a migration period.** Compatibility between releases is not guaranteed. Use caution before deploying it to production or adopting it as a long-term dependency. See [STATUS](STATUS.md) for the current implementation status.
35
+
36
+ ## Installation
37
+
38
+ Requires Python 3.11 or later.
39
+
40
+ ```bash
41
+ pip install pyinto
42
+ ```
43
+
44
+ ## Conceptual model
45
+
46
+ pyinto models the structure and semantics obtained from Python independently of any particular output format. A Target Implementation uses that Model to produce an artifact.
47
+
48
+ ```text
49
+ Typed Python Source
50
+ │
51
+ ▼
52
+ ┌─────────────────┐
53
+ │ pyinto Host │
54
+ │ │
55
+ │ Frontend │
56
+ │ ↓ │
57
+ │ Construct Model │
58
+ │ ↓ │
59
+ │ Admission │
60
+ │ ↓ │
61
+ │ Dispatch │
62
+ └────────┬────────┘
63
+ │
64
+ ▼
65
+ ┌─────────────────┐
66
+ │ Target │
67
+ │ Implementation │
68
+ │ │
69
+ │ Realizations │
70
+ │ ↓ │
71
+ │ Artifact State │
72
+ │ ↓ │
73
+ │ Finalization │
74
+ └────────┬────────┘
75
+ │
76
+ ▼
77
+ Artifact
78
+ ```
79
+
80
+ **The Host constructs the Model and controls Realization dispatch. The Target Implementation constructs and submits the artifact.**
81
+
82
+ ## Host responsibilities
83
+
84
+ The pyinto Host provides:
85
+
86
+ - **Frontend:** statically analyzes typed Python and normalizes it into the Model.
87
+ - **Construct Model:** represents program structure and meaning without tying them to a Target.
88
+ - **Admission:** checks contracts governing the Model and its Realizations.
89
+ - **Realization Dispatch:** invokes Realizers according to the Model structure and the declared dispatch mode.
90
+
91
+ The Host does not prescribe an artifact format or internal representation.
92
+
93
+ ## Target Implementation responsibilities
94
+
95
+ A Target Implementation consumes Model information supplied by the Host. It defines Realizations, manages generation state, constructs its artifacts, and submits the final result.
96
+
97
+ Translation into other programming languages remains a primary use case, **but there is no Host-imposed restriction on the form of the artifact**. A Target may produce structured data, diagrams, documentation, analysis reports, images, executable files or other **binary files**. An artifact need not even be a file: it may be any object the Target chooses to return.
98
+
99
+ A Target also chooses whether it aims to **preserve** execution semantics or **project** selected information from the Model.
100
+
101
+ ## Realization dispatch modes
102
+
103
+ **Composition** recursively connects Realizations via Template/Slot references. It is particularly useful for constructing structured text, including source code. **Structural** walks the Model structure and invokes matching Realizers, making it suitable for information extraction, structural analysis, diagrams, and structured data. In both modes, the Target Implementation owns the final artifact.
104
+
105
+ ## Target Implementations
106
+
107
+ **pyinto distributes the Host library only. It does not ship any concrete Target Implementation.** Installing pyinto alone therefore does not enable conversion into C or any other programming language. You must provide a suitable Target Implementation separately.
108
+
109
+ Target authors can use pyinto's public Model, Realization, Admission, and related interfaces. The repository includes development-only Python and C reference Realizers under `tests/support/`; these are test assets, not part of the pyinto distribution.
110
+
111
+ Start with the **[Target Implementation Guide](docs/target_implementation/INDEX.md)** for design choices, declarations, Constructs and variants, semantic contracts, artifact generation, and verification. The guide is structured with LLM-assisted implementation work in mind.
112
+
113
+ ## Documentation
114
+
115
+ | Document | Purpose |
116
+ | --- | --- |
117
+ | [STATUS](STATUS.md) | Current development state, supported features, and limitations |
118
+ | [Target Implementation Guide](docs/target_implementation/INDEX.md) | Implementing Target Implementations |
119
+ | [Specification](docs/specification/INDEX.md) | Normative behavior and contracts |
120
+ | [Glossary](docs/GLOSSARY.md) | Project terminology |
121
+ | [Changelog](CHANGELOG.md) | Development history |
122
+
123
+ Japanese canonical sources and generated Japanese documents are maintained in `devdocs/`. English documents here are published derivatives, not independent normative sources. [Translation coverage](docs/TRANSLATION_STATUS.md) identifies which long-form specifications are currently abridged; consult the Japanese canonical documents for complete conditions.
124
+
125
+ ## License
126
+
127
+ See [LICENSE](LICENSE).
pyinto-0.0.1/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # pyinto
2
+
3
+ **pyinto is a Host library that normalizes typed Python code into a Target-independent Model and lets Target Implementations realize that Model as a wide range of artifacts.**
4
+
5
+ ## ⚠️ Development status
6
+
7
+ pyinto is an **experimental Alpha-stage library**. Its APIs, Model, specifications, and design are subject to change. **Breaking changes may be introduced without advance notice or a migration period.** Compatibility between releases is not guaranteed. Use caution before deploying it to production or adopting it as a long-term dependency. See [STATUS](STATUS.md) for the current implementation status.
8
+
9
+ ## Installation
10
+
11
+ Requires Python 3.11 or later.
12
+
13
+ ```bash
14
+ pip install pyinto
15
+ ```
16
+
17
+ ## Conceptual model
18
+
19
+ pyinto models the structure and semantics obtained from Python independently of any particular output format. A Target Implementation uses that Model to produce an artifact.
20
+
21
+ ```text
22
+ Typed Python Source
23
+ │
24
+ ▼
25
+ ┌─────────────────┐
26
+ │ pyinto Host │
27
+ │ │
28
+ │ Frontend │
29
+ │ ↓ │
30
+ │ Construct Model │
31
+ │ ↓ │
32
+ │ Admission │
33
+ │ ↓ │
34
+ │ Dispatch │
35
+ └────────┬────────┘
36
+ │
37
+ ▼
38
+ ┌─────────────────┐
39
+ │ Target │
40
+ │ Implementation │
41
+ │ │
42
+ │ Realizations │
43
+ │ ↓ │
44
+ │ Artifact State │
45
+ │ ↓ │
46
+ │ Finalization │
47
+ └────────┬────────┘
48
+ │
49
+ ▼
50
+ Artifact
51
+ ```
52
+
53
+ **The Host constructs the Model and controls Realization dispatch. The Target Implementation constructs and submits the artifact.**
54
+
55
+ ## Host responsibilities
56
+
57
+ The pyinto Host provides:
58
+
59
+ - **Frontend:** statically analyzes typed Python and normalizes it into the Model.
60
+ - **Construct Model:** represents program structure and meaning without tying them to a Target.
61
+ - **Admission:** checks contracts governing the Model and its Realizations.
62
+ - **Realization Dispatch:** invokes Realizers according to the Model structure and the declared dispatch mode.
63
+
64
+ The Host does not prescribe an artifact format or internal representation.
65
+
66
+ ## Target Implementation responsibilities
67
+
68
+ A Target Implementation consumes Model information supplied by the Host. It defines Realizations, manages generation state, constructs its artifacts, and submits the final result.
69
+
70
+ Translation into other programming languages remains a primary use case, **but there is no Host-imposed restriction on the form of the artifact**. A Target may produce structured data, diagrams, documentation, analysis reports, images, executable files or other **binary files**. An artifact need not even be a file: it may be any object the Target chooses to return.
71
+
72
+ A Target also chooses whether it aims to **preserve** execution semantics or **project** selected information from the Model.
73
+
74
+ ## Realization dispatch modes
75
+
76
+ **Composition** recursively connects Realizations via Template/Slot references. It is particularly useful for constructing structured text, including source code. **Structural** walks the Model structure and invokes matching Realizers, making it suitable for information extraction, structural analysis, diagrams, and structured data. In both modes, the Target Implementation owns the final artifact.
77
+
78
+ ## Target Implementations
79
+
80
+ **pyinto distributes the Host library only. It does not ship any concrete Target Implementation.** Installing pyinto alone therefore does not enable conversion into C or any other programming language. You must provide a suitable Target Implementation separately.
81
+
82
+ Target authors can use pyinto's public Model, Realization, Admission, and related interfaces. The repository includes development-only Python and C reference Realizers under `tests/support/`; these are test assets, not part of the pyinto distribution.
83
+
84
+ Start with the **[Target Implementation Guide](docs/target_implementation/INDEX.md)** for design choices, declarations, Constructs and variants, semantic contracts, artifact generation, and verification. The guide is structured with LLM-assisted implementation work in mind.
85
+
86
+ ## Documentation
87
+
88
+ | Document | Purpose |
89
+ | --- | --- |
90
+ | [STATUS](STATUS.md) | Current development state, supported features, and limitations |
91
+ | [Target Implementation Guide](docs/target_implementation/INDEX.md) | Implementing Target Implementations |
92
+ | [Specification](docs/specification/INDEX.md) | Normative behavior and contracts |
93
+ | [Glossary](docs/GLOSSARY.md) | Project terminology |
94
+ | [Changelog](CHANGELOG.md) | Development history |
95
+
96
+ Japanese canonical sources and generated Japanese documents are maintained in `devdocs/`. English documents here are published derivatives, not independent normative sources. [Translation coverage](docs/TRANSLATION_STATUS.md) identifies which long-form specifications are currently abridged; consult the Japanese canonical documents for complete conditions.
97
+
98
+ ## License
99
+
100
+ See [LICENSE](LICENSE).