fic/rast/mod.rs
1//! `rast`, the resolved AST: the program as written, with every name an
2//! id.
3//!
4//! Every reference names the node it denotes: a channel its endpoint PDs,
5//! a mapping its region, a call its foreign function, a variable its
6//! declaration. Duplicates are rejected, and the vaddrs allocated once
7//! every program is resolved. Types stay as written (`TypeRef`), and
8//! constants unevaluated.
9//!
10//! `rast` defines a node only where resolution changes its content and
11//! typing changes it again (one typing leaves as resolved is `base`'s); a
12//! declaration that names nothing (a memory region, a protection domain) is
13//! the AST's own node, cloned into its arena. `rast` owns all its data, so
14//! the AST can be dropped once it is built.
15
16pub mod body;
17mod data;
18mod desugar;
19pub mod env;
20pub mod expr;
21mod mkids;
22pub mod program;
23pub mod scope;
24pub mod system;
25mod vaddr;
26mod validation;
27
28pub use body::{Bodies, Body, BodyVar, Comm, Event, EventBody, Proc, ProcBody, Stmt};
29pub use env::{
30 build, build_data, build_programs, build_system, lay_out, Channel, Const, Env, Field,
31 ForeignFn, LocalVar, LocalVars, Rast, Struct,
32};
33pub use expr::{Expr, ExprKind};