23 const nlohmann::json *
def;
30 const nlohmann::json &
module,
31 const std::vector<const nlohmann::json *> &others);
35 std::optional<std::vector<candidate>>
of(
const nlohmann::json &expr);
39 std::optional<std::vector<const nlohmann::json *>>
44 using chaint = std::vector<const nlohmann::json *>;
45 using valuet = std::pair<const nlohmann::json *, chaint>;
48 const nlohmann::json *locate(
const nlohmann::json &expr, chaint &chain);
51 const nlohmann::json &expr,
53 std::vector<candidate> &out,
56 const nlohmann::json &name,
58 std::vector<valuet> &values,
59 std::vector<candidate> &out);
61 const nlohmann::json &name,
63 std::vector<valuet> &values);
64 bool module_name_values(
65 const nlohmann::json &name,
67 std::vector<valuet> &values,
68 std::vector<candidate> &out);
69 bool parameter_values(
70 const nlohmann::json &def,
72 const std::string &name,
73 std::vector<valuet> &values);
77 std::optional<std::vector<std::pair<const nlohmann::json *, std::string>>>
78 callers_of(
const nlohmann::json &def,
const nlohmann::json &
module)
const;
82 const nlohmann::json &
module,
83 const nlohmann::json *scope,
84 const std::string &callee,
85 const nlohmann::json &args,
87 const std::string &name,
88 std::vector<valuet> &values)
const;
91 only_called(
const nlohmann::json &def,
const nlohmann::json &
module)
const;
93 const nlohmann::json &subscript,
95 std::vector<valuet> &values);
97 const std::vector<candidate> &callees,
98 std::vector<valuet> &values);
99 bool imported_function(
100 const nlohmann::json &
module,
101 const nlohmann::json &import_from,
102 const nlohmann::json &alias,
103 std::vector<candidate> &out);
105 bool mentioned_elsewhere(
106 const nlohmann::json &
module,
107 const std::string &name)
const;
109 const nlohmann::json &module_;
110 std::vector<const nlohmann::json *> others_;
112 std::map<std::string, nlohmann::json> loaded_;
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...
Definition function_values.cpp:506
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.
Definition function_values.cpp:470
std::optional< std::vector< candidate > > of(const nlohmann::json &expr)
The functions expr may evaluate to.
Definition function_values.cpp:493