ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
python_dict_internal.h File Reference
Include dependency graph for python_dict_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const nlohmann::json * constant_bound_to (const nlohmann::json &node, const std::string &name)
 The Constant that statement node binds to name alone, as in name = c or name: T = c, else null.
void count_name_bindings (const nlohmann::json &node, const std::string &name, unsigned &count, const nlohmann::json *&value)
 Counts every binding of name in node (a Name it stores or deletes, a parameter, def, import, handler or global declaration of that name), and sets value to the Constant of a lone name = c or name: T = c.
std::string dict_key_id (const nlohmann::json &key, const nlohmann::json &ast)
 The source literal of a constant dict key, e.g.

Function Documentation

◆ constant_bound_to()

const nlohmann::json * constant_bound_to ( const nlohmann::json & node,
const std::string & name )
inline

The Constant that statement node binds to name alone, as in name = c or name: T = c, else null.

◆ count_name_bindings()

void count_name_bindings ( const nlohmann::json & node,
const std::string & name,
unsigned & count,
const nlohmann::json *& value )
inline

Counts every binding of name in node (a Name it stores or deletes, a parameter, def, import, handler or global declaration of that name), and sets value to the Constant of a lone name = c or name: T = c.

Any other occurrence of the name as a string, e.g. an attribute, also counts: a false binding only loses the resolution.

◆ dict_key_id()

std::string dict_key_id ( const nlohmann::json & key,
const nlohmann::json & ast )
inline

The source literal of a constant dict key, e.g.

1 or "a", or of the constant a key name is bound to when ast binds that name nowhere else, in any scope; empty for any other key. A value's recorded type is filed under it, so a read at a constant key consults only the values written there.