FILE-object definitions: the files of a save file name their own fields #695

Manually merged
binjovi-bot merged 3 commits from file-object-reader-20261101 into trunk 2026-11-01 13:58:03 +00:00
Owner

FILE-object definitions: the files of a save file name their own fields

A save file that holds the files carries the record format description of every
file in its library catalogue. core/file_object.zig reads the field and format
records of the physical files (kind 0x0b90, listed as 0x1901 by the catalogue):
file, format, level identifier, and per field the name, type (A, P, S), bytes,
digits, decimal positions and buffer positions. Measured on 40 public PF saves
(tools/file-definitions.sh --save) against their DSPFFD rows: all 641 fields and
101 formats equal. savf rpgle uses the definitions of the save file of the
program when --files is absent and they prove every external file of the program
(else the program alone, as before); --no-file-objects keeps the old mode, and
--files FILE.savf reads the definitions from a separate save file of the files.
savf.zig reads the physical-file item (name repeated in the header; the
catalogue page found by its marker when the catalogue has more than one page) and
keeps the catalogue image in the Archive. Display files (kind 0x1901) have another
layout and are not read yet.

Six twins of the c8x family (c8x-privf-2, -privf-4, -privg-1, -privg-2, -privh-1,
c8x-s2-sqlfiles-1) keep their DSPFFD rows as dspffd.json, not files.json: their
programs use several files of one layout, and the position naming of
rpg_file_defs.zig then finds two fields at a buffer position and refuses the names
(the matrix would turn from 0 to 4..20 failures). The save-file definitions of those
twins are exact (the test compares them with the rows); the naming gap is the next
work of the definitions path.

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":106,"newly_clean":102,"clean_delta":102,"base":215,"new":317},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":39},"allgroups":{"regressions":[],"newly":["rpg-corpus-captures/files-chain/stripped/object.savf 2","rpg-corpus-captures/files-display-write/stripped/object.savf 2","rpg-corpus-captures/files-logical/stripped/object.savf 2","savf/SC-CONSTRUCT/POINTER/rpg-pointer-procedure-auto/stripped/archive.savf 1","savf/SC-ILE/DSPLY/error-observable/archive.savf 2","savf/SC-ILE/DSPLY/error-stripped/archive.savf 2","savf/SC-ILE/DSPLY/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/d4-edit/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/d4-editc-codes/stripped/object.savf 16","savf/SC-ILE/EXPERIMENTS/d4-out-const/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-input/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-srcstmt-dspf/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7-args/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7c-copy/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j1/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j2/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j3/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/format-base/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/format-rename/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/gotos-auto/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/gotos-heldout/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/gotos-static/stripped/archive.savf 5","savf/SC-ILE/EXPERIMENTS/h-editc/stripped/object.savf 17","savf/SC-ILE/EXPERIMENTS/h-editc3/stripped/object.savf 24","savf/SC-ILE/EXPERIMENTS/h-editc5/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc6/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-fmix/stripped/object.savf 11","savf/SC-ILE/EXPERIMENTS/h-subind/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/loop-condition-owner-sql/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/loop-condition-owner-static/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/program-literal/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5b-onexit-for/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5c-cycle-files/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5e-date-field/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5e-editc-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5i-figurative/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5x-cycle-print/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6a-float-inz/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-reset-ds/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-fixed/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-two/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-blank/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-char/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-const/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-disk/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit1/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit2-int/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit2/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit3/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit4/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edita/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-editj/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-editword/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-editz/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-end/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-disk-two/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6e-ho-edit4-amt/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-editz-cnt/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-ind-const/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-nooflind-two/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6e-ho-oflind60-two/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6e-ind-fld/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ind-rec/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-nooflind/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-num/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-oflind50/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-skip/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-space/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-three-rec/stripped/object.savf 4","savf/SC-ILE/EXPERIMENTS/r6e-two-fld/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-two-rec/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/t8-retval/stripped/object.savf 1","savf/SC-ILE/FLOW/goto-subroutine-observable/archive.savf 3","savf/SC-ILE/FLOW/goto-subroutine-stripped/archive.savf 3","savf/SC-ILE/FLOW/return-fixed-observable/archive.savf 1","savf/SC-ILE/FLOW/return-fixed-stripped/archive.savf 1","savf/SC-ILE/MONITOR/limits-observable/archive.savf 1","savf/SC-ILE/MONITOR/limits-stripped/archive.savf 1","savf/SC-ILE/MONITOR/stripped/archive.savf 2","savf/SC-ILE/OPS/cond-not-observable/archive.savf 12","savf/SC-ILE/OPS/cond-not-stripped/archive.savf 12","savf/SC-ILE/OPS/fk-subp2-observable/archive.savf 1","savf/SC-ILE/OPS/fk-subp2-stripped/archive.savf 1","savf/SC-ILE/TSTRIP-STRIPPED/archive.savf 2","savf/SC-ILE/TSTRIP/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":897}}
# FILE-object definitions: the files of a save file name their own fields A save file that holds the files carries the record format description of every file in its library catalogue. `core/file_object.zig` reads the field and format records of the physical files (kind 0x0b90, listed as 0x1901 by the catalogue): file, format, level identifier, and per field the name, type (A, P, S), bytes, digits, decimal positions and buffer positions. Measured on 40 public PF saves (`tools/file-definitions.sh --save`) against their DSPFFD rows: all 641 fields and 101 formats equal. `savf rpgle` uses the definitions of the save file of the program when `--files` is absent and they prove every external file of the program (else the program alone, as before); `--no-file-objects` keeps the old mode, and `--files FILE.savf` reads the definitions from a separate save file of the files. `savf.zig` reads the physical-file item (name repeated in the header; the catalogue page found by its marker when the catalogue has more than one page) and keeps the catalogue image in the Archive. Display files (kind 0x1901) have another layout and are not read yet. Six twins of the c8x family (c8x-privf-2, -privf-4, -privg-1, -privg-2, -privh-1, c8x-s2-sqlfiles-1) keep their DSPFFD rows as `dspffd.json`, not `files.json`: their programs use several files of one layout, and the position naming of `rpg_file_defs.zig` then finds two fields at a buffer position and refuses the names (the matrix would turn from 0 to 4..20 failures). The save-file definitions of those twins are exact (the test compares them with the rows); the naming gap is the next work of the definitions path. ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":106,"newly_clean":102,"clean_delta":102,"base":215,"new":317},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":39},"allgroups":{"regressions":[],"newly":["rpg-corpus-captures/files-chain/stripped/object.savf 2","rpg-corpus-captures/files-display-write/stripped/object.savf 2","rpg-corpus-captures/files-logical/stripped/object.savf 2","savf/SC-CONSTRUCT/POINTER/rpg-pointer-procedure-auto/stripped/archive.savf 1","savf/SC-ILE/DSPLY/error-observable/archive.savf 2","savf/SC-ILE/DSPLY/error-stripped/archive.savf 2","savf/SC-ILE/DSPLY/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/d4-edit/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/d4-editc-codes/stripped/object.savf 16","savf/SC-ILE/EXPERIMENTS/d4-out-const/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-input/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-srcstmt-dspf/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7-args/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7c-copy/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j1/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j2/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j3/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/format-base/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/format-rename/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/gotos-auto/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/gotos-heldout/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/gotos-static/stripped/archive.savf 5","savf/SC-ILE/EXPERIMENTS/h-editc/stripped/object.savf 17","savf/SC-ILE/EXPERIMENTS/h-editc3/stripped/object.savf 24","savf/SC-ILE/EXPERIMENTS/h-editc5/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc6/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-fmix/stripped/object.savf 11","savf/SC-ILE/EXPERIMENTS/h-subind/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/loop-condition-owner-sql/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/loop-condition-owner-static/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/program-literal/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5b-onexit-for/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5c-cycle-files/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5e-date-field/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5e-editc-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5i-figurative/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5x-cycle-print/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6a-float-inz/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-reset-ds/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-fixed/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-two/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-blank/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-char/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-const/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-disk/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit1/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit2-int/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit2/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit3/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edit4/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-edita/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-editj/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-editword/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-editz/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-end/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-disk-two/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6e-ho-edit4-amt/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-editz-cnt/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-ind-const/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ho-nooflind-two/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6e-ho-oflind60-two/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/r6e-ind-fld/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-ind-rec/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-nooflind/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-num/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-oflind50/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-skip/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-space/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-three-rec/stripped/object.savf 4","savf/SC-ILE/EXPERIMENTS/r6e-two-fld/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6e-two-rec/stripped/object.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/t8-retval/stripped/object.savf 1","savf/SC-ILE/FLOW/goto-subroutine-observable/archive.savf 3","savf/SC-ILE/FLOW/goto-subroutine-stripped/archive.savf 3","savf/SC-ILE/FLOW/return-fixed-observable/archive.savf 1","savf/SC-ILE/FLOW/return-fixed-stripped/archive.savf 1","savf/SC-ILE/MONITOR/limits-observable/archive.savf 1","savf/SC-ILE/MONITOR/limits-stripped/archive.savf 1","savf/SC-ILE/MONITOR/stripped/archive.savf 2","savf/SC-ILE/OPS/cond-not-observable/archive.savf 12","savf/SC-ILE/OPS/cond-not-stripped/archive.savf 12","savf/SC-ILE/OPS/fk-subp2-observable/archive.savf 1","savf/SC-ILE/OPS/fk-subp2-stripped/archive.savf 1","savf/SC-ILE/TSTRIP-STRIPPED/archive.savf 2","savf/SC-ILE/TSTRIP/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":897}} ```
A save file that holds the files carries the record format description of
every file in its catalogue. file_object.zig reads the physical files:
format, level identifier, and per field name, type, bytes, digits and
decimals, equal to DSPFFD on 40 public saves. savf rpgle uses them when
--files is absent and they prove every external file; --no-file-objects
keeps the old mode; --files takes a .savf too. savf.zig reads the
physical-file item and keeps the catalogue.
Several files of one layout make the position naming of the definitions
find two fields at a buffer position; those twins keep their DSPFFD rows
as dspffd.json and the matrix runs them without definitions as before.
Find the library record of a many-file catalogue without accepting a damaged pointer
All checks were successful
binjovi/ci Binjovi completed the frozen plan
d51a77c4bb
The pointer of a catalogue of many files names a later page. The record is
searched from the second page on; a pointer before it or past the item is
refused as before (the damaged-catalogue mutations).
binjovi-bot manually merged commit d51a77c4bb into trunk 2026-11-01 13:58:03 +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!695
No description provided.