NLA-lib Explorer

The transfer theorems of linking

Library · Source module

The transfer theorems of linking

A theorem about an algorithm under every interpretation meeting contracts becomes a theorem about the linked program, with no new proof about the algorithm.

Main results

* Counts. NLAlib.Ops.Count.push κ is the additive map sending one call of o at the dimensions d to κ o d; with κ the cost of each implementation it is the push-forward of the counts of the algorithm to the counts of the lower operations, and with a weight it is a weighted count (NLAlib.Ops.Count.push_comp: push-forwards compose, so towers and weights are evaluated). * The certificate NLAlib.Ops.Table.Accounts: each implementation runs within the cost κ and the workspace declared for its operation. It follows from the static cost and workspace of the trees (NLAlib.Ops.Table.accounts_of_static) and says nothing of values. * NLAlib.Ops.exec_link: the simulation. NLAlib.Ops.ConditionalRuns.link, NLAlib.Ops.link_total: total correctness with counts pushed forward and the same workspace. NLAlib.Ops.ConditionalRunsL.link, NLAlib.Ops.link_liberal: partial correctness, through the induced interpretation only. NLAlib.Ops.fail_subset: failure events, sample by sample. * Weighted, data-dependent counts. NLAlib.Ops.Table.AccountsW: each implementation adds at most t o d to a weight of the lower counts; its counts need not be uniform in the data. NLAlib.Ops.ConditionalRunsW.link, NLAlib.Ops.exec_link_weight: a bound on the weight of the counts of one run of the algorithm, which may depend on the final memory, is the same bound for the linked program. The simulation is one induction for the counts and for every weight (NLAlib.Ops.Table.Accounts.toW).

Declarations