package mopsa
Install
Dune Dependency
Authors
Maintainers
Sources
md5=fdee20e988343751de440b4f6b67c0f4
sha512=f5cbf1328785d3f5ce40155dada2d95e5de5cce4f084ea30cfb04d1ab10cc9403a26cfb3fa55d0f9da72244482130fdb89c286a9aed0d640bba46b7c00e09500
doc/python_lang/Python_lang/Lang/Addr/index.html
Module Lang.Addr
Source
Heap addresses of Python objects.
Addresses
Classes
Functions
type Mopsa.addr_kind +=
| A_py_class of class_address * (Mopsa.addr * Mopsa.expr option) list
(*mro
*)| A_py_function of function_address
(*function
*)| A_py_method of Mopsa.addr * Mopsa.expr option * Mopsa.addr * Mopsa.expr option * string
| A_py_module of module_address
These addresses refer only to static objects
val eval_alloc :
?mode:Mopsa.mode ->
('a, 'b) Mopsa.man ->
Ast.Addr.addr_kind ->
Mopsa_utils.Location.range ->
'a Core.Flow.flow ->
('a, Ast.Addr.addr) Mopsa.Cases.cases
Allocate an object on the heap and return its address as an evaluation
Built-ins
Lists of built-ins
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
Address of an object
Name of an object
Search for the address of a builtin given its name
Check whether a built-in exists given its name
Check whether an attribute of a built-in object exists, given its name
val find_builtin_attribute :
(Mopsa.addr * Mopsa.expr option) ->
string ->
Mopsa.addr * Mopsa.expr option
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_issubclass_builtin_r :
Mopsa.expr ->
string ->
Mopsa_utils.Location.range ->
Mopsa.expr
val mk_py_issubclass_builtin_l :
string ->
Mopsa.expr ->
Mopsa_utils.Location.range ->
Mopsa.expr
val mk_py_isinstance_builtin :
Mopsa.expr ->
string ->
Mopsa_utils.Location.range ->
Mopsa.expr
type Mopsa.addr_kind +=
| A_py_c_module of string
(*name
*)| A_py_c_function of string * int * py_c_function_kind * int option * Mopsa.addr * Mopsa.expr option
(*self
*)| A_py_c_class of string
(*name
*)
Computes the c3 linearization of an object. This is Python's approach to deal with redundant parents in the inheritance
val merge :
(Mopsa.addr * Mopsa.expr option) list list ->
(Mopsa.addr * Mopsa.expr option) list
val search_c :
(Mopsa.addr * Mopsa.expr option) list list ->
(Mopsa.addr * Mopsa.expr option) option
val create_builtin_class :
class_address ->
'a ->
'b ->
(Mopsa.addr * Mopsa.expr option) list ->
'c ->
unit
val register_addr_kind_nominal_type :
((Mopsa.addr_kind -> string) -> Mopsa.addr_kind -> string) ->
unit
val register_addr_kind_structural_type :
((Mopsa.addr_kind -> string -> bool) -> Mopsa.addr_kind -> string -> bool) ->
unit