The interface of a routine
Library · Source module
The interface of a routine
A routine (NLAlib.Ops.Routine) is a fixed tree with an interface: its dimensions and, for each operand (NLAlib.Ops.Port), how it is used (NLAlib.Ops.Access: read, written, updated in place, or isolated) and its length as a function of the dimensions. Operands are written with NLAlib.Ops.Port.read, .write, .update, .isolated. This file defines interfaces and the separation they require; the judgment and certificates are in NLAlib/Ops/Routine.lean.
An operand may continue the operand before it (NLAlib.Ops.Port.continuing): its block is in the same buffer and starts where that block ends, as the columns appended to a stored basis. Its position is fixed by the interface, so a call supplies one operand for each region of the interface (NLAlib.Ops.Port.regions), and NLAlib.Ops.Routine.operands gives the positions of all operands. Separation is required of the regions.
A written operand may be unreported (NLAlib.Ops.Port.unreported): the judgment says nothing of its final contents. Caller-supplied scratch and a matrix destroyed in place are such operands.
The separation of operands is one of two fixed rules named by the interface (NLAlib.Ops.Separation: by buffer, or by block so that operands may be disjoint blocks of one buffer); the author cannot state another. Under either rule, operands that are only read may overlap, except an isolated one.
A routine declares the number of tape positions it draws; one whose draws depend on the data declares none.
Main definitions
* NLAlib.Ops.Access, NLAlib.Ops.Port, NLAlib.Ops.Routine: interfaces and routines. * NLAlib.Ops.Separation, NLAlib.Ops.Routine.SeparatedAt: the two fixed separation rules and the separation a routine requires.
Main results
* NLAlib.Ops.Routine.separated_iff_pairwise: separation by buffer is a condition on pairs of operands.
Declarations
- NLAlib.Ops.Access
- NLAlib.Ops.Access.apart
- NLAlib.Ops.Access.isIsolated
- NLAlib.Ops.Access.join
- NLAlib.Ops.Access.ofNat
- NLAlib.Ops.Access.ofNat_ctorIdx
- NLAlib.Ops.Access.readOnly
- NLAlib.Ops.Access.readable
- NLAlib.Ops.Access.writable
- NLAlib.Ops.Port
- NLAlib.Ops.Port.continuing
- NLAlib.Ops.Port.every
- NLAlib.Ops.Port.flat
- NLAlib.Ops.Port.fst_mem_of_mem_place
- NLAlib.Ops.Port.fst_mem_of_mem_placeFrom
- NLAlib.Ops.Port.isolated
- NLAlib.Ops.Port.place
- NLAlib.Ops.Port.placeFrom
- NLAlib.Ops.Port.placeFrom_of_flat
- NLAlib.Ops.Port.place_of_flat
- NLAlib.Ops.Port.read
- NLAlib.Ops.Port.regions
- NLAlib.Ops.Port.regionsFrom
- NLAlib.Ops.Port.regionsFrom_of_flat
- NLAlib.Ops.Port.regions_of_flat
- NLAlib.Ops.Port.unreported
- NLAlib.Ops.Port.update
- NLAlib.Ops.Port.view
- NLAlib.Ops.Port.write
- NLAlib.Ops.Routine
- NLAlib.Ops.Routine.Separated
- NLAlib.Ops.Routine.Separated.blocks
- NLAlib.Ops.Routine.Separated.ne
- NLAlib.Ops.Routine.SeparatedAt
- NLAlib.Ops.Routine.SeparatedAt.regionBlocks
- NLAlib.Ops.Routine.SeparatedAt.regions
- NLAlib.Ops.Routine.SeparatedBlocks
- NLAlib.Ops.Routine.apartAll
- NLAlib.Ops.Routine.apartAt
- NLAlib.Ops.Routine.apartFrom
- NLAlib.Ops.Routine.arity
- NLAlib.Ops.Routine.arity_of_flat
- NLAlib.Ops.Routine.contiguous
- NLAlib.Ops.Routine.env
- NLAlib.Ops.Routine.env_of_binds_eq_none
- NLAlib.Ops.Routine.flat
- NLAlib.Ops.Routine.lens
- NLAlib.Ops.Routine.live_env
- NLAlib.Ops.Routine.live_operands
- NLAlib.Ops.Routine.mem_of_mem_env
- NLAlib.Ops.Routine.operands
- NLAlib.Ops.Routine.operands_of_flat
- NLAlib.Ops.Routine.readArgs
- NLAlib.Ops.Routine.readLens
- NLAlib.Ops.Routine.regions
- NLAlib.Ops.Routine.regions_of_flat
- NLAlib.Ops.Routine.roArgs
- NLAlib.Ops.Routine.roLens
- NLAlib.Ops.Routine.sel
- NLAlib.Ops.Routine.sel_eq_nil
- NLAlib.Ops.Routine.separatedAt_of_apartAll
- NLAlib.Ops.Routine.separatedAt_of_blocks
- NLAlib.Ops.Routine.separatedAt_of_regions
- NLAlib.Ops.Routine.separatedAt_of_separated
- NLAlib.Ops.Routine.separatedBlocks_of_contiguous
- NLAlib.Ops.Routine.separatedBlocks_of_noIsolated
- NLAlib.Ops.Routine.separated_iff_pairwise
- NLAlib.Ops.Routine.separated_of_apartAll
- NLAlib.Ops.Routine.views
- NLAlib.Ops.Routine.writeArgs
- NLAlib.Ops.Routine.writeLens
- NLAlib.Ops.Separation
- NLAlib.Ops.Separation.ofNat
- NLAlib.Ops.Separation.ofNat_ctorIdx
- NLAlib.Ops.Stride