← board

pasmith: multi-unit programs

Why

Every other rung on the widening list is in ([[feature-pasmith-widen-grammar]]): records

Shape

Emit N units plus a program: each unit declares types (records, enums, exception classes), some of them referring to types from earlier units; each exports procedures and functions; the program uses them in a random order. The checksum discipline is unchanged (one number out), so the oracle machinery needs nothing new.

The real work is in the driver, not the generator: tools/pasmith_run.py currently compiles one file. It has to write a unit set to a directory, put that directory on both compilers' unit paths (fpc -Fu, pxx -Fu) and compile the program against it — and the seed must still reproduce the whole set byte-for-byte.

Acceptance

pasmith --seed N --units 3 emits a program plus 3 units that FPC accepts (the generator's contract), the driver compiles and runs the set under every oracle, and a divergence still names its statement via the trace diff. One bounded run logged here, clean or not.