|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
One name, what it is, and what became of it. More...
#include <cpp/a11/flow/resolve.h>
Public Member Functions | |
| bool | VisibleAt (size_t offset) const |
Public Attributes | |
| SymbolKind | kind = SymbolKind::kInputPort |
| std::string | name |
| syntax::Location | location |
| bool | implicit = false |
Whether the language bound it rather than the author: the index every loop provides. | |
| syntax::Location | visibility |
| A branch-local binding's visibility, absent for unrestricted symbols. | |
| bool | readable = true |
| Whether a pipeline may read it. | |
| bool | writable = false |
| Whether a pipe may write it. | |
| std::string | action |
For a call: the action named, whether it was try, and the sibling flow it resolves to if it is one. | |
| bool | tolerant = false |
| const FlowPlan *absl_nullable | target = nullptr |
| int | reads = 0 |
| How many times something read it, wrote it, or waited for it. | |
| int | writes = 0 |
| int | status_reads = 0 |
For a call: whether anything read its status – wait x, status x, or a bound wait. | |
| graph::RefId | ref = graph::kNone |
| The graph ref this name reads and writes, when a graph was built: a port, a node, a header, a loop variable. | |
| graph::StepId | step = graph::kNone |
The graph step this name is: a call, or a bound wait/close. | |
| bool | data_dependency = false |
| Whether reading this lazy value can read a data or completion stream. | |
| std::string | pattern |
The match pattern this value came out of, where it came out of a literal one. | |
| std::string | shape |
| std::optional< syntax::TypeExpression > | value_type |
One name, what it is, and what became of it.
The usage counts are here rather than in the inspector because the resolver is the pass that walks every reference: counting as it goes costs nothing, and an inspector that walked the tree again to find out would be a second implementation of name resolution.
|
inline |
| std::string a11::flow::Symbol::action |
For a call: the action named, whether it was try, and the sibling flow it resolves to if it is one.
| bool a11::flow::Symbol::data_dependency = false |
Whether reading this lazy value can read a data or completion stream.
| bool a11::flow::Symbol::implicit = false |
Whether the language bound it rather than the author: the index every loop provides.
Nothing is said about one of these going unread.
| SymbolKind a11::flow::Symbol::kind = SymbolKind::kInputPort |
| syntax::Location a11::flow::Symbol::location |
| std::string a11::flow::Symbol::name |
| std::string a11::flow::Symbol::pattern |
The match pattern this value came out of, where it came out of a literal one.
A pattern names its fields, so this is how the tooling knows what a value has without the language gaining a type system: the fields are in the text that made it. Empty for everything else, including a pattern computed at run time – nothing is known about those and offering a guess would be worse than offering nothing.
| bool a11::flow::Symbol::readable = true |
Whether a pipeline may read it.
| int a11::flow::Symbol::reads = 0 |
How many times something read it, wrote it, or waited for it.
| graph::RefId a11::flow::Symbol::ref = graph::kNone |
The graph ref this name reads and writes, when a graph was built: a port, a node, a header, a loop variable.
Memoised here because identity is the whole point – two mentions of one node are one stream, and skip n accumulates on it.
| std::string a11::flow::Symbol::shape |
| int a11::flow::Symbol::status_reads = 0 |
For a call: whether anything read its status – wait x, status x, or a bound wait.
A try whose status nobody reads is the flow ignoring the failure it just said it expected.
| graph::StepId a11::flow::Symbol::step = graph::kNone |
The graph step this name is: a call, or a bound wait/close.
| const FlowPlan* absl_nullable a11::flow::Symbol::target = nullptr |
| bool a11::flow::Symbol::tolerant = false |
| std::optional<syntax::TypeExpression> a11::flow::Symbol::value_type |
| syntax::Location a11::flow::Symbol::visibility |
A branch-local binding's visibility, absent for unrestricted symbols.
| bool a11::flow::Symbol::writable = false |
Whether a pipe may write it.
| int a11::flow::Symbol::writes = 0 |