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;
}
val type_of_tvar : ('a * 'b) -> 'a
type check =
  1. | CheckNullPointer of tvar
  2. | CheckArrayBound of tvar * tvar
  3. | CheckArrayStore of tvar * tvar
  4. | CheckNegativeArraySize of tvar
  5. | CheckCast of tvar * Javalib_pack.JBasics.object_type
  6. | CheckArithmetic of tvar
type formula =
  1. | Atom of [ `Eq | `Ge | `Gt | `Le | `Lt | `Ne ] * tvar * tvar
  2. | BoolVar of tvar
  3. | And of formula * formula
  4. | Or of formula * formula
type instr =
  1. | Nop
  2. | AffectVar of var * expr
  3. | AffectArray of tvar * tvar * tvar
  4. | AffectField of tvar * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.field_signature * tvar
  5. | AffectStaticField of Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.field_signature * tvar
  6. | Alloc of var * Javalib_pack.JBasics.class_name
  7. | Goto of int
  8. | Ifd of [ `Eq | `Ge | `Gt | `Le | `Lt | `Ne ] * tvar * tvar * int
  9. | Throw of tvar
  10. | Return of tvar option
  11. | New of var * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.value_type list * tvar list
  12. | NewArray of var * Javalib_pack.JBasics.value_type * tvar list
  13. | InvokeStatic of var option * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.method_signature * tvar list
  14. | InvokeVirtual of var option * tvar * virtual_call_kind * Javalib_pack.JBasics.method_signature * tvar list
  15. | InvokeNonVirtual of var option * tvar * Javalib_pack.JBasics.class_name * Javalib_pack.JBasics.method_signature * tvar list
  16. | InvokeDynamic of var option * Javalib_pack.JBasics.bootstrap_method * Javalib_pack.JBasics.method_signature * tvar list
  17. | MonitorEnter of tvar
  18. | MonitorExit of tvar
  19. | MayInit of Javalib_pack.JBasics.class_name
  20. | Check of check
  21. | Formula of Javalib_pack.JBasics.class_method_signature * formula
type t = {
  1. bir : Bir.bir;
  2. code : instr array;
}
val empty : t
val vars : t -> Bir.var array
val params : t -> (Javalib_pack.JBasics.value_type * Bir.var) list
val code : t -> instr array
val exc_tbl : t -> Bir.exception_handler list
val line_number_table : t -> (int * int) list option
val fresh_counter : int Stdlib.ref
val make_fresh_var : t -> var
val pc_ir2bc : t -> int array
val default_formula_cmd : Javalib_pack.JBasics.class_method_signature list
val get_source_line_number : int -> t -> int option
val exception_edges : t -> (int * Bir.exception_handler) list
val print : t -> string list
val jump_target : t -> bool array
val print_tvar : ?show_type:bool -> tvar -> string
val print_cmp : ?show_type:bool -> ([< `Eq | `Ge | `Gt | `Le | `Lt | `Ne ] * tvar * tvar) -> string
val print_formula : ?show_type:bool -> formula -> string
val print_instr : ?show_type:bool -> instr -> string
val print_expr : ?show_type:bool -> expr -> string
exception Bad_Multiarray_dimension
exception Bad_stack
exception Subroutine
exception InvalidClassFile
exception Content_constraint_on_Uninit
exception Type_constraint_on_Uninit
exception NonemptyStack_backward_jump
exception Uninit_is_not_expr
exception Exc_expr2tvar
val bir2a3bir_binop : Bir.binop -> binop
val bir2a3bir_expr : Bir.expr -> expr
val check2check : Bir.check -> check
val bir2a3bir_formula : Bir.formula -> formula
val bir2a3bir_instr : Bir.instr -> instr
val bir2a3bir : Bir.bir -> t
val a3_code_map : (instr -> instr) -> t -> t
val a3_resolve_field_in_expr : 'a JProgram.program -> expr -> expr
val a3_field_resolve_in_code : 'a JProgram.program -> instr -> instr
val resolve_all_fields : t JProgram.program -> t JProgram.program
module PrintIR : sig ... end
module Printer : sig ... end
val print_class : ?css:string -> ?js:string -> ?info:JPrintHtml.info -> Printer.code Javalib_pack.Javalib.interface_or_class -> string -> unit
val print_program : ?css:string -> ?js:string -> ?info:JPrintHtml.info -> Printer.code JProgram.program -> string -> unit
module MakeBirLikeFunctions : sig ... end
module PluginPrinter : sig ... end
OCaml

Innovation. Community. Security.