Testing the register file #
The read-only half of what a wide machine does with its registers. A program has to ask questions about a whole register before it can act on it – is the mirror equal to the target?, is it zero?, has the working cell reached the end of the tape? – and each of them is one pass:
walk the file downwards in the passing state; at the first register that fails the test, drop into the failing state and stay there.
DescriptiveComplexity.IxFile.reachesIn_fileTest is that pass, at an arbitrary
property P of the registers. It writes nothing – the tape it ends with is the
tape it started with – so a program may run as many tests as it likes between two
computations and disturb neither.
The verdict comes back in the state, as
DescriptiveComplexity.accStateAfter WMLe P qy qn bot, which
DescriptiveComplexity.accStateAfter_bot_pos and
DescriptiveComplexity.accStateAfter_bot_neg read as the two cases: the passing
state exactly when every register passes. A caller instantiates P with whatever
it is asking – two tracks agree, a track is clear, a track is set – and the
transitions it supplies say how to see that in one symbol.
A pass costs one move per register plus the step off the file, so a caller that is counting bounds the moves – the addresses between consecutive registers – and gets the product.
A test of the register file. From the last register in the passing state,
the machine walks down the file and arrives just below the first register in the
state the verdict names: passing exactly when every register passed
(DescriptiveComplexity.accStateAfter_bot_pos,
DescriptiveComplexity.accStateAfter_bot_neg). The tape is untouched throughout.
Instantiate P with the question: these two tracks agree at this register,
this track is clear here, this track is set here. The transitions the caller
supplies are then a single symbol comparison each. The cost is one move per
register, each bounded by w, plus the step off the file.
Dependency graph
A test of the register file, the budget forgotten.
Dependency graph
A test of the register file the input channel marks.