ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
value_kinds.h
Go to the documentation of this file.
1#pragma once
2
3#include <nlohmann/json.hpp>
4
5#include <set>
6#include <string>
7#include <utility>
8#include <vector>
9
17{
18public:
19 explicit value_kinds(const nlohmann::json &module);
20
23 bool diverges(const nlohmann::json &expr, const nlohmann::json &scope);
24
26 const nlohmann::json &scope_of(const std::string &function_name) const;
27
28private:
29 using scoped = std::pair<const nlohmann::json *, const nlohmann::json *>;
30
31 void kinds_of(
32 const nlohmann::json &expr,
33 const nlohmann::json &scope,
34 std::set<std::string> &out,
35 unsigned depth);
36 void call_kinds(
37 const nlohmann::json &call,
38 const nlohmann::json &scope,
39 std::set<std::string> &out,
40 unsigned depth);
41 std::vector<scoped>
42 name_values(const std::string &name, const nlohmann::json &scope) const;
43 std::vector<scoped> callees(
44 const nlohmann::json &callee,
45 const nlohmann::json &scope,
46 unsigned depth) const;
47 void parameter_values(
48 const nlohmann::json &def,
49 const std::string &name,
50 std::vector<scoped> &out) const;
51 const nlohmann::json *top_level_def(const std::string &name) const;
52 const nlohmann::json *enclosing_scope(const nlohmann::json &call) const;
53
54 const nlohmann::json &module_;
55};
Definition module.h:60
bool diverges(const nlohmann::json &expr, const nlohmann::json &scope)
Whether expr, read in scope (a function definition or the module), may produce values of two differen...
Definition value_kinds.cpp:111
const nlohmann::json & scope_of(const std::string &function_name) const
The top-level function called function_name, or the module.
Definition value_kinds.cpp:121
value_kinds(const nlohmann::json &module)
Definition value_kinds.cpp:107
unsigned stack_budget_guardt< Tag >::depth
Definition stack_budget.h:72