Recover RPG entry programs and concurrent cycle returns #818

Manually merged
binjovi-bot merged 7 commits from rpg-thread-entry-recovery into trunk 2026-11-19 15:41:49 +00:00
Owner

Recover RPG entry programs and concurrent cycle returns

Entry parameters and assignments

The emitter reads a fixed character copy between two entry parameters. It
also reads a literal followed by an entry parameter when the compiler
copies their combined width and pads the result with blanks. Both forms
require the complete copy operation and independent declarations for the
two parameters. A read-only parameter can only supply the value.

The module's retained PCML records supply the parameter names, input usage
and version. The emitter accepts flat PCML 7 and 8 interfaces with fixed
character and packed decimal parameters. It checks every parameter against
the recovered procedure before using any of the names. Both public noxDB
listings now contain the complete three-statement body.

The module's named format record supplies the date order and separator.
For a nondefault comma it also distinguishes the compiler setting from
executed program text. The spelling comes from a single unused source
literal for comma or zero-comma. Conflicting spellings remain unresolved.
A copyright requires the program's length, padding and footer plus the
same text in the module's RPG constants. Long control lines break between
keywords to fit the source member.

Object comparison

The comparator includes the full retained interface and its CCSID in the
attribute comparison. Changing only the spelling or case of a retained
parameter changes those attributes. The comparator also recognizes the
compile timestamp for the measured MDY and YMD date forms with slash and
period separators. The date options themselves remain structural.

Concurrent program return

A concurrent module installs eight addresses into its run-time frames.
Sourcerer checks the entry label, every address and store, the thread-local
areas and pointer type, and the indirect return through the control slot.
The cycle reader can then distinguish this routine from the initialization
of the program's own data and retain its checks on both routines.

Two authored concurrent programs carry the routine in both saved forms.
The single-thread version of the same program omits it. The final return
of the public ileastic program now emits.

Gate

== a. development emits (dev-hash)
p1 DIFFERENT
p2 same
p3 same
p4 same
p5 same
== b. L10-test direction
L10-test unchanged
== c. committed twins (emit-bytes-diff)
emit text differs:
diff -r -x emit.ndjson -x *.receipt.json /Users/someara/data/sourcerer-loop/runs/emitbytes.0rGJwg/base-emit/527-P2AD94194S.rpgle /Users/someara/data/sourcerer-loop/runs/emitbytes.0rGJwg/head-emit/527-P2AD94194S.rpgle
2c2
< ctl-opt dftactgrp(*no) actgrp(*new) main(MAIN);
---
> ctl-opt dftactgrp(*no) actgrp(*new) main(MAIN) decedit('0,');
forms projection differs:
484c484
< {"twin":"savf/SC-ILE/EXPERIMENTS/linz-p1-chgobjarg/stripped","object":"P2AD94194S","status":"done","statements":24,"emitted":19,"failures":5,"lines":121,"form_counts":{"compiler_policy_marks_v1":1,"context_character_literal_v1":1,"context_pointer_store_v1":1,"context_procedure_pointer_store_v1":1,"context_zero_fill_v1":1,"direct_branch_v1":3,"emit_assign_part_v1":5,"emit_ctl_opt_v1":1,"emit_dcl_ds_v1":1,"emit_dcl_pi_v1":1,"emit_dcl_proc_v1":1,"emit_ds_subfield_v1":4,"emit_end_ds_v1":1,"emit_end_pi_v1":1,"emit_end_proc_v1":1,"emit_endif_v1":4,"emit_free_v1":1,"emit_if_v1":4,"emit_pi_parameter_v1":6,"emit_pointer_copy_v1":3,"emit_return_v1":1,"emit_summary_v1":2,"fail_statement_v1":5,"initialization_entry_v1":1,"initialization_resume_v1":1,"integer_store_v1":1,"layout_blank_v1":79,"local_pointer_store_v1":1,"placeholder_parameter_type_v1":3,"procedure_blank_fill_v1":1,"procedure_character_literal_v1":1,"procedure_exit_transfer_v1":1,"procedure_return_v1":1},"text_sha256":"821a02263c1d84a5e9fe02f29c06d3ca1a2f12326dc7bc666b2faef894e811af"}
---
> {"twin":"savf/SC-ILE/EXPERIMENTS/linz-p1-chgobjarg/stripped","object":"P2AD94194S","status":"done","statements":24,"emitted":19,"failures":5,"lines":121,"form_counts":{"compiler_policy_marks_v1":1,"context_character_literal_v1":1,"context_pointer_store_v1":1,"context_procedure_pointer_store_v1":1,"context_zero_fill_v1":1,"direct_branch_v1":3,"emit_assign_part_v1":5,"emit_ctl_opt_v1":1,"emit_dcl_ds_v1":1,"emit_dcl_pi_v1":1,"emit_dcl_proc_v1":1,"emit_ds_subfield_v1":4,"emit_end_ds_v1":1,"emit_end_pi_v1":1,"emit_end_proc_v1":1,"emit_endif_v1":4,"emit_free_v1":1,"emit_if_v1":4,"emit_pi_parameter_v1":6,"emit_pointer_copy_v1":3,"emit_return_v1":1,"emit_summary_v1":2,"fail_statement_v1":5,"initialization_entry_v1":1,"initialization_resume_v1":1,"integer_store_v1":1,"layout_blank_v1":79,"local_pointer_store_v1":1,"placeholder_parameter_type_v1":3,"procedure_blank_fill_v1":1,"procedure_character_literal_v1":1,"procedure_exit_transfer_v1":1,"procedure_return_v1":1},"text_sha256":"23106add0864d489c1968cee5b33c7821c6ed4ddaa75cc3c6929f818b8becb66"}
== d. captures (capture-emit-diff)
entry-concat-prefix base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
entry-concat-writable base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
pcml-name-declared base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
pcml-name-equal-length base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
pcml-name-plain base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
identity-date-ymd-dot base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0
identity-date-ymd-slash base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0
identity-date-mdy-dot base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0
decimal-comma base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0
identity-date-dec-only base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0
lk-ctl-copyright base=[4,4,0] head=[4,4,0] CHANGED fail-lines=0
p1 base=[24,19,5] head=[24,19,5] CHANGED fail-lines=5
l10-sitemule-noxdb-1 base=[3,2,1] head=[3,3,0] CHANGED fail-lines=0
l10-sitemule-noxdb-2 base=[3,2,1] head=[3,3,0] CHANGED fail-lines=0
l10-sitemule-ileastic-1 base=[2,0,2] head=[2,2,0] CHANGED fail-lines=0
pcml-name-folded base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
pcml-name-long base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
pcml-name-upper base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0
capture-emit-diff: 30 cases, 18 changed, 22 with no failure line in the head emit
== e. source agreement (agree)
suspect        base=1 head=1
conflict       base=0 head=0
params_wrong   base=1 head=1
decl_missing   base=0 head=0
decl_extra     base=0 head=0
type_unmarked  base=0 head=0
== f. host round trips (both binaries)
cases to round-trip: 24
entry-concat-20261118/entry-concat-prefix          base=different head=match
entry-concat-20261118/entry-concat-writable        base=different head=match
pcml-names-20261118/pcml-name-declared             base=different head=match
pcml-names-20261118/pcml-name-equal-length         base=different head=match
pcml-names-20261118/pcml-name-plain                base=different head=match
datedit-identity-20261118/identity-date-ymd-dot    base=different head=match
datedit-identity-20261118/identity-date-ymd-slash  base=different head=match
datedit-identity-20261118/identity-date-mdy-dot    base=different head=match
decimal-control-20261118/decimal-comma             base=different head=match
decimal-control-20261118/decimal-text-only         base=match head=match
datedit-identity-20261118/identity-date-dec-only   base=different head=match
lk-pi-name-r2/lk-ctl-copyright                     base=different head=match
l10-scout2/l10-sitemule-noxdb/l10-sitemule-noxdb-1 base=different head=match
l10-scout2/l10-sitemule-noxdb/l10-sitemule-noxdb-2 base=different head=match
l10-scout2/l10-sitemule-ileastic/l10-sitemule-ileastic-1 base=failed head=match
lext-thread-call/lext-call-void-c                  base=match head=match
lext-thread-call/lext-call-void-p                  base=match head=match
pcml-names-20261118/pcml-name-folded               base=different head=match
pcml-names-20261118/pcml-name-long                 base=different head=match
pcml-names-20261118/pcml-name-upper                base=different head=match
datedit-identity-20261118/identity-date-default    base=match head=match
decimal-control-20261118/decimal-jobrun            base=different head=different
decimal-control-20261118/decimal-period            base=different head=different
decimal-control-20261118/decimal-zero-period       base=different head=different
gate: PASS
# Recover RPG entry programs and concurrent cycle returns ## Entry parameters and assignments The emitter reads a fixed character copy between two entry parameters. It also reads a literal followed by an entry parameter when the compiler copies their combined width and pads the result with blanks. Both forms require the complete copy operation and independent declarations for the two parameters. A read-only parameter can only supply the value. The module's retained PCML records supply the parameter names, input usage and version. The emitter accepts flat PCML 7 and 8 interfaces with fixed character and packed decimal parameters. It checks every parameter against the recovered procedure before using any of the names. Both public noxDB listings now contain the complete three-statement body. ## Date, decimal and copyright controls The module's named format record supplies the date order and separator. For a nondefault comma it also distinguishes the compiler setting from executed program text. The spelling comes from a single unused source literal for comma or zero-comma. Conflicting spellings remain unresolved. A copyright requires the program's length, padding and footer plus the same text in the module's RPG constants. Long control lines break between keywords to fit the source member. ## Object comparison The comparator includes the full retained interface and its CCSID in the attribute comparison. Changing only the spelling or case of a retained parameter changes those attributes. The comparator also recognizes the compile timestamp for the measured MDY and YMD date forms with slash and period separators. The date options themselves remain structural. ## Concurrent program return A concurrent module installs eight addresses into its run-time frames. Sourcerer checks the entry label, every address and store, the thread-local areas and pointer type, and the indirect return through the control slot. The cycle reader can then distinguish this routine from the initialization of the program's own data and retain its checks on both routines. Two authored concurrent programs carry the routine in both saved forms. The single-thread version of the same program omits it. The final return of the public ileastic program now emits. ## Gate ``` == a. development emits (dev-hash) p1 DIFFERENT p2 same p3 same p4 same p5 same == b. L10-test direction L10-test unchanged == c. committed twins (emit-bytes-diff) emit text differs: diff -r -x emit.ndjson -x *.receipt.json /Users/someara/data/sourcerer-loop/runs/emitbytes.0rGJwg/base-emit/527-P2AD94194S.rpgle /Users/someara/data/sourcerer-loop/runs/emitbytes.0rGJwg/head-emit/527-P2AD94194S.rpgle 2c2 < ctl-opt dftactgrp(*no) actgrp(*new) main(MAIN); --- > ctl-opt dftactgrp(*no) actgrp(*new) main(MAIN) decedit('0,'); forms projection differs: 484c484 < {"twin":"savf/SC-ILE/EXPERIMENTS/linz-p1-chgobjarg/stripped","object":"P2AD94194S","status":"done","statements":24,"emitted":19,"failures":5,"lines":121,"form_counts":{"compiler_policy_marks_v1":1,"context_character_literal_v1":1,"context_pointer_store_v1":1,"context_procedure_pointer_store_v1":1,"context_zero_fill_v1":1,"direct_branch_v1":3,"emit_assign_part_v1":5,"emit_ctl_opt_v1":1,"emit_dcl_ds_v1":1,"emit_dcl_pi_v1":1,"emit_dcl_proc_v1":1,"emit_ds_subfield_v1":4,"emit_end_ds_v1":1,"emit_end_pi_v1":1,"emit_end_proc_v1":1,"emit_endif_v1":4,"emit_free_v1":1,"emit_if_v1":4,"emit_pi_parameter_v1":6,"emit_pointer_copy_v1":3,"emit_return_v1":1,"emit_summary_v1":2,"fail_statement_v1":5,"initialization_entry_v1":1,"initialization_resume_v1":1,"integer_store_v1":1,"layout_blank_v1":79,"local_pointer_store_v1":1,"placeholder_parameter_type_v1":3,"procedure_blank_fill_v1":1,"procedure_character_literal_v1":1,"procedure_exit_transfer_v1":1,"procedure_return_v1":1},"text_sha256":"821a02263c1d84a5e9fe02f29c06d3ca1a2f12326dc7bc666b2faef894e811af"} --- > {"twin":"savf/SC-ILE/EXPERIMENTS/linz-p1-chgobjarg/stripped","object":"P2AD94194S","status":"done","statements":24,"emitted":19,"failures":5,"lines":121,"form_counts":{"compiler_policy_marks_v1":1,"context_character_literal_v1":1,"context_pointer_store_v1":1,"context_procedure_pointer_store_v1":1,"context_zero_fill_v1":1,"direct_branch_v1":3,"emit_assign_part_v1":5,"emit_ctl_opt_v1":1,"emit_dcl_ds_v1":1,"emit_dcl_pi_v1":1,"emit_dcl_proc_v1":1,"emit_ds_subfield_v1":4,"emit_end_ds_v1":1,"emit_end_pi_v1":1,"emit_end_proc_v1":1,"emit_endif_v1":4,"emit_free_v1":1,"emit_if_v1":4,"emit_pi_parameter_v1":6,"emit_pointer_copy_v1":3,"emit_return_v1":1,"emit_summary_v1":2,"fail_statement_v1":5,"initialization_entry_v1":1,"initialization_resume_v1":1,"integer_store_v1":1,"layout_blank_v1":79,"local_pointer_store_v1":1,"placeholder_parameter_type_v1":3,"procedure_blank_fill_v1":1,"procedure_character_literal_v1":1,"procedure_exit_transfer_v1":1,"procedure_return_v1":1},"text_sha256":"23106add0864d489c1968cee5b33c7821c6ed4ddaa75cc3c6929f818b8becb66"} == d. captures (capture-emit-diff) entry-concat-prefix base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 entry-concat-writable base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 pcml-name-declared base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 pcml-name-equal-length base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 pcml-name-plain base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 identity-date-ymd-dot base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0 identity-date-ymd-slash base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0 identity-date-mdy-dot base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0 decimal-comma base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0 identity-date-dec-only base=[2,2,0] head=[2,2,0] CHANGED fail-lines=0 lk-ctl-copyright base=[4,4,0] head=[4,4,0] CHANGED fail-lines=0 p1 base=[24,19,5] head=[24,19,5] CHANGED fail-lines=5 l10-sitemule-noxdb-1 base=[3,2,1] head=[3,3,0] CHANGED fail-lines=0 l10-sitemule-noxdb-2 base=[3,2,1] head=[3,3,0] CHANGED fail-lines=0 l10-sitemule-ileastic-1 base=[2,0,2] head=[2,2,0] CHANGED fail-lines=0 pcml-name-folded base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 pcml-name-long base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 pcml-name-upper base=[2,1,1] head=[2,2,0] CHANGED fail-lines=0 capture-emit-diff: 30 cases, 18 changed, 22 with no failure line in the head emit == e. source agreement (agree) suspect base=1 head=1 conflict base=0 head=0 params_wrong base=1 head=1 decl_missing base=0 head=0 decl_extra base=0 head=0 type_unmarked base=0 head=0 == f. host round trips (both binaries) cases to round-trip: 24 entry-concat-20261118/entry-concat-prefix base=different head=match entry-concat-20261118/entry-concat-writable base=different head=match pcml-names-20261118/pcml-name-declared base=different head=match pcml-names-20261118/pcml-name-equal-length base=different head=match pcml-names-20261118/pcml-name-plain base=different head=match datedit-identity-20261118/identity-date-ymd-dot base=different head=match datedit-identity-20261118/identity-date-ymd-slash base=different head=match datedit-identity-20261118/identity-date-mdy-dot base=different head=match decimal-control-20261118/decimal-comma base=different head=match decimal-control-20261118/decimal-text-only base=match head=match datedit-identity-20261118/identity-date-dec-only base=different head=match lk-pi-name-r2/lk-ctl-copyright base=different head=match l10-scout2/l10-sitemule-noxdb/l10-sitemule-noxdb-1 base=different head=match l10-scout2/l10-sitemule-noxdb/l10-sitemule-noxdb-2 base=different head=match l10-scout2/l10-sitemule-ileastic/l10-sitemule-ileastic-1 base=failed head=match lext-thread-call/lext-call-void-c base=match head=match lext-thread-call/lext-call-void-p base=match head=match pcml-names-20261118/pcml-name-folded base=different head=match pcml-names-20261118/pcml-name-long base=different head=match pcml-names-20261118/pcml-name-upper base=different head=match datedit-identity-20261118/identity-date-default base=match head=match decimal-control-20261118/decimal-jobrun base=different head=different decimal-control-20261118/decimal-period base=different head=different decimal-control-20261118/decimal-zero-period base=different head=different gate: PASS ```
sean force-pushed rpg-thread-entry-recovery from 47152e7cd5 to c8d454a4f3
Some checks failed
binjovi/ci Binjovi failed the frozen plan
2026-11-19 10:02:55 +00:00
Compare
sean force-pushed rpg-thread-entry-recovery from c8d454a4f3
Some checks failed
binjovi/ci Binjovi failed the frozen plan
to 2a3c41f8f2
Some checks failed
binjovi/ci Binjovi failed the frozen plan
2026-11-19 15:18:31 +00:00
Compare
sean force-pushed rpg-thread-entry-recovery from 2a3c41f8f2
Some checks failed
binjovi/ci Binjovi failed the frozen plan
to dd7c9e2413
All checks were successful
binjovi/ci Binjovi completed the frozen plan
2026-11-19 15:23:04 +00:00
Compare
binjovi-bot manually merged commit dd7c9e2413 into trunk 2026-11-19 15:41:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!818
No description provided.