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

One resolved statement. More...

#include <cpp/a11/flow/graph.h>

Classes

struct  VariableUpdate
 Outer values updated by a child body, with its per-body input versions. More...
 

Public Attributes

StepId phase_gate = kNone
 
bool scope_barrier = false
 
std::vector< StepId > preceding_steps
 
StepKind kind = StepKind::kPipe
 
std::string label
 The name this step is known by: a bound name, or action/for/if with a #2 after it where one label is used twice.
 
BodyId body = kNone
 
std::vector< StepId > after
 What it waits for.
 
syntax::Location location
 
bool deferred = false
 
StepId activation = kNone
 
std::string action
 kCall.
 
std::string mode
 
std::string node_map
 
std::optional< absl::Duration > timeout
 
StepId deadline = kNone
 
StepId timeout_value = kNone
 
bool tee = false
 
bool tolerant = false
 
std::vector< std::pair< std::string, ExprId > > headers
 
std::vector< std::string > forward
 
ExprId action_id = kNone
 
absl::flat_hash_map< std::string, RefId > ports
 Every port of this call that the flow wired up, by direction:name.
 
RefId status = kNone
 Its outcome, once something has asked for one.
 
RefId source = kNone
 kPipe reads and writes these refs. kCapture reads source.
 
RefId destination = kNone
 
std::shared_ptr< TransferPlan > transfer
 
RefId sink = kNone
 The observed continuation group produced by this operation, if any.
 
bool discard = false
 kPipe: -> _, which reads the stream and keeps nothing.
 
std::vector< ExprId > expression_cleanups
 
std::optional< long long > count
 kSkip: skip n port, which claims no reader slot – the count is applied where the stream is produced and this step has nothing left to do.
 
std::string slot
 kCapture: which slot of the enclosing loop it fills.
 
RefId outcome = kNone
 kWait/kClose: the outcome read, and whether a bad one is this flow's business or the subject's.
 
std::vector< RefId > subjects
 kWait: the outcomes of a wait first of / wait all of, in the order they were written.
 
std::vector< bool > subject_tolerant
 
bool race = false
 kWait: whether the first subject to finish is enough.
 
RefId winner = kNone
 kWait: the value a race is – which subject won – for whoever reads it.
 
StepId target = kNone
 kCancel: the call to stop.
 
ExprId code = kNone
 kFail.
 
ExprId message = kNone
 
std::string code_name
 Canonical code written as a word, such as fail not_found "...".
 
LogTail log
 kLog: the level, the format and what fills it.
 
std::vector< BodyId > bodies
 kForEach, kRepeat, kIf: the bodies nested here, in reading order.
 
RefId item = kNone
 kForEach: the value and the index each pass binds.
 
RefId index = kNone
 
int parallel = 1
 
ExprId parallel_expression = kNone
 
RefId carry = kNone
 kRepeat: what it carries, where the next pass's value comes from, and when it stops.
 
RefId carry_source = kNone
 
syntax::Constant start
 
std::optional< int > max_iterations
 max n, where one was written; nothing means the loop is bounded only by its condition.
 
ExprId condition = kNone
 
bool stop_when = true
 
std::vector< VariableUpdate > variable_updates
 

Detailed Description

One resolved statement.

Member Data Documentation

◆ action

std::string a11::flow::graph::Step::action

kCall.

◆ action_id

ExprId a11::flow::graph::Step::action_id = kNone

◆ activation

StepId a11::flow::graph::Step::activation = kNone

◆ after

std::vector<StepId> a11::flow::graph::Step::after

What it waits for.

◆ bodies

std::vector<BodyId> a11::flow::graph::Step::bodies

kForEach, kRepeat, kIf: the bodies nested here, in reading order.

An if has two; the loops have one.

◆ body

BodyId a11::flow::graph::Step::body = kNone

◆ carry

RefId a11::flow::graph::Step::carry = kNone

kRepeat: what it carries, where the next pass's value comes from, and when it stops.

◆ carry_source

RefId a11::flow::graph::Step::carry_source = kNone

◆ code

ExprId a11::flow::graph::Step::code = kNone

kFail.

◆ code_name

std::string a11::flow::graph::Step::code_name

Canonical code written as a word, such as fail not_found "...".

code is unset when this field is set.

◆ condition

ExprId a11::flow::graph::Step::condition = kNone

◆ count

std::optional<long long> a11::flow::graph::Step::count

kSkip: skip n port, which claims no reader slot – the count is applied where the stream is produced and this step has nothing left to do.

◆ deadline

StepId a11::flow::graph::Step::deadline = kNone

◆ deferred

bool a11::flow::graph::Step::deferred = false

◆ destination

RefId a11::flow::graph::Step::destination = kNone

◆ discard

bool a11::flow::graph::Step::discard = false

kPipe: -> _, which reads the stream and keeps nothing.

The opposite end of the language from a counted skip: that one is elided, because the values were already taken where the stream is produced and the step has nothing left to do. A discard is performed – every stage on the pipeline runs, and the values are dropped only once there is nowhere left for them to go. So this is a step with a reader slot (see [FlowGraph::Sources]) and no destination at all: destination is kNone, nothing counts as a writer of anything, and no data is kept.

◆ expression_cleanups

std::vector<ExprId> a11::flow::graph::Step::expression_cleanups

◆ forward

std::vector<std::string> a11::flow::graph::Step::forward

◆ headers

std::vector<std::pair<std::string, ExprId> > a11::flow::graph::Step::headers

◆ index

RefId a11::flow::graph::Step::index = kNone

◆ item

RefId a11::flow::graph::Step::item = kNone

kForEach: the value and the index each pass binds.

◆ kind

StepKind a11::flow::graph::Step::kind = StepKind::kPipe

◆ label

std::string a11::flow::graph::Step::label

The name this step is known by: a bound name, or action/for/if with a #2 after it where one label is used twice.

◆ location

syntax::Location a11::flow::graph::Step::location

◆ log

LogTail a11::flow::graph::Step::log

kLog: the level, the format and what fills it.

◆ max_iterations

std::optional<int> a11::flow::graph::Step::max_iterations

max n, where one was written; nothing means the loop is bounded only by its condition.

See [syntax::Repeat::max_iterations].

◆ message

ExprId a11::flow::graph::Step::message = kNone

◆ mode

std::string a11::flow::graph::Step::mode

◆ node_map

std::string a11::flow::graph::Step::node_map

◆ outcome

RefId a11::flow::graph::Step::outcome = kNone

kWait/kClose: the outcome read, and whether a bad one is this flow's business or the subject's.

◆ parallel

int a11::flow::graph::Step::parallel = 1

◆ parallel_expression

ExprId a11::flow::graph::Step::parallel_expression = kNone

◆ phase_gate

StepId a11::flow::graph::Step::phase_gate = kNone

◆ ports

absl::flat_hash_map<std::string, RefId> a11::flow::graph::Step::ports

Every port of this call that the flow wired up, by direction:name.

◆ preceding_steps

std::vector<StepId> a11::flow::graph::Step::preceding_steps

◆ race

bool a11::flow::graph::Step::race = false

kWait: whether the first subject to finish is enough.

◆ scope_barrier

bool a11::flow::graph::Step::scope_barrier = false

◆ sink

RefId a11::flow::graph::Step::sink = kNone

The observed continuation group produced by this operation, if any.

◆ slot

std::string a11::flow::graph::Step::slot

kCapture: which slot of the enclosing loop it fills.

◆ source

RefId a11::flow::graph::Step::source = kNone

kPipe reads and writes these refs. kCapture reads source.

◆ start

syntax::Constant a11::flow::graph::Step::start

◆ status

RefId a11::flow::graph::Step::status = kNone

Its outcome, once something has asked for one.

◆ stop_when

bool a11::flow::graph::Step::stop_when = true

◆ subject_tolerant

std::vector<bool> a11::flow::graph::Step::subject_tolerant

◆ subjects

std::vector<RefId> a11::flow::graph::Step::subjects

kWait: the outcomes of a wait first of / wait all of, in the order they were written.

Empty for the single-subject form, whose one outcome is outcome – which is also the first of these, so anything reading a wait's outcome keeps working without knowing which form it was.

◆ target

StepId a11::flow::graph::Step::target = kNone

kCancel: the call to stop.

◆ tee

bool a11::flow::graph::Step::tee = false

◆ timeout

std::optional<absl::Duration> a11::flow::graph::Step::timeout

◆ timeout_value

StepId a11::flow::graph::Step::timeout_value = kNone

◆ tolerant

bool a11::flow::graph::Step::tolerant = false

◆ transfer

std::shared_ptr<TransferPlan> a11::flow::graph::Step::transfer

◆ variable_updates

std::vector<VariableUpdate> a11::flow::graph::Step::variable_updates

◆ winner

RefId a11::flow::graph::Step::winner = kNone

kWait: the value a race is – which subject won – for whoever reads it.

kNone where nothing does, and on the forms that have no winner.


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