17#ifndef A11_FLOW_RESOLVE_H_
18#define A11_FLOW_RESOLVE_H_
176 bool build_graph =
false);
constexpr size_t kNone
No such thing – the absent id, for the many fields only some kinds use.
Definition graph.h:47
size_t RefId
Everything in a graph is named by index into the graph that owns it.
Definition graph.h:41
size_t StepId
Definition graph.h:42
Definition boundary.cc:32
@ kCall
A bound run/call step.
@ kHeader
A header, under its alias.
@ kNode
A node of the flow's own.
@ kBarrier
A bound wait/drain.
std::string_view SymbolKindName(SymbolKind kind)
The name of a symbol kind, for a message and for the JSON.
Definition resolve.cc:3889
ResolveResult Resolve(std::string_view source, const ParseResult &parsed, bool build_graph)
Resolve a parsed program: names, ports, scopes, node maps and types.
Definition resolve.cc:3915
SymbolKind
What a name means inside a flow.
Definition resolve.h:33
@ kOutputPort
An out port: written, never read... except by this flow, which may read back what it wrote to one onl...
@ kInputPort
An in port: read, never written.
@ kLoopVariable
A for variable, or the index every loop binds.
@ kValue
One value, read from a stream and given a name by let.
@ kCarry
What a repeat carries.
One problem found in a flow.
Definition diagnostic.h:108
One compiled flow: what a caller sees, and what the runtime will do.
Definition plan.h:149
The flows a file declares, and everything wrong with it.
Definition parser.h:32
Every flow and shape one source file declares.
Definition plan.h:185
A whole file, resolved.
Definition resolve.h:146
Program program
Definition resolve.h:147
std::vector< ResolvedFlow > flows
Definition resolve.h:148
std::vector< Diagnostic > diagnostics
Definition resolve.h:149
const Diagnostic *absl_nullable FirstError() const
Definition resolve.cc:3885
bool HasErrors() const
Definition resolve.cc:3881
One flow, resolved: its plan, its names, and what is wrong with it.
Definition resolve.h:126
const syntax::FlowDeclaration *absl_nullable declaration
The declaration this came from, borrowed.
Definition resolve.h:142
graph::FlowGraph graph
The executable graph, when [Resolve] was asked for one.
Definition resolve.h:134
FlowPlan plan
Definition resolve.h:127
std::vector< Symbol > symbols
Every symbol the flow bound, in the order it bound them.
Definition resolve.h:138
One name, what it is, and what became of it.
Definition resolve.h:67
int value_offset
Definition resolve.h:104
syntax::Location location
Definition resolve.h:70
bool tolerant
Definition resolve.h:81
bool writable
Whether a pipe may write it.
Definition resolve.h:77
int status_reads
For a call: whether anything read its status – wait x, status x, or a bound wait.
Definition resolve.h:89
graph::StepId step
The graph step this name is: a call, or a bound wait/drain.
Definition resolve.h:98
bool readable
Whether a pipeline may read it.
Definition resolve.h:75
std::string pattern
The match pattern this value came out of, where it came out of a literal one.
Definition resolve.h:116
const FlowPlan *absl_nullable target
Definition resolve.h:82
graph::RefId ref
The graph ref this name reads and writes, when a graph was built: a port, a node, a header,...
Definition resolve.h:96
bool implicit
Whether the language bound it rather than the author: the index every loop provides.
Definition resolve.h:73
SymbolKind kind
Definition resolve.h:68
std::string action
For a call: the action named, whether it was try, and the sibling flow it resolves to if it is one.
Definition resolve.h:80
std::string name
Definition resolve.h:69
int writes
Definition resolve.h:85
int reads
How many times something read it, wrote it, or waited for it.
Definition resolve.h:84
bool value_part
Whether this name is one part of a value a let took apart.
Definition resolve.h:122
graph::RefId value_source
For a value a let bound: the stream it took a value of, and which value of that stream it is.
Definition resolve.h:103
The executable graph of one flow.
Definition graph.h:390
One flow name { ... } declaration, or the one flow { ... } entry point.
Definition syntax.h:758
Where a piece of syntax starts, reduced to what every reader of it needs.
Definition syntax.h:49