Native matrix pairs and instance records #
One call writes a six-word record (rho,piece,queries,count,X,Y) and the actual raw unsigned
zero/one matrices X : n×D and Y : D×n immediately after it. Both matrices reuse
WriteMatrices.program; all pointer arithmetic, argument delivery and record stores are charged.
The query words remain in the earlier computed catalogue and are shared by reference.
setup, writeHeader, deliverLeft, deliverRight and matrix are internal program stages.
They are exposed so that the complete catalogue controller can reuse the same fixed program.
Main definitions #
InstancePair.program: fixed thirty-two-register matrix-pair and record writer.InstancePair.leftArgs,InstancePair.rightArgs: existing matrix-writer arguments read directly from the runtime registers.
Main results #
InstancePair.exec: both exact matrices and the real record, with a combined outside frame and a40nD+38charged instruction bound before halt.
Computed A–C residue-array pointer.
Computed B–C residue-array pointer.
First word of the instance record.
Outer matrix dimension.
Padded middle matrix dimension.
Positive residue modulus.
First original vertex in the piece.
Actual number of vertices in the piece.
Query residue.
Actual query-pair pointer.
Actual number of query pairs.
Index of the original piece.
Constant one, preserved by both matrix calls.
Header cursor.
Number of words in one matrix.
Existing left-matrix arguments, with its output following the six-word record.
Existing right-matrix arguments, immediately following the left matrix.
Compute the left output pointer and matrix area with native arithmetic.
Write the actual query reference and both computed matrix pointers.
Deliver the seven remaining left-matrix arguments; its destination is already computed.
The left writer preserves its argument registers, so only the source and output pointer change for the right call.
Reuse either native matrix writer in the lower seventeen registers.
Complete record and matrix-pair construction.
Finite code independent of every runtime dimension and physical width.
Six raw unsigned record words: residue, piece index, shared query pointer/count, then the two computed matrix pointers. Matrix entries themselves are raw zero/one words.
Write both actual matrices and their shared-query instance record. The source arrays are
ordinary residue words before the output region. Existing WriteMatrices.entry supplies the
semantics; no adjacency array, execution or time contract is an input. Halt is excluded.