fic/tast/mod.rs
1//! `tast`, the typed AST: `rast` with every declaration and expression
2//! carrying its type, as two parts: [`TyEnv`], the typed environment
3//! (the declarations), and [`Bodies`], the typed bodies.
4//!
5//! The type sits on the node, as in `CompCert`'s Clight, never in a side
6//! table. Constants, `sizeof` and array lengths are folded here, each
7//! struct is laid out (C's layout, fields at their offsets), a receive binder
8//! has its channel's payload type, and a parameter or carrier its
9//! signature's. What `rast` settled stays settled: names are ids, scopes
10//! are resolved, and `tast` repeats none of those checks.
11//!
12//! [`build`] consumes `rast`'s environment and bodies. `tast` defines a
13//! node only where typing changes its content; a declaration with no type
14//! is moved in as it was: a memory region and a protection domain are the
15//! AST's nodes, a mapping and an entry point `base`'s.
16
17pub mod body;
18pub mod env;
19pub mod expr;
20mod fold;
21pub mod infoflow;
22mod ops;
23pub mod program;
24mod scope;
25pub mod system;
26pub mod ty;
27pub mod view;
28
29pub use body::{BodyVar, Comm, Event, Proc, Stmt};
30pub use env::{
31 build, build_data, build_programs, build_system, Channel, Const, Field, ForeignFn, LocalVar,
32 LocalVars, Struct, Tast, TyEnv,
33};
34pub use expr::{Call, Expr, ExprKind};
35pub use program::{Bodies, Body, EventBody, ProcBody};
36pub use ty::{ArrayLen, FfnSig, Ty};
37pub use view::ProgramView;