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

Classes

struct  Analysis
 Reader and writer counts for the references owned by a body. More...
 
struct  Body
 A block of steps: a flow's top level, or a loop or branch body. More...
 
struct  Expr
 A resolved expression and its stream dependencies. More...
 
struct  FlowGraph
 The executable graph of one flow. More...
 
class  GraphBuilder
 Appends to a [FlowGraph] while the resolver walks a flow. More...
 
struct  LogTail
 Resolved log or logf arguments for a statement or stage. More...
 
struct  Ref
 One plan stream. More...
 
struct  Stage
 A resolved pipeline stage. kAt extracts a field from each stream value. More...
 
struct  Step
 One resolved statement. More...
 
struct  TransferJoin
 Sparse joins retain observable owned-call and expression cleanup boundaries. More...
 
struct  TransferPlan
 Extra transfer metadata is absent on ordinary single-arrow statements. More...
 

Typedefs

using RefId = size_t
 Graph IDs are indices into the owning graph's vectors.
 
using StepId = size_t
 
using BodyId = size_t
 
using ExprId = size_t
 

Enumerations

enum class  RefKind {
  kSink , kFlowPort , kCallPort , kNode ,
  kNodeId , kCallId , kStatus , kHeader ,
  kExpr , kDerived , kZip , kMerge ,
  kWinner , kBound
}
 What a stream in the plan is. More...
 
enum class  StepKind {
  kCall , kPipe , kSkip , kWait ,
  kClose , kCancel , kAbort , kFail ,
  kLog , kCapture , kForEach , kRepeat ,
  kIf , kBlock
}
 What a statement became. More...
 

Functions

std::string_view StepKindName (StepKind kind)
 
Analysis Analyse (const FlowGraph &flow, BodyId body)
 Work out who reads and writes what in one body.
 
bool RecordsOutcome (StepKind kind)
 Whether a step records its own outcome for a bound name.
 
absl::Span< const RefId > TransferSources (const Step &step)
 
absl::Span< const RefId > TransferTargets (const Step &step)
 

Variables

constexpr size_t kNone = static_cast<size_t>(-1)
 Sentinel for an absent graph ID.
 

Typedef Documentation

◆ BodyId

using a11::flow::graph::BodyId = typedef size_t

◆ ExprId

using a11::flow::graph::ExprId = typedef size_t

◆ RefId

using a11::flow::graph::RefId = typedef size_t

Graph IDs are indices into the owning graph's vectors.

◆ StepId

using a11::flow::graph::StepId = typedef size_t

Enumeration Type Documentation

◆ RefKind

enum class a11::flow::graph::RefKind
strong

What a stream in the plan is.

Enumerator
kSink 

A virtual continuation destination and its attached writer group.

kFlowPort 

A declared port of this flow.

kCallPort 

A port of an action this flow calls: x.out.

kNode 

A node of the flow's own: a stream it can write and read back.

kNodeId 

A node's id, as one value – what a flow hands to an action that expects to be told where to write.

kCallId 

The ID assigned to a run or call, as one value.

kStatus 

The outcome of a call, a node, a port or a barrier, as a status record.

kHeader 

One header of the call running this flow, as a single value.

kExpr 

A stream of one value: an expression evaluated once.

kDerived 

One stage applied to another stream.

kZip 

Several streams read in step, as one stream of tuples: zip(a, b).

kMerge 

Several streams read at once, as one stream of their values in the order they arrive: interleave(a, b).

kWinner 

Zero-based index of the first subject to finish a wait first of.

kBound 

A stream the runtime binds per pass: a loop's value, its index, or a repeat's carry.

◆ StepKind

enum class a11::flow::graph::StepKind
strong

What a statement became.

Enumerator
kCall 
kPipe 
kSkip 
kWait 
kClose 
kCancel 
kAbort 

abort node ..: end a node with a failure rather than with an end.

kFail 
kLog 
kCapture 

Remember a stream's first value for the loop that owns this body: what <- and an until condition compile to.

kForEach 
kRepeat 
kIf 
kBlock 

[try] { ... }: a body run as one step, whose outcome is its own.

Function Documentation

◆ Analyse()

Analysis a11::flow::graph::Analyse ( const FlowGraph &  flow,
BodyId  body 
)

Work out who reads and writes what in one body.

◆ RecordsOutcome()

bool a11::flow::graph::RecordsOutcome ( StepKind  kind)
inline

Whether a step records its own outcome for a bound name.

◆ StepKindName()

std::string_view a11::flow::graph::StepKindName ( StepKind  kind)

◆ TransferSources()

absl::Span< const RefId > a11::flow::graph::TransferSources ( const Step &  step)
inline

◆ TransferTargets()

absl::Span< const RefId > a11::flow::graph::TransferTargets ( const Step &  step)
inline

Variable Documentation

◆ kNone

constexpr size_t a11::flow::graph::kNone = static_cast<size_t>(-1)
inlineconstexpr

Sentinel for an absent graph ID.