Expand description
Program transforms: host intentions expressed as changes to the program rather than as runtime behavior around it.
A host that wants to inject a value, observe a scope, or otherwise shape a run does so by rewriting the program and compiling the result. The program’s own typing, lifecycle classification, and engine selection then apply to the host’s additions exactly as they apply to the author’s.
Structs§
- Declared
Wires - Every scope of a parsed program, by name.
- Scope
Wires - What a scope of a parsed program binds, by name.
Functions§
- add_
tiles - Add
tilesa host built from what it holds to the program, astilestatements at its top level. - assign_
values - Assign
name=valuetext to externs and inputs by rewriting their declarations. - convert_
input - Let the program’s
extern nametake a value of any type, converted in front of each reader by a converter node (input_variance.md §6). - declared_
wires - Read
DeclaredWiresfrom a parsed program. - each_
piece - Apply
fto every piece of a template, then to every piece nested in a projection body or a branch arm, depth first. - each_
statement - Apply
fto every statement instatements, then to every statement nested in a module body or aforbody, depth first. - each_
tile - Apply
fto every tile the subtree declares, module andforbodies included. - parse_
assignment - Split
name=valuetext into its parts. - tile_
named - The tile bound to
namein the subtree, for a transform qualified to one definition.