charon_lib::transform::ctx

Trait UllbcPass

source
pub trait UllbcPass: Sync {
    // Provided methods
    fn transform_body(&self, _ctx: &mut TransformCtx, _body: &mut ExprBody) { ... }
    fn transform_function(&self, ctx: &mut TransformCtx, decl: &mut FunDecl) { ... }
    fn transform_ctx(&self, ctx: &mut TransformCtx) { ... }
    fn name(&self) -> &str { ... }
    fn log_before_body(
        &self,
        ctx: &TransformCtx,
        name: &Name,
        body: Result<&ExprBody, &Opaque>,
    ) { ... }
}
Expand description

A pass that modifies ullbc bodies.

Provided Methods§

source

fn transform_body(&self, _ctx: &mut TransformCtx, _body: &mut ExprBody)

Transform a body.

source

fn transform_function(&self, ctx: &mut TransformCtx, decl: &mut FunDecl)

Transform a function declaration. This forwards to transform_body by default.

source

fn transform_ctx(&self, ctx: &mut TransformCtx)

Transform the given context. This forwards to the other methods by default.

source

fn name(&self) -> &str

The name of the pass, used for debug logging. The default implementation uses the type name.

source

fn log_before_body( &self, ctx: &TransformCtx, name: &Name, body: Result<&ExprBody, &Opaque>, )

Log that the pass is about to be run on this body.

Implementors§

source§

impl UllbcPass for charon_lib::transform::duplicate_return::Transform

source§

impl UllbcPass for charon_lib::transform::filter_unreachable_blocks::Transform

source§

impl UllbcPass for charon_lib::transform::merge_goto_chains::Transform

source§

impl UllbcPass for charon_lib::transform::ops_to_function_calls::Transform

source§

impl UllbcPass for charon_lib::transform::reconstruct_asserts::Transform

source§

impl UllbcPass for charon_lib::transform::reconstruct_boxes::Transform

source§

impl UllbcPass for charon_lib::transform::remove_arithmetic_overflow_checks::Transform

source§

impl UllbcPass for charon_lib::transform::remove_dynamic_checks::Transform

source§

impl UllbcPass for charon_lib::transform::simplify_constants::Transform

source§

impl UllbcPass for charon_lib::transform::skip_trait_refs_when_known::Transform

source§

impl UllbcPass for charon_lib::transform::update_block_indices::Transform

source§

impl UllbcPass for charon_lib::transform::update_closure_signatures::Transform