|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
Classes | |
| class | _Reads |
Functions | |
| _plain_method (method) | |
| _instance (stmt, classes) | |
| _receivers (module, fixed_receivers) | |
| _parents (module) | |
| _passed_on (node, parents, functions) | |
| _held (container, parents, functions) | |
| _inside_class (node, parents) | |
| _functions (module) | |
| _helper (receiver, method, returns) | |
| _declared_return (method, analysis) | |
| _read_sites (module, receivers) | |
| lower_method_values (module, fixed_receivers) | |
Variables | |
| dict | _KNOWN_RETURNS = {"int", "str", "float", "bool"} |
Pass a bound method of a fixed instance on as a function (#8957). Where `o` is bound once to an instance of a top-level class, `o.m` names the same method of the same object wherever it is evaluated. A module-level `def ESBMC_bound_o_m(x): return o.m(x)` is then the same callable, and unlike a bound method it is a function value, which lists, returns and parameters carry and calls through a value resolve. Only a read whose value flows where function_value_types follows it is rewritten: an argument of a function the module defines, a return of such a function, or a value bound to a name, directly or as an element of a container or a branch of a conditional expression. Any other read, such as a comparison, an argument of a method or a value stored in an attribute, is refused as before, and so is a method that takes defaults, `*args`, keyword-only parameters or decorators, or that yields.
|
protected |
|
protected |
The names bound once in `module`, by a function it defines at the top.
|
protected |
|
protected |
|
protected |
|
protected |
`(o, C)` for a statement `o = C(...)` of a class in `classes`, else None.
|
protected |
|
protected |
Whether the value of `node` flows where function_value_types follows it: to a name, to a parameter of one of `functions`, or out of one of them as a return, directly or as an element of a container or branch of a conditional expression.
|
protected |
|
protected |
|
protected |
For each `o` of `fixed_receivers`, the index of the statement that builds it and the plain methods of its class that `o.m` may name.
| preprocessor.bound_method_values.lower_method_values | ( | module, | |
| fixed_receivers ) |
Replace each read of a method of a fixed instance whose value is passed on with the function that calls it, defined right after the statement that builds the instance, so a read that runs before it is a NameError as in CPython.
|
protected |