package mopsa
MOPSA: A Modular and Open Platform for Static Analysis using Abstract Interpretation
Install
Dune Dependency
Authors
Maintainers
Sources
mopsa-analyzer-v1.1.tar.gz
md5=fdee20e988343751de440b4f6b67c0f4
sha512=f5cbf1328785d3f5ce40155dada2d95e5de5cce4f084ea30cfb04d1ab10cc9403a26cfb3fa55d0f9da72244482130fdb89c286a9aed0d640bba46b7c00e09500
doc/src/mopsa.mopsa_py_parser/cst.ml.html
Source file cst.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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
(** Copyright (c) 2017-2019 Aymeric Fromherz and The MOPSA Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *) (** The definition of the ast can be found at: https://docs.python.org/3/library/ast.html#abstract-grammar *) open Mopsa_utils open Location type identifier = string and stmt = { skind : stmt_kind; srange : range; } and stmt_kind = | FunctionDef of identifier (* name *) * arguments (* args *) * stmt list (* body *) * expr list (* decorator list *) * expr option (* returns *) | AsyncFunctionDef of identifier (* name *) * arguments (* args *) * stmt list (* body *) * expr list (* decorator list *) * expr option (* returns *) | ClassDef of identifier (* name *) * expr list (* bases *) * keyword list (* keywords *) * stmt list (* body *) * expr list (* decorator list *) | Return of expr option (* value *) | Delete of expr list (* targets *) | Assign of expr list (* targets *) * expr (* value *) | AugAssign of expr (* target *) * binop (* op *) * expr (* value *) | AnnAssign of expr (* target *) * expr (* annotation *) * expr option (* value *) | For of expr (* target *) * expr (* iter *) * stmt list (* body *) * stmt list (* else *) | AsyncFor of expr (* target *) * expr (* iter *) * stmt list (* body *) * stmt list (* else *) | While of expr (* target *) * stmt list (* body *) * stmt list (* else *) | If of expr (* test *) * stmt list (* body *) * stmt list (* else *) | With of withitem list (* items *) * stmt list (* body *) | AsyncWith of withitem list (* items *) * stmt list (* body *) | Raise of expr option (* exc *) * expr option (* cause *) | Try of stmt list (* body *) * excepthandler list (* handlers *) * stmt list (* else *) * stmt list (* finalbody *) | Assert of expr (* test *) * expr option (* msg *) | Import of alias list (* names *) | ImportFrom of identifier option (* module *) * alias list (* names *) * int option (* level *) | Global of identifier list (* names *) | Nonlocal of identifier list (* names *) | Expr of expr (* value *) | Pass | Break | Continue and expr = { ekind : expr_kind; erange : range; } and expr_kind = | BoolOp of boolop (* operator *) * expr list (* values *) | BinOp of expr (* left *) * binop (* op *) * expr (* right *) | UnaryOp of unop (* op *) * expr (* operand *) | Lambda of arguments (* args *) * expr (* body *) | IfExp of expr (* test *) * expr (* body *) * expr (* else *) | Dict of expr list (* keys *) * expr list (* values *) | Set of expr list (* elts *) | ListComp of expr (* elt *) * comprehension list (* generators *) | SetComp of expr (* elt *) * comprehension list (* generators *) | DictComp of expr (* key *) * expr (* value *) * comprehension list (* generators *) | GeneratorExp of expr (* elt *) * comprehension list (* generators *) (* The grammar constraints where yield expressions can occur *) | Await of expr (* value *) | Yield of expr option (* value *) | YieldFrom of expr (* value *) | Compare of expr (* left *) * cmpop list (* ops *) * expr list (* comparators *) | Call of expr (* func *) * expr list (* args *) * keyword list (* keywords *) | Num of number (* n *) (* number as PyObject *) | Str of string (* s *) | FormattedValue of expr (* value *) * int option (* conversion *) * expr option (* format_spec *) | JoinedStr of expr list (* values *) | Bytes of string (* s *) | NameConstant of singleton (* value *) | Ellipsis (* | Constant of constant (* value *) *) (* The following expression can appear in assignment context *) | Attribute of expr (* value *) * identifier (* attr *) * expr_context (* ctx *) | Subscript of expr (* value *) * slice (* slice *) * expr_context (* ctx *) | Starred of expr (* value *) * expr_context (* ctx *) | Name of identifier (* id *) * expr_context (* ctx *) | List of expr list (* elts *) * expr_context (* ctx *) | Tuple of expr list (* elts *) * expr_context (* ctx *) | Null (* should raise an error if accessed *) and expr_context = | Load | Store | Del | AugLoad | AugStore | Param and slice = | Slice of expr option (* lower *) * expr option (* upper *) * expr option (* step *) | ExtSlice of slice list (* dims *) | Index of expr (* value *) and boolop = | And | Or and binop = | Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift | RShift | BitOr | BitXor | BitAnd | FloorDiv and unop = | Invert | Not | UAdd | USub and cmpop = | Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn and comprehension = expr (* target *) * expr (* iter *) * expr list (* ifs *) * bool (* is_async *) and excepthandler = | ExceptHandler of expr option (* type *) * identifier option (* name *) * stmt list (* body *) and arguments = arg list (* args *) * arg option (* vararg *) * arg list (* kwonlyargs *) * expr list (* kw_defaults *) * arg option (* kwarg *) * expr list (* defaults *) and arg = identifier (* arg *) * expr option (* annotation *) (* keyword arguments supplied to call (NULL identifier for **kwargs) *) and keyword = identifier option (* arg *) * expr (* value *) (* import name with optional 'as' alias *) and alias = identifier (* name *) * identifier option (* asname *) and withitem = expr (* context_expr *) * expr option (* optional_vars *) and number = | Int of Z.t | Float of float | Imag of string and singleton = | True | False | SNone | SNotImplemented
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>