package bap-std

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Class Exp.mapper

Exp mapper. By default performs deep identity mapping. Non-leaf methods deconstructs terms, calls corresponding methods on its parts and the constructs it back. So if you're overriding a non-leaf method, then make sure that you called the parent method if you want a normal traversal.

A usual template for method overriding is:

  object(self)
    inherit mapper as super
    method map_X arg=
      let x = super#map_X arg in
      do_mapping x
  end
inherit state
method map_exp : t -> t
method map_load : mem:t -> addr:t -> endian -> size -> t
method map_store : mem:t -> addr:t -> exp:t -> endian -> size -> t
method map_binop : binop -> t -> t -> t
method map_unop : unop -> t -> t
method map_cast : cast -> int -> t -> t
method map_let : var -> exp:t -> body:t -> t
method map_ite : cond:t -> yes:t -> no:t -> t
method map_extract : hi:int -> lo:int -> t -> t
method map_concat : t -> t -> t
method map_int : word -> t
method map_var : var -> t
method map_sym : var -> var
method map_unknown : string -> typ -> t
OCaml

Innovation. Community. Security.