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 -> 'a
Addresses
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.cases
Allocate an object on the heap and return its address as an evaluation
Built-ins
val classes : (string, Python.Lang.Ast.py_object) Hashtbl.t
Lists of built-ins
val functions : (string, Python.Lang.Ast.py_object) Hashtbl.t
val modules : (string, Python.Lang.Ast.py_object) Hashtbl.t
val type_aliases : (MopsaLib.var, MopsaLib.expr) Hashtbl.t
val typed_functions : (string, Python.Lang.Ast.py_object) Hashtbl.t
Name 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.addr
Address of an object
val kind_of_object : Python.Lang.Ast.py_object -> MopsaLib.addr_kind
val oobject_name : Python.Lang.Ast.py_object -> string option
Name of an object
val object_name : Python.Lang.Ast.py_object -> string
val add_type_alias : MopsaLib.var -> MopsaLib.expr -> unit
val find_type_alias_by_name : string -> MopsaLib.expr
val add_builtin_class : Python.Lang.Ast.py_object -> unit -> unit
val print_classes : Format.formatter -> 'a -> unit
val print_functions : Format.formatter -> 'a -> unit
val add_builtin_function : Python.Lang.Ast.py_object -> unit -> unit
val add_typed : Python.Lang.Ast.py_object -> unit
val add_typed_overload : Python.Lang.Ast.py_object -> unit
val add_builtin_module : Python.Lang.Ast.py_object -> unit -> unit
val find_builtin : string -> Python.Lang.Ast.py_object
Search for the address of a builtin given its name
val find_builtin_function : string -> Python.Lang.Ast.py_object
val is_object_unsupported : Python.Lang.Ast.py_object -> bool
val is_builtin_var : MopsaLib.var -> bool
val find_builtin_module : string -> Python.Lang.Ast.py_object
val is_builtin_attribute : Python.Lang.Ast.py_object -> string -> bool
Check 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_object
Search 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.expr
val mk_py_float_interval :
float ->
float ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_issubclass :
MopsaLib.expr ->
MopsaLib.expr ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_issubclass_builtin_r :
MopsaLib.expr ->
string ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_issubclass_builtin_l :
string ->
MopsaLib.expr ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_issubclass_builtin2 :
string ->
string ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_hasattr :
MopsaLib.expr ->
string ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_isinstance :
MopsaLib.expr ->
MopsaLib.expr ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_isinstance_builtin :
MopsaLib.expr ->
string ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val mk_py_type :
MopsaLib.expr ->
Mopsa_utils.Core.Location.range ->
MopsaLib.expr
val str_of_py_c_function_kind : py_c_function_kind -> string
type 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 list
Computes 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 list
val search_c :
Python.Lang.Ast.py_object list list ->
Python.Lang.Ast.py_object option
val create_builtin_class :
class_address ->
'a ->
'b ->
Python.Lang.Ast.py_object list ->
'c ->
unit
val builtin_cl_and_mro :
string ->
class_address * Python.Lang.Ast.py_object list
val nominal_type_of_addr_kind : (MopsaLib.addr_kind -> string) ref
val structural_type_of_addr_kind : (MopsaLib.addr_kind -> string -> bool) ref
val register_addr_kind_nominal_type :
((MopsaLib.addr_kind -> string) -> MopsaLib.addr_kind -> string) ->
unit
val register_addr_kind_structural_type :
((MopsaLib.addr_kind -> string -> bool) ->
MopsaLib.addr_kind ->
string ->
bool) ->
unit
val addr_kind_find_nominal_type : MopsaLib.addr_kind -> string
val addr_kind_find_structural_type : MopsaLib.addr_kind -> string -> bool
val mro : Python.Lang.Ast.py_object -> Python.Lang.Ast.py_object list