1use anyhow::Result;
6
7use crate::ccfg::{build, System};
8use crate::error::Diagnostics;
9use crate::tast::Tast;
10use crate::wfcheck::{check_graphs, check_protected};
11
12pub fn middle(tast: &Tast) -> Result<System> {
20 let system = build(tast)?;
21 check_protected(tast, &system)?;
22 Diagnostics::warn(check_graphs(tast, &system));
23 eprintln!(" \u{2713} Built the graphs and checked them (notified: receive-headed, receives at the head only; notified and protected: guarded choices)");
24 Ok(system)
25}