pub trait WithStaticwhere
    Self: GetAttributes,
{ type Info; fn compute_static(&mut self, extra: &Self::Info) -> Option<u64>; fn update_static(&mut self, extra: &Self::Info) -> Option<u64> { ... } }
Expand description

Trait to propagate and extra “static” attributes through ir::Control. Calling the update function ensures that the current program, as well as all sub-programs have a “static” attribute on them. Usage:

use calyx::analysis::compute_static::WithStatic;
let con: ir::Control = todo!(); // A complex control program
con.update(&HashMap::new());    // Compute the static information for the program

Required Associated Types

Extra information needed to compute static information for this type.

Required Methods

Compute the static information for the type if possible and update all sub-programs.

Provided Methods

Compute the static information for the type if possible and add it to its attribute. Implementors should instead implement WithStatic::compute_static and call this function on sub-programs. Ensures: All sub-programs of the type will also be updated.

Implementations on Foreign Types

Implementors