NLA-lib Explorer

Admitted inputs, their problem, and the problem of a routine

Library · Source module

Admitted inputs, their problem, and the problem of a routine

A certificate is about a problem: the sizes admitted, the inputs admitted at each size, and the buffers supplied for them. This file builds that problem from a record of mathematics, so that its author states mathematics only, and a reader of the problem reads nothing about routines.

A NLAlib.Ops.Codec says what a buffer holds: a scalar, a vector, a matrix, a tuple of these, or raw words. Encoding and decoding are mutually inverse at the length of the buffer.

NLAlib.Ops.Inputs gives the admitted sizes (valid), the type of the inputs at each size (In), the admitted inputs (accepts), and for every supplied buffer a NLAlib.Ops.Slot:

* stored c get: the buffer holds the encoding by c of the component get of the inputs; * derived len f: the buffer holds the words f of the inputs, a quantity computed from them (a threshold, say). This is the only way a buffer may depend on the inputs otherwise than by holding one of them, and NLAlib.Ops.Inputs.derived lists these buffers; * blank len: the buffer is len uninitialised cells.

The inputs are determined by the stored buffers and the declared unstored part (faithful): no other input is in no buffer. NLAlib.Ops.Inputs.Oracles declares the operations of a model through which unstored data is reached.

NLAlib.Ops.Inputs.problem is the problem: the supplied buffers are exactly those of the slots, and nothing else is admitted. So an input of the problem is an admitted tuple of inputs and conversely (NLAlib.Ops.Inputs.inputEquiv): the certificate covers every input that satisfies accepts.

A NLAlib.Ops.Routine.Domain of a routine is such a record together with two proofs that it agrees with the interface of the routine (shape, fits): the sizes are the dimensions, an operand that is read is stored or derived, an operand that is only written is blank, and the lengths are those of the ports. The proofs are what the certificate of the routine on the problem needs (NLAlib.Ops.Routine.Domain.algorithm); the problem does not depend on them.

Main definitions

* NLAlib.Ops.Codec: what a buffer holds. * NLAlib.Ops.Slot: the buffer supplied at a position. * NLAlib.Ops.Inputs, NLAlib.Ops.Inputs.problem: the admitted inputs and their problem. * NLAlib.Ops.Inputs.Oracles: the operations through which unstored inputs are reached. * NLAlib.Ops.Inputs.Checked: what a certificate states, as one proposition. * NLAlib.Ops.Routine.Domain: admitted inputs that follow the interface of a routine. * NLAlib.Ops.Routine.Domain.algorithm: the certificate of a routine on its problem.

Main results

* NLAlib.Ops.Inputs.inputEquiv, NLAlib.Ops.Inputs.covers: the inputs of the problem are the admitted inputs. * NLAlib.Ops.Routine.Domain.readBlocks_initial, NLAlib.Ops.Routine.Domain.room_initial: the initial memory holds the blocks read and has room for the blocks written. * NLAlib.Ops.Inputs.checked, NLAlib.Ops.Inputs.checked_all: every certificate states NLAlib.Ops.Inputs.Checked, and its bounds one by one with the payload of the slots. * NLAlib.Ops.Mem.Holds, NLAlib.Ops.Mem.holds_decode: a buffer holds a value; a block read from it is the encoding of its value.

Declarations