A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::Symbol Struct Reference

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
 

Detailed Description

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.

Member Function Documentation

◆ VisibleAt()

bool a11::flow::Symbol::VisibleAt ( size_t  offset) const
inline

Member Data Documentation

◆ action

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.

◆ data_dependency

bool a11::flow::Symbol::data_dependency = false

Whether reading this lazy value can read a data or completion stream.

◆ implicit

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.

◆ kind

SymbolKind a11::flow::Symbol::kind = SymbolKind::kInputPort

◆ location

syntax::Location a11::flow::Symbol::location

◆ name

std::string a11::flow::Symbol::name

◆ pattern

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.

◆ readable

bool a11::flow::Symbol::readable = true

Whether a pipeline may read it.

◆ reads

int a11::flow::Symbol::reads = 0

How many times something read it, wrote it, or waited for it.

◆ ref

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.

◆ shape

std::string a11::flow::Symbol::shape

◆ status_reads

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.

◆ step

graph::StepId a11::flow::Symbol::step = graph::kNone

The graph step this name is: a call, or a bound wait/close.

◆ target

const FlowPlan* absl_nullable a11::flow::Symbol::target = nullptr

◆ tolerant

bool a11::flow::Symbol::tolerant = false

◆ value_type

std::optional<syntax::TypeExpression> a11::flow::Symbol::value_type

◆ visibility

syntax::Location a11::flow::Symbol::visibility

A branch-local binding's visibility, absent for unrestricted symbols.

◆ writable

bool a11::flow::Symbol::writable = false

Whether a pipe may write it.

◆ writes

int a11::flow::Symbol::writes = 0

The documentation for this struct was generated from the following file: