package sawja

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type unindexed_var = Cmn.unindexed_var =
  1. | OriginalVar of int * string option
  2. | TempVar of int
  3. | CatchVar of int
  4. | BranchVar of int * int
  5. | BranchVar2 of int * int
  6. | SSAVar of var * int
  7. | FreshVar of int
and var = int * unindexed_var
val var_equal : var -> var -> bool
val varname : string
val tempname : string
val branchvarname : string
val branchvarname2 : string
val freshvarname : string
val var_name_debug : ('a * unindexed_var) -> string option
val catch_var : ('a * unindexed_var) -> bool
val temp_var : ('a * unindexed_var) -> bool
val ssa_var : ('a * unindexed_var) -> bool
val unindexed_var_name : unindexed_var -> string
val var_name : ('a * unindexed_var) -> string
val unindexed_var_name_g : unindexed_var -> string
val var_name_g : ('a * unindexed_var) -> string
val unindexed_bc_num : unindexed_var -> int option
val bc_num : ('a * unindexed_var) -> int option
val index : ('a * 'b) -> 'a
val var_orig : ('a * unindexed_var) -> bool
val var_origin : ('a * unindexed_var) -> var
val var_ssa_index : ('a * unindexed_var) -> int
val make_var_ssa : var -> int -> unindexed_var
module DicoVarMap = Cmn.DicoVarMap
type dictionary = Cmn.dictionary = {
  1. mutable var_map : var DicoVarMap.t;
  2. mutable var_next : int;
}
val make_dictionary : unit -> dictionary
val make_var : dictionary -> unindexed_var -> var
val make_array_var : dictionary -> (int * unindexed_var) array
val make_dictionary_from : var array -> dictionary
module VarSet = Cmn.VarSet
module VarMap = Cmn.VarMap
type exception_handler = Cmn.exception_handler = {
  1. e_start : int;
  2. e_end : int;
  3. e_handler : int;
  4. e_catch_type : Javalib_pack.JBasics.class_name option;
  5. e_catch_var : var;
}
val generic_exception_edges : 'a array -> exception_handler list -> (int * exception_handler) list
val print_handler : exception_handler -> string
type const = [
  1. | `ANull
  2. | `Class of Javalib_pack.JBasics.object_type
  3. | `Double of float
  4. | `Float of float
  5. | `Int of int32
  6. | `Long of int64
  7. | `MethodHandle of Javalib_pack.JBasics.method_handle
  8. | `MethodType of Javalib_pack.JBasics.method_descriptor
  9. | `String of Javalib_pack.JBasics.jstr
]
type conv = Cmn.conv =
  1. | I2L
  2. | I2F
  3. | I2D
  4. | L2I
  5. | L2F
  6. | L2D
  7. | F2I
  8. | F2L
  9. | F2D
  10. | D2I
  11. | D2L
  12. | D2F
  13. | I2B
  14. | I2C
  15. | I2S
type comp = Cmn.comp =
  1. | DG
  2. | DL
  3. | FG
  4. | FL
  5. | L
type binop = Cmn.binop =
  1. | ArrayLoad of Javalib_pack.JBasics.value_type
  2. | Add of Javalib_pack.JBasics.jvm_basic_type
  3. | Sub of Javalib_pack.JBasics.jvm_basic_type
  4. | Mult of Javalib_pack.JBasics.jvm_basic_type
  5. | Div of Javalib_pack.JBasics.jvm_basic_type
  6. | Rem of Javalib_pack.JBasics.jvm_basic_type
  7. | IShl
  8. | IShr
  9. | IAnd
  10. | IOr
  11. | IXor
  12. | IUshr
  13. | LShl
  14. | LShr
  15. | LAnd
  16. | LOr
  17. | LXor
  18. | LUshr
  19. | CMP of comp
type virtual_call_kind = Cmn.virtual_call_kind =
  1. | VirtualCall of Javalib_pack.JBasics.object_type
  2. | InterfaceCall of Javalib_pack.JBasics.class_name
val basic_to_num : [< `Double | `Float | `Int2Bool | `Long ] -> [> `Double | `Float | `Int | `Long ]
val jconst2const : [< `ANull | `Byte of int | `Class of 'a | `Double of 'b | `Float of 'c | `Int of int32 | `Long of 'd | `MethodHandle of 'e | `MethodType of 'f | `Short of int | `String of 'g ] -> [> `ANull | `Class of 'a | `Double of 'b | `Float of 'c | `Int of int32 | `Long of 'd | `MethodHandle of 'e | `MethodType of 'f | `String of 'g ]
val print_const : [< `ANull | `Byte of int | `Class of Javalib_pack.JBasics.object_type | `Double of float | `Float of float | `Int of int32 | `Long of int64 | `MethodHandle of 'a | `MethodType of 'b | `Short of int | `String of Javalib_pack.JBasics.jstr ] -> string
val print_unop : unop -> string
val print_binop : binop -> string
val print_typ : Javalib_pack.JBasics.value_type -> string
type phi_node = Cmn.phi_node = {
  1. def : var;
  2. use : var array;
}
val print_phi_node : ?phi_simpl:bool -> phi_node -> string
val print_phi_nodes : ?phi_simpl:bool -> phi_node list -> string
val app_phi_nodes : bool -> int -> int array -> phi_node list -> string list -> string list
exception No_memory_ssa_info_here
type memory_ssa_info = Cmn.memory_ssa_info = {
  1. mem_ssa_in : int -> int;
  2. mem_ssa_out : int -> int;
  3. mem_ssa_phi : int -> int * int array;
}
type formula =
  1. | Atom of [ `Eq | `Ge | `Gt | `Le | `Lt | `Ne ] * expr * expr
  2. | BoolVar of expr
  3. | And of formula * formula
  4. | Or of formula * formula
type opexpr =
  1. | Uninit of Javalib_pack.JBasics.class_name * int
  2. | E of expr
type check =
  1. | CheckNullPointer of expr
  2. | CheckArrayBound of expr * expr
  3. | CheckArrayStore of expr * expr
  4. | CheckNegativeArraySize of expr
  5. | CheckCast of expr * Javalib_pack.JBasics.object_type
  6. | CheckArithmetic of expr
type instr =
  1. | Nop
  2. | AffectVar of var * expr
  3. | AffectArray of expr * expr * expr
  4. | AffectField of expr * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.field_signature * expr
  5. | AffectStaticField of Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.field_signature * expr
  6. | Alloc of var * Javalib_pack.JBasics.class_name
  7. | Goto of int
  8. | Ifd of [ `Eq | `Ge | `Gt | `Le | `Lt | `Ne ] * expr * expr * int
  9. | Throw of expr
  10. | Return of expr option
  11. | New of var * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.value_type list * expr list
  12. | NewArray of var * Javalib_pack.JBasics.value_type * expr list
  13. | InvokeStatic of var option * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.method_signature * expr list
  14. | InvokeVirtual of var option * expr * virtual_call_kind * Javalib_pack.JBasics.method_signature * expr list
  15. | InvokeNonVirtual of var option * expr * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.method_signature * expr list
  16. | InvokeDynamic of var option * Javalib_pack.JBasics.bootstrap_method * Javalib_pack.JBasics.method_signature * expr list
  17. | MonitorEnter of expr
  18. | MonitorExit of expr
  19. | MayInit of Javalib_pack.JBasics.class_name
  20. | Check of check
  21. | Formula of Javalib_pack.JBasics.class_method_signature * formula
val type_of_const : [< `ANull | `Byte of 'a | `Class of 'b | `Double of 'c | `Float of 'd | `Int of 'e | `Long of 'f | `MethodHandle of 'g | `MethodType of 'h | `Short of 'i | `String of 'j ] -> Javalib_pack.JBasics.value_type
val instr_jump_to : instr -> int option
val print_expr' : ?show_type:bool -> bool -> expr -> string
val print_cmp : ?show_type:bool -> ([< `Eq | `Ge | `Gt | `Le | `Lt | `Ne ] * expr * expr) -> string
val print_formula : ?show_type:bool -> formula -> string
val print_oexpr : ?show_type:bool -> opexpr -> string
val print_stackmap : ?show_type:bool -> opexpr list -> string
val print_instr : ?show_type:bool -> instr -> string
val print_expr : ?show_type:bool -> expr -> string
type bir = {
  1. bir_vars : var array;
  2. bir_dico : dictionary;
  3. bir_params : (Javalib_pack.JBasics.value_type * var) list;
  4. bir_code : instr array;
  5. bir_exc_tbl : exception_handler list;
  6. bir_line_number_table : (int * int) list option;
  7. bir_pc_ir2bc : int array;
  8. bir_preds : int array array;
  9. bir_phi_nodes : phi_node list array;
  10. bir_mem_ssa : memory_ssa_info;
}
val empty : bir
val ssa_print_code : bool -> bir -> int -> string list -> string list
val ssa_print : ?phi_simpl:bool -> bir -> string list
val print_code : ?show_type:bool -> instr array -> int -> string list -> string list
val bir_print : ?show_type:bool -> bir -> string list
val bir_jump_target : bir -> bool array
val bir_get_source_line_number : int -> bir -> int option
val bir_exception_edges : bir -> (int * exception_handler) list
type op_size =
  1. | Op32
  2. | Op64
exception Bad_stack
val top : 'a list -> 'a
val pop : 'a list -> 'a list
val popn : int -> 'a list -> 'a list
val pop2 : 'a list -> 'a list
val pop3 : 'a list -> 'a list
val param_acc : int -> 'a list -> 'a list -> 'a list
exception Uninit_is_not_expr
val topE : opexpr list -> expr
val getE : opexpr -> expr
val param : int -> opexpr list -> expr list
exception Subroutine
val convert_type : [< `Bool | `Byte | `ByteBool | `Char | `Double | `Float | `Int | `Int2Bool | `Long | `Object | `Short ] -> op_size
val convert_const : [< `ANull | `Byte of 'a | `Class of 'b | `Double of 'c | `Float of 'd | `Int of 'e | `Long of 'f | `MethodHandle of 'g | `MethodType of 'h | `Short of 'i | `String of 'j ] -> op_size
val convert_field_type : Javalib_pack.JBasics.value_type -> op_size
val convert_object_type : Javalib_pack.JBasics.object_type -> op_size
val type_next : Javalib_pack.JCode.jopcode -> op_size list -> op_size list
exception End_of_method
exception InvalidClassFile
val next : Javalib_pack.JCode.jopcode array -> int -> int
val normal_next : Javalib_pack.JCode.jcode -> int -> int list
val compute_handlers : Javalib_pack.JCode.jcode -> int -> int list
val succs : Javalib_pack.JCode.jcode -> int -> int list
val mapi : (int -> 'a -> 'b) -> (int -> 'a -> int) -> 'a list -> 'b list
module BCV : sig ... end
exception Bad_Multiarray_dimension
val is_arrayload : binop -> bool
val var_in_expr : (var -> bool) -> expr -> Javalib_pack.JBasics.value_type option
val replace_in_expr : (var -> bool) -> (Javalib_pack.JBasics.class_name -> Javalib_pack.JBasics.field_signature -> bool) -> var -> expr -> expr
val is_in_stack : (var -> bool) -> (Javalib_pack.JBasics.class_name -> Javalib_pack.JBasics.field_signature -> bool) -> opexpr list -> bool
val var_in_stack : (var -> bool) -> opexpr list -> Javalib_pack.JBasics.value_type option
val replace_in_stack : (var -> bool) -> (Javalib_pack.JBasics.class_name -> Javalib_pack.JBasics.field_signature -> bool) -> var -> opexpr list -> opexpr list
val is_var_in_stack : var -> opexpr list -> Javalib_pack.JBasics.value_type option
val is_array_in_expr : expr -> bool
val is_var_in_expr_not_var : var -> expr -> bool
val is_heap_sensible_element_in_expr : expr -> bool
val replace_var_in_expr : var -> var -> expr -> expr
val replace_var_in_stack : var -> var -> opexpr list -> opexpr list
val replace_static_in_stack : Javalib_pack.JBasics.class_name -> Javalib_pack.JBasics.field_signature -> var -> opexpr list -> opexpr list
val temp_in_stack : opexpr list -> Javalib_pack.Ptset.t
val fresh_in_stack : bool -> int Stdlib.ref -> opexpr list -> int
val clean : dictionary -> bool -> int Stdlib.ref -> (expr -> bool) -> opexpr list -> instr list -> opexpr list * instr list
type mode =
  1. | Normal
  2. | Addr3
val to_addr3_binop : dictionary -> mode -> binop -> bool -> int Stdlib.ref -> opexpr list -> opexpr list * instr list
val to_addr3_const : dictionary -> mode -> bool -> int Stdlib.ref -> const -> opexpr list -> instr list -> 'a option -> bool -> opexpr list * instr list
val to_addr3_ifd : dictionary -> mode -> bool -> int Stdlib.ref -> opexpr list -> ([ `Eq | `Ge | `Gt | `Le | `Lt | `Ne ] * expr * expr) -> int -> instr list
val to_addr3_unop : dictionary -> mode -> unop -> bool -> int Stdlib.ref -> opexpr list -> instr list -> opexpr list * instr list
val make_tempvar : dictionary -> bool -> int Stdlib.ref -> opexpr list -> var option -> var
val type_of_array_content : [< `ByteBool | `Char | `Double | `Float | `Int | `Long | `Object | `Short ] -> expr -> Javalib_pack.JBasics.value_type
type constructor_folding_mode =
  1. | FoldOrFail
  2. | FoldIfPossible
  3. | DoNotFold
val bc2bir_instr : dictionary -> mode -> (int -> int -> string option) -> bool -> bool -> constructor_folding_mode -> int Stdlib.ref -> int -> (int -> Javalib_pack.JBasics.value_type) -> (Javalib_pack.JBasics.jvm_array_type -> int -> Javalib_pack.JBasics.value_type) -> op_size list -> opexpr list -> var option -> bool -> Javalib_pack.JCode.jopcode -> opexpr list * instr list
val is_jump_instr : Javalib_pack.JCode.jopcode -> bool
module MapPc = Javalib_pack.Ptmap
val is_branchvar_in_stack : int list -> opexpr list -> bool
val para_assign : dictionary -> int -> int list -> opexpr list -> instr list
val jump_stack : dictionary -> int -> opexpr list -> opexpr list
exception NonemptyStack_backward_jump
exception Type_constraint_on_Uninit
exception Content_constraint_on_Uninit
exception InconsistentDebugInfo of int * int * int
val value_compare : opexpr -> opexpr -> bool
val value_compare_stack : opexpr list -> opexpr list -> bool
module FastCheckInfoDebug : sig ... end
module CheckInfoDebug : sig ... end
val bc2ir : dictionary -> mode -> bool -> bool -> constructor_folding_mode -> (int -> int -> string option) -> bool array -> (int -> Javalib_pack.JBasics.value_type) -> (Javalib_pack.JBasics.jvm_array_type -> int -> Javalib_pack.JBasics.value_type) -> Javalib_pack.JCode.jcode -> (int * instr list) list
val search_name_localvar : bool -> Javalib_pack.JCode.jcode -> int -> int -> string option
val compute_jump_target : Javalib_pack.JCode.jcode -> bool array
val gen_params : dictionary -> (int -> int -> string option) -> 'a Javalib_pack.Javalib.concrete_method -> (Javalib_pack.JBasics.value_type * var) list
val compress_ir : Javalib_pack.JCode.exception_handler list -> (int * instr list) list -> bool array -> (int * (int list * instr) list) list
val last : ('a * 'b) list -> 'a
val print_unflattened_code : (int * (int * instr) list) list -> unit
val print_unflattened_code_uncompress : (int * instr list) list -> unit
val flatten_code : (int * (int list * instr) list) list -> exception_handler list -> instr array * int array * int Javalib_pack.Ptmap.t * exception_handler list
val find_preds_instrs : instr array -> exception_handler list -> Javalib_pack.Ptset.t array
val remove_dead_instrs : instr array -> int array -> int Javalib_pack.Ptmap.t -> exception_handler list -> instr array * int array * int Javalib_pack.Ptmap.t * exception_handler list
val rm_dead_instr_from_bcv : Javalib_pack.JCode.jcode -> (int -> bool) -> Javalib_pack.JCode.jcode
val jsr_ir2bc_post_treatment : (int * int) list -> int array -> int array
module Live : sig ... end
module SSA : sig ... end
module GetFormula : sig ... end
val default_formula_cmd : Javalib_pack.JBasics.class_method_signature list
val phi_nodes : ('a -> bir) -> 'a Javalib_pack.Javalib.interface_or_class -> Javalib_pack.JBasics.method_signature -> int -> phi_node list * int array
val iter_code : (int -> instr list -> unit) -> bir -> unit
val iter_exc_handler : (exception_handler -> unit) -> bir -> unit
val method_param_names : ('a -> bir) -> 'a Javalib_pack.Javalib.interface_or_class -> Javalib_pack.JBasics.method_signature -> string list option
val exc_handler_html : 'a -> 'b -> 'c -> exception_handler -> JPrintHtml.elem
val bir_code_map : (instr -> instr) -> bir -> bir
val bir_resolve_field_in_expr : 'a JProgram.program -> expr -> expr
val bir_field_resolve_in_code : 'a JProgram.program -> instr -> instr
val resolve_all_fields : bir JProgram.program -> bir JProgram.program
module PrintIR : sig ... end
module Printer : sig ... end
module MakeCodeExcFunctions : sig ... end
val simplify_CheckNullPointer : 'a Javalib_pack.Javalib.concrete_method -> bir -> unit
module IRUtil : sig ... end
module MakeBirLikeFunctions : sig ... end
module PluginPrinter : sig ... end
OCaml

Innovation. Community. Security.