package mopsa
MOPSA: A Modular and Open Platform for Static Analysis using Abstract Interpretation
Install
Dune Dependency
Authors
Maintainers
Sources
mopsa-analyzer-v1.0.tar.gz
md5=9f673f79708b44a7effb3b6bb3618d2c
sha512=cb91cb428e43a22f1abbcb8219710d0c10a5b3756d0da392d4084b3b3a6157350776c596983e63def344f617d39964e91f244f60c07958695ee5c8c809a9f0f4
doc/src/cpython/prelude.ml.html
Source file prelude.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
(****************************************************************************) (* *) (* This file is part of MOPSA, a Modular Open Platform for Static Analysis. *) (* *) (* Copyright (C) 2017-2022 The MOPSA Project. *) (* *) (* This program is free software: you can redistribute it and/or modify *) (* it under the terms of the GNU Lesser General Public License as published *) (* by the Free Software Foundation, either version 3 of the License, or *) (* (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU Lesser General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public License *) (* along with this program. If not, see <http://www.gnu.org/licenses/>. *) (* *) (****************************************************************************) open Mopsa open Python.Addr let builtin_exceptions = [ "PyExc_BaseException"; "PyExc_Exception"; "PyExc_StopAsyncIteration"; "PyExc_StopIteration"; "PyExc_GeneratorExit"; "PyExc_ArithmeticError"; "PyExc_LookupError"; "PyExc_AssertionError"; "PyExc_AttributeError"; "PyExc_BufferError"; "PyExc_EOFError"; "PyExc_FloatingPointError"; "PyExc_OSError"; "PyExc_ImportError"; "PyExc_ModuleNotFoundError"; "PyExc_IndexError"; "PyExc_KeyError"; "PyExc_KeyboardInterrupt"; "PyExc_MemoryError"; "PyExc_NameError"; "PyExc_OverflowError"; "PyExc_RuntimeError"; "PyExc_RecursionError"; "PyExc_NotImplementedError"; "PyExc_SyntaxError"; "PyExc_IndentationError"; "PyExc_TabError"; "PyExc_ReferenceError"; "PyExc_SystemError"; "PyExc_SystemExit"; "PyExc_TypeError"; "PyExc_UnboundLocalError"; "PyExc_ValueError"; "PyExc_UnicodeError"; "PyExc_UnicodeEncodeError"; "PyExc_UnicodeDecodeError"; "PyExc_UnicodeTranslateError"; "PyExc_ZeroDivisionError"; "PyExc_BlockingIOError"; "PyExc_ConnectionError"; "PyExc_BrokenPipeError"; "PyExc_ChildProcessError"; "PyExc_ConnectionAbortedError"; "PyExc_ConnectionRefusedError"; "PyExc_ConnectionResetError"; "PyExc_FileExistsError"; "PyExc_FileNotFoundError"; "PyExc_InterruptedError"; "PyExc_IsADirectoryError"; "PyExc_NotADirectoryError"; "PyExc_PermissionError"; "PyExc_ProcessLookupError"; "PyExc_TimeoutError"; "PyExc_EnvironmentError"; "PyExc_IOError"; "PyExc_Warning"; "PyExc_UserWarning"; "PyExc_DeprecationWarning"; "PyExc_PendingDeprecationWarning"; "PyExc_SyntaxWarning"; "PyExc_RuntimeWarning"; "PyExc_FutureWarning"; "PyExc_ImportWarning"; "PyExc_UnicodeWarning"; "PyExc_BytesWarning"; "PyExc_ResourceWarning"; ] let () = C.Cstubs.Resources.register_is_resource_addr_chain (fun next ak -> match ak with (* FIXME: other container addresses *) | Python.Objects.Py_list.A_py_list | Python.Objects.Py_list.A_py_iterator _ | Python.Objects.Py_set.A_py_set | Python.Objects.Tuple.A_py_tuple _ | Python.Objects.Dict.A_py_dict | A_py_instance _ | A_py_class _ | A_py_c_class _ | A_py_c_function _ | A_py_c_module _ | A_py_function _ | A_py_method _ | A_py_module _ -> true | _ -> next ak) let () = C.Common.Base.register_addr_opaque (fun next -> function | Python.Objects.Py_list.A_py_list | Python.Objects.Py_list.A_py_iterator _ | Python.Objects.Py_set.A_py_set | Python.Objects.Tuple.A_py_tuple _ | Python.Objects.Dict.A_py_dict | A_py_instance {addr_kind = A_py_class (C_builtin _, _)} -> OpaqueFrom 8 | ak -> next ak) let builtin_functions = [ "PyModule_Create2"; "PyModule_AddObject"; "PyType_FromSpec"; "PyType_Ready"; "PyType_GenericAlloc_Helper"; "PyType_IsSubtype"; "PyArg_ParseTuple"; "PyArg_ParseTupleAndKeywords"; "PyArg_UnpackTuple"; "Py_BuildValue"; "PyNumber_Add"; "PyObject_CallFunction"; "PyObject_CallObject"; "PyObject_CallMethod"; "PyObject_GetAttrString"; "PyObject_GetItem"; "PyObject_GetIter"; "PyObject_RichCompare"; "PyObject_RichCompareBool"; "PyObject_Size"; "PyObject_Repr"; "PyObject_Length"; "PyObject_IsTrue"; "PyIter_Next"; "PySequence_GetSlice"; "PyLong_FromLong"; "PyLong_FromUnsignedLong"; "PyLong_FromSsize_t"; "PyLong_AsLong"; "PyLong_AsSsize_t"; "PyFloat_FromDouble"; "PyFloat_AsDouble"; "PyBytes_FromStringAndSize"; "PyBytes_Size"; "PyBytes_AsString"; "PyUnicode_GetItem"; "PyUnicode_Concat"; "PyUnicode_GetLength"; "PyUnicode_InternFromString"; "PyUnicode_FromString"; "PyUnicode_FromKindAndData"; "PyUnicode_FromWideChar"; "PyUnicode_AsEncodedString"; "PyUnicode_AsUnicode"; "PyUnicode_AsUTF8AndSize"; "PyTuple_New"; "PyTuple_SetItem"; "PyTuple_Size"; "PyTuple_GetItem"; "PyTuple_GetSlice"; "PyList_New"; "PyList_Size"; "PyList_GetItem"; "PyList_SetItem"; "PyList_Append"; "PyDict_Size"; "PyDict_Next"; "PyDict_New"; "PyDict_GetItem"; "PyDict_SetItem"; "PySlice_New"; "PySet_New"; "PySet_Size"; "PySet_Add"; "PySet_Clear"; "PyWeakref_NewRef"; "PyWeakref_GetObject"; "PyErr_NewException"; ]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>