Notes: metadata that a tree carries and no judgment reads
Library · Source module
Notes: metadata that a tree carries and no judgment reads
NLAlib.Ops.Stmt.note n s is the tree s with the metadata n (NLAlib.Ops.Note): the name of the routine a frame runs, the source name of a bound variable, the header of a fragment. The evaluator, the counted evaluator, the static count and scratch, the storage check, linking and instrumentation treat a note as the tree it annotates; the instrumented tree has no notes, so a note adds no instruction. NLAlib.Ops.Stmt.erase removes every note, and the erased tree has the same run, count and scratch.
NLAlib.Ops.Stmt.pretty renders a tree as indented pseudocode with the names the notes give. It is a reading aid for people and tools; it is not a code emitter and nothing is proved about its output.
Main definitions
* NLAlib.Ops.Stmt.erase: the tree without its notes. * NLAlib.Ops.Stmt.pretty: the tree as pseudocode.
Main results
* NLAlib.Ops.eval_erase, NLAlib.Ops.stmtCost_erase, NLAlib.Ops.stmtPeak_erase, NLAlib.Ops.Stmt.instrument_erase: erasing notes changes no run, count or scratch.
Declarations
- NLAlib.Ops.Pretty.bufName
- NLAlib.Ops.Pretty.idxName
- NLAlib.Ops.Pretty.iexp
- NLAlib.Ops.Pretty.iexps
- NLAlib.Ops.Pretty.lines
- NLAlib.Ops.Pretty.opName
- NLAlib.Ops.Pretty.operand
- NLAlib.Ops.Pretty.operands
- NLAlib.Ops.Stmt.erase
- NLAlib.Ops.Stmt.instrument_erase
- NLAlib.Ops.Stmt.pretty
- NLAlib.Ops.eval_erase
- NLAlib.Ops.stmtCost_erase
- NLAlib.Ops.stmtPeak_erase