package mopsa
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
md5=37966e98ffeebcedc09bd6e9b2b81f69
    
    
  sha512=40d4d826c25f680766c07eccbabdf5e8a4fa023016e8a164e4e4f6b3781c8484dc4df437055721dfd19b9db8fb7fe3b61236c4833186d346fc7204a68d01eaaa
    
    
  doc/mopsa.mopsa_analyzer/Mopsa_analyzer/Languages/Python/Lang/Addr/index.html
Module Lang.Addr
Heap addresses of Python objects.
val debug : ('a, Format.formatter, unit, unit) format4 -> 'aAddresses
type class_address = - | C_builtin of string
- | C_user of Python.Lang.Ast.py_clsdec
- | C_unsupported of string(*- unsupported class *)
- | C_annot of Python.Lang.Ast.py_cls_annot(*- class annotations *)
Classes
type function_address = - | F_builtin of string * string
- | F_user of Python.Lang.Ast.py_fundec
- | F_unsupported of string(*- unsupported function *)
- | F_annot of Python.Lang.Ast.py_func_annot
Functions
type module_address = - | M_user of string * MopsaLib.var list(*- globals *)
- | M_builtin of string(*- name *)
type MopsaLib.addr_kind += - | A_py_class of class_address * Python.Lang.Ast.py_object list(*- mro *)
- | A_py_function of function_address(*- function *)
- | A_py_method of Python.Lang.Ast.py_object * Python.Lang.Ast.py_object * string
- | A_py_module of module_address
These addresses refer only to static objects
val eval_alloc : 
  ?mode:MopsaLib.mode ->
  ('a, 'b) MopsaLib.man ->
  Framework.Core.Ast.Addr.addr_kind ->
  Mopsa_utils.Core.Location.range ->
  'a Core.Flow.flow ->
  ('a, Framework.Core.Ast.Addr.addr) Mopsa_analyzer.MopsaLib.Cases.casesAllocate an object on the heap and return its address as an evaluation
Built-ins
val classes : (string, Python.Lang.Ast.py_object) Hashtbl.tLists of built-ins
val functions : (string, Python.Lang.Ast.py_object) Hashtbl.tval modules : (string, Python.Lang.Ast.py_object) Hashtbl.tval type_aliases : (MopsaLib.var, MopsaLib.expr) Hashtbl.tval typed_functions : (string, Python.Lang.Ast.py_object) Hashtbl.tName of a builtin with an optional dot notation in case of sub-objects (methods of classes, etc.)
Return the base and the attribute of a dot name
val addr_of_object : Python.Lang.Ast.py_object -> MopsaLib.addrAddress of an object
val kind_of_object : Python.Lang.Ast.py_object -> MopsaLib.addr_kindval oobject_name : Python.Lang.Ast.py_object -> string optionName of an object
val object_name : Python.Lang.Ast.py_object -> stringval add_type_alias : MopsaLib.var -> MopsaLib.expr -> unitval find_type_alias_by_name : string -> MopsaLib.exprval add_builtin_class : Python.Lang.Ast.py_object -> unit -> unitval print_classes : Format.formatter -> 'a -> unitval print_functions : Format.formatter -> 'a -> unitval add_builtin_function : Python.Lang.Ast.py_object -> unit -> unitval add_typed : Python.Lang.Ast.py_object -> unitval add_typed_overload : Python.Lang.Ast.py_object -> unitval add_builtin_module : Python.Lang.Ast.py_object -> unit -> unitval find_builtin : string -> Python.Lang.Ast.py_objectSearch for the address of a builtin given its name
val find_builtin_function : string -> Python.Lang.Ast.py_objectval is_object_unsupported : Python.Lang.Ast.py_object -> boolval is_builtin_var : MopsaLib.var -> boolval find_builtin_module : string -> Python.Lang.Ast.py_objectval is_builtin_attribute : Python.Lang.Ast.py_object -> string -> boolCheck whether an attribute of a built-in object exists, given its name
val find_builtin_attribute : 
  Python.Lang.Ast.py_object ->
  string ->
  Python.Lang.Ast.py_objectSearch for the address of a builtin attribute
Check whether a dot-named function f is a member of the class cls
Utility functions
val mk_py_z_interval : 
  Z.t ->
  Z.t ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_float_interval : 
  float ->
  float ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_issubclass : 
  MopsaLib.expr ->
  MopsaLib.expr ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_issubclass_builtin_r : 
  MopsaLib.expr ->
  string ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_issubclass_builtin_l : 
  string ->
  MopsaLib.expr ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_issubclass_builtin2 : 
  string ->
  string ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_hasattr : 
  MopsaLib.expr ->
  string ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_isinstance : 
  MopsaLib.expr ->
  MopsaLib.expr ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_isinstance_builtin : 
  MopsaLib.expr ->
  string ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval mk_py_type : 
  MopsaLib.expr ->
  Mopsa_utils.Core.Location.range ->
  MopsaLib.exprval str_of_py_c_function_kind : py_c_function_kind -> stringtype MopsaLib.addr_kind += - | A_py_c_module of string(*- name *)
- | A_py_c_function of string * int * py_c_function_kind * int option * Python.Lang.Ast.py_object(*- self *)
- | A_py_c_class of string(*- name *)
val c3_lin : Python.Lang.Ast.py_object -> Python.Lang.Ast.py_object listComputes the c3 linearization of an object. This is Python's approach to deal with redundant parents in the inheritance
val merge : 
  Python.Lang.Ast.py_object list list ->
  Python.Lang.Ast.py_object listval search_c : 
  Python.Lang.Ast.py_object list list ->
  Python.Lang.Ast.py_object optionval create_builtin_class : 
  class_address ->
  'a ->
  'b ->
  Python.Lang.Ast.py_object list ->
  'c ->
  unitval builtin_cl_and_mro : 
  string ->
  class_address * Python.Lang.Ast.py_object listval nominal_type_of_addr_kind : (MopsaLib.addr_kind -> string) refval structural_type_of_addr_kind : (MopsaLib.addr_kind -> string -> bool) refval register_addr_kind_nominal_type : 
  ((MopsaLib.addr_kind -> string) -> MopsaLib.addr_kind -> string) ->
  unitval register_addr_kind_structural_type : 
  ((MopsaLib.addr_kind -> string -> bool) ->
    MopsaLib.addr_kind ->
    string ->
    bool) ->
  unitval addr_kind_find_nominal_type : MopsaLib.addr_kind -> stringval addr_kind_find_structural_type : MopsaLib.addr_kind -> string -> boolval mro : Python.Lang.Ast.py_object -> Python.Lang.Ast.py_object list