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

The executable graph of one flow. More...

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

Public Member Functions

std::vector< RefId > Upstreams (RefId ref) const
 The refs this one reads as streams to produce itself.
 
std::vector< RefId > ValueRefs (RefId ref) const
 The refs this one reads for their first value to produce itself.
 
std::vector< RefId > Sources (StepId step) const
 The refs a step reads as streams, one entry per independent read.
 
std::vector< RefId > ValueSources (StepId step) const
 The refs a step reads for one value each.
 
std::vector< RefId > Destinations (StepId step) const
 The refs a step writes, one entry per independent writer.
 
std::vector< RefId > StageDestinations (StepId step) const
 The refs the stages a step reads write to: a try ... into failures.
 
std::vector< RefId > Observed (StepId step) const
 Written refs a step only watches, without writing them itself.
 
std::vector< BodyId > NestedBodies (BodyId body) const
 Every body inside this one, at any depth.
 

Public Attributes

std::string name
 
std::vector< Ref > refs
 
std::vector< Step > steps
 
std::vector< Body > bodies
 
std::vector< Expr > exprs
 
BodyId root = kNone
 The flow's top level.
 

Detailed Description

The executable graph of one flow.

Borrows the syntax tree. Every expression here points into the [ParseResult] the flow was resolved from, because an expression is evaluated by walking it and copying the tree per flow would be paying for a second one. So a graph is only valid while that parse result lives, and whatever owns a registered flow owns both.

Member Function Documentation

◆ Destinations()

std::vector< RefId > a11::flow::graph::FlowGraph::Destinations ( StepId  step) const

The refs a step writes, one entry per independent writer.

◆ NestedBodies()

std::vector< BodyId > a11::flow::graph::FlowGraph::NestedBodies ( BodyId  body) const

Every body inside this one, at any depth.

◆ Observed()

std::vector< RefId > a11::flow::graph::FlowGraph::Observed ( StepId  step) const

Written refs a step only watches, without writing them itself.

◆ Sources()

std::vector< RefId > a11::flow::graph::FlowGraph::Sources ( StepId  step) const

The refs a step reads as streams, one entry per independent read.

◆ StageDestinations()

std::vector< RefId > a11::flow::graph::FlowGraph::StageDestinations ( StepId  step) const

The refs the stages a step reads write to: a try ... into failures.

A stage is part of a stream rather than of a statement, so its destination is reached through the refs the step reads rather than off the step itself. Counted as a writer beside [Destinations] and released with the step, which is what closes a failure stream exactly once however many values went to it.

◆ Upstreams()

std::vector< RefId > a11::flow::graph::FlowGraph::Upstreams ( RefId  ref) const

The refs this one reads as streams to produce itself.

◆ ValueRefs()

std::vector< RefId > a11::flow::graph::FlowGraph::ValueRefs ( RefId  ref) const

The refs this one reads for their first value to produce itself.

◆ ValueSources()

std::vector< RefId > a11::flow::graph::FlowGraph::ValueSources ( StepId  step) const

The refs a step reads for one value each.

Member Data Documentation

◆ bodies

std::vector<Body> a11::flow::graph::FlowGraph::bodies

◆ exprs

std::vector<Expr> a11::flow::graph::FlowGraph::exprs

◆ name

std::string a11::flow::graph::FlowGraph::name

◆ refs

std::vector<Ref> a11::flow::graph::FlowGraph::refs

◆ root

BodyId a11::flow::graph::FlowGraph::root = kNone

The flow's top level.

◆ steps

std::vector<Step> a11::flow::graph::FlowGraph::steps

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