package sawja

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type var
val var_equal : var -> var -> bool
val var_orig : var -> bool
val var_name : var -> string
val var_name_debug : var -> string option
val var_name_g : var -> string
val bc_num : var -> int option
val index : var -> int
module VarSet : sig ... end
module VarMap : sig ... end
type const = JBir.const
type 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 unop =
  1. | Neg of Javalib_pack.JBasics.jvm_basic_type
  2. | Conv of conv
  3. | ArrayLength
  4. | InstanceOf of Javalib_pack.JBasics.object_type
  5. | Cast of Javalib_pack.JBasics.object_type
type comp =
  1. | DG
  2. | DL
  3. | FG
  4. | FL
  5. | L
type 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 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
val default_formula_cmd : Javalib_pack.JBasics.class_method_signature list
type virtual_call_kind =
  1. | VirtualCall of Javalib_pack.JBasics.object_type
  2. | InterfaceCall of Javalib_pack.JBasics.class_name
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 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 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;
}
type t
val empty : t
val vars : t -> var array
val params : t -> (Javalib_pack.JBasics.value_type * var) list
val code : t -> instr array
val exc_tbl : t -> exception_handler list
val line_number_table : t -> (int * int) list option
val pc_ir2bc : t -> int array
val jump_target : t -> bool array
val exception_edges : t -> (int * exception_handler) list
val get_source_line_number : int -> t -> int option
val make_fresh_var : t -> var
val print_handler : exception_handler -> string
val print_tvar : ?show_type:bool -> tvar -> string
val print_expr : ?show_type:bool -> expr -> string
val print_instr : ?show_type:bool -> instr -> string
val print : t -> string list
val print_program : ?css:string -> ?js:string -> ?info:JPrintHtml.info -> t JProgram.program -> string -> unit
val print_class : ?css:string -> ?js:string -> ?info:JPrintHtml.info -> t Javalib_pack.Javalib.interface_or_class -> string -> unit
module PluginPrinter : sig ... end
val transform : ?bcv:bool -> ?ch_link:bool -> ?formula:bool -> ?formula_cmd:Javalib_pack.JBasics.class_method_signature list -> Javalib_pack.JCode.jcode Javalib_pack.Javalib.concrete_method -> Javalib_pack.JCode.jcode -> t
val resolve_all_fields : t JProgram.program -> t JProgram.program
exception NonemptyStack_backward_jump
exception Subroutine
exception InvalidClassFile
OCaml

Innovation. Community. Security.