MBA-2032: COBOL-to-Python migration plan and PORTVALD reference translation pair - #260
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…erence translation pair
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Implements MBA-2032: adds Python as a benchmark translation target, with a migration plan and the first translation pair actually built and pinned against the COBOL.
Plan —
documentation/technical/python-migration-plan.md: inventory of the 38 programs tiered by external dependency (1 pure logic, 21 file I/O, 7 DB2, 8 CICS) plus the 20 copybooks/15 JCL/BMS/CSD artefacts, a per-construct feasibility table (verdict: feasible; CICS only as behavioural emulation), PIC→Python type mapping, and five waves with exit criteria. Also records thatsrc/programs/batch/POSUPDT.cblis an empty file although the README advertisesPOSUPD00.First migration step (executed) —
PORTVALD, the only dependency-free program, translated intotranslations/python/with one function per paragraph and a dataclass for the LINKAGE record:The translation is behaviour-preserving, including four latent defects in the original that a naive translation silently "fixes" — that is what makes the pair useful as benchmark material:
VAL-NUMERIC-CHECK PIC X(10), soIS NUMERICsees trailing spacesPORT0001→VAL-INVALID-IDX(50)item1234567890→VAL-INVALID-ACCTS9(13)V9999999999999999999→ successWHEN OTHERmovesVAL-INVALID-IDZ→ rc1Equivalence harness —
tools/cobol_bridge.pycompiles the COBOL withcobc -mand calls it throughlibcobwith the raw 103-byte linkage record, so the 23 recorded vectors are re-verified field-for-field against the real program on every run instead of being hand-asserted:README — Purpose and Future Plans now list Python, Documentation links the plan, and the project structure gains
translations/.No COBOL source is modified;
translations/is documented as benchmark material and is not wired into any COBOL build.Testing
Notes
documentation/tickets/COBOL-PYTHON-MIGRATION.mdand edits the same README "Future Plans" bullet; whichever merges second will need a one-line conflict resolution there.Link to Devin session: https://app.devin.ai/sessions/be97621cd70a49e392c9afb295177614
Devin Review