[MBEP] Ateleris Python Backend - #371
Merged
Merged
Conversation
…leris/jh_stg_python
…leris/jh_stg_python
…push (=> manually trigger)
PUSC Test Harness Redesign
Acn_Enc_String_CharIndex_FixSize called <GetCharIndex>(...) instead of GetCharIndex(...), so the embedded C runtime — copied into every generated C project — failed to compile.
The isObjectOriented branch of GenerateFiles.printUnit (deep-field-access resolution, dedup passes, __init__.py handling) was Python-only logic living in the generic code-generation driver. Move the type-selection/dedup into ILangGeneric.selectProgramUnitRenderTypes, overridden in LangGeneric_python; the generic driver keeps the shared printUnitInternal rendering and emits the package import via the new programUnitImportStatement hook. Debug printfns dropped. Non-object-oriented languages get no-op defaults and are unaffected.
…eratefiles Move Python program-unit type selection behind ILangGeneric
Revert stray STG-macro escape in ACN string charset encoder
Update Dotnet Test Framework, Fix GetCharInfo & Extract python program-unit types behind ILangGeneric
- acn_c.stg: restore the lost <if(arrsAcnPrms)> clause on the EmitTypeAssignment_primitive encode definition, so --acn-v2 specialized encoders keep their AcnInsertedFieldRef parameters (fixes the gcc "conflicting types" error; declaration and definition now match). - github-build.sh: run the Ada ws8 suite with -s false (it was a no-op under slim mode, so Ada ws8 was effectively untested), and add C --acn-v2 regression runs at both word sizes. - Revert the CCSDS test inputs to the correct 1-bit secondary header flag (SecondaryHeaderFlag INTEGER(0..1), size 1, TC-Packet present-when ==0). - Fix the python_name copy-paste slip (was old.scala_name) in CloneTree.fs and MapParamAstToNonParamAst.fs. - Reject -python together with --acn-v2, since the Python deferred-patching macros are still TODO stubs. - Add a unioned WITH COMPONENTS CHOICE regression input (09-CHOICE/014). - Revert the ToC '#'->"elem" rename back to "elm" everywhere; the rename will be done separately as its own announced change. - Gate the AcnDependencies depResolvable empty-string return behind a new ILangGeneric.allowUnresolvedAcnDependency: Python skips the update, C/Ada/Scala raise instead of silently dropping a determinant update. - Replace the Codec.suffix global-state lookup (ActiveLanguages.Head) with an ILangGeneric.codecSuffix member; C/Ada/Scala output is unchanged. - Drop personal working files (debug_acn.sh, generate-local-tests.sh, and the tracked .superpowers report) from the PR.
The asn1python runtime library and the generated asn1pylib pyproject (StgPython/aux_python.stg template) declared requires-python >=3.8. Bump both to >=3.11 and drop the 3.8-3.10 classifiers so the declared floor matches the supported baseline.
Followups ESA Review
- Rename generated Python count field from nCount to n_count - Automate type check and lint check in CI
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
decode_boolean() treats any child other than <true/> as false, so malformed XER such as <b><maybe/></b> is silently accepted. Explicitly require true or false in both wrapped and naked forms and raise Asn1InvalidValueException otherwise; add an invalid-child regression.
usr3-1415
added a commit
that referenced
this pull request
Sep 5, 2026
The PR #371 merge kept both the branch's cleaned five-run ACN v2 block and master's original six-run block, so every acn-v2 leg executed twice (and the obsolete Ada ws8 slim leg, a no-op now that slim mode is C-only, came back). Keep the five-run block only.
usr3-1415
added a commit
that referenced
this pull request
Sep 5, 2026
The regression suite regenerates and recompiles everything from scratch, so identifier renames, API changes and silent semantic changes in the generated code are invisible to it by design. This tool closes that gap for PR reviews: it enumerates the same test-case directives as runTests.py, runs a baseline compiler (master) and a candidate compiler (the PR) with the regression runner's flags, and diffs the generated C/Ada output file by file, grouping identical changes into unique signatures with a Markdown report. First use: the final review gate of PR #371 (master vs 3cc274e, 418 cases x 9 configs = 3762 comparisons); every difference mapped to a known, discussed change. Exit codes (0 = identical, 1 = differences, 2 = tool error) are CI-friendly so the tool can later run as a job on pull requests.
usr3-1415
added a commit
that referenced
this pull request
Sep 5, 2026
Agreed with Ateleris during the PR #371 review: the Python target ships experimental in its first release.
usr3-1415
added a commit
that referenced
this pull request
Sep 5, 2026
Both came in with the PR #371 merge and fired on every push: - Python Unit Tests invokes generate-local-tests.sh, which was removed from the repository during the review, so it failed on every push to master (it has no pull_request trigger, which is why the PR checks never showed it). - Local Tests needs a self-hosted runner that esa/asn1scc does not have, so its runs sat queued indefinitely. Switch both to workflow_dispatch until Ateleris fixes the generation step and gates the self-hosted job on their repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP-PR for the Python Backend developed by Ateleris as outlined in MBEP-ATS-AC-TN-001
conforming to MBEP-ATS-AC-SRS.
This is a work in progress. There will be many changes on our side and before finalizing the work the code will be cleaned thoroughly.