builder#
The builder module allows Tierkreis graphs to be constructed concisely using decorated functions and context managers.
Functions
Add a constant value to the graph. |
|
Make a struct from some values, treating them like a python tuple, with member position indices used to generate the field labels. |
|
Utility function to rename the inputs of a thunk (runtime graph value). |
|
Utility to rename the outputs of a thunk (runtime graph value). |
|
Add a tag node to the graph, tagging the value with the provided tag string and producing a |
|
Add a constant as a variant value tagged by its type, to be used with Union type annotations. |
|
Unpack a struct containing python tuple fields, up to the first_n fields. |
|
Decorator to build a closure TierkreisGraph inside a builder context. |
|
The current GraphBuilder context. |
|
The current GraphBuilder's graph. |
|
Convert a function into a TierkreisGraph. |
|
Decorate a function to build a TierkreisGraph when it is called. |
|
Decorator to build a loop body TierkreisGraph inside a builder context. |
Classes
Exit the loop with the provided output. |
|
Graph builder for closures which capture inputs from outer scopes. |
|
Define a graph to handle a specific variant in a Match block. |
|
Exit the current iteration of a loop and continue to the next with the provided output. |
|
Inserts a copy of an underlying ValueSource whenever an outgoing edge is added unless there are no existing uses of the underlying ValueSource (=> the wire is routed from the underlying ValueSource) |
|
Utility to build an if/else block, adds a Match node when called. |
|
A Tierkreis function - i.e. provided by a worker, or a builtin. |
|
Builder context that maintains a graph state and allows adding nodes within the context. |
|
Utility to build an if/else block, adds a Match node when called. |
|
Define an if/else block. |
|
Context to lazily build a graph from a decorated function. |
|
Pattern match on a variant value by providing a Case for each variant. |
|
Namespace of functions and sub-namespaces. |
|
Set the outputs of a graph to the provided values. |
|
Magic for lazily creating nodes (and returning ports thereof). |
|
Build a sub graph to be executed at a specific Location. |
|
Extends the contract of PortFunc, as documented for the resolve method |
|
Utility to call a thunk (a graph) as a function. |
|
Utility class representing an unpacked field of a struct. |
Exceptions
Duplicate blocks, avoid multiple If/Else or duplicate Case blocks. |
|
Adding of nodes not valid in _CaseScope outside child blocks. |
|
Expression not valid outside GraphBuilder with context |