ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
function_values Class Reference

The functions a Python expression may evaluate to, gathered from every binding of the names it reads: assignments in any branch, the arguments a parameter takes at every call site, the elements of a list literal it indexes and the values a function it calls returns. More...

#include <function_values.h>

Classes

struct  candidate
 A function definition and the module AST it belongs to. More...

Public Member Functions

 function_values (const nlohmann::json &module, const std::vector< const nlohmann::json * > &others)
 others are the program's other modules, searched for uses of this module's functions.
std::optional< std::vector< candidate > > of (const nlohmann::json &expr)
 The functions expr may evaluate to.
std::optional< std::vector< const nlohmann::json * > > parameter_arguments (const nlohmann::json &name)
 The values a read name of a parameter of a module-level def may hold: the argument each caller passes and any value the def binds to it.

Detailed Description

The functions a Python expression may evaluate to, gathered from every binding of the names it reads: assignments in any branch, the arguments a parameter takes at every call site, the elements of a list literal it indexes and the values a function it calls returns.

The set is complete or not given: a binding of any other shape, a use that could change what a name holds, or a read that may come before the name is bound gives none.

Constructor & Destructor Documentation

◆ function_values()

function_values::function_values ( const nlohmann::json & module,
const std::vector< const nlohmann::json * > & others )

others are the program's other modules, searched for uses of this module's functions.

Member Function Documentation

◆ of()

std::optional< std::vector< function_values::candidate > > function_values::of ( const nlohmann::json & expr)

The functions expr may evaluate to.

expr may be a copy of a node of the module: it is found by its kind and source range.

◆ parameter_arguments()

std::optional< std::vector< const json * > > function_values::parameter_arguments ( const nlohmann::json & name)

The values a read name of a parameter of a module-level def may hold: the argument each caller passes and any value the def binds to it.


The documentation for this class was generated from the following files: