Go to the documentation of this file.
10 #ifndef CPROVER_ANSI_C_ANSI_C_LANGUAGE_H
11 #define CPROVER_ANSI_C_ANSI_C_LANGUAGE_H
23 #define OPT_ANSI_C_LANGUAGE \
24 "(max-nondet-tree-depth):" \
25 "(min-null-tree-depth):"
27 #define HELP_ANSI_C_LANGUAGE \
28 " --max-nondet-tree-depth N limit size of nondet (e.g. input) object tree;\n" \
29 " at level N pointers are set to null\n" \
30 " --min-null-tree-depth N minimum level at which a pointer can first be\n" \
31 " NULL in a recursively nondet initialized struct\n"
43 std::istream &instream,
44 const std::string &path,
45 std::ostream &outstream)
override;
48 std::istream &instream,
49 const std::string &path)
override;
56 const std::string &module,
57 const bool keep_file_local)
override;
61 const std::string &module,
62 const bool keep_file_local,
63 const std::set<irep_idt> &keep);
73 return typecheck(symbol_table, module,
true);
97 const std::string &code,
98 const std::string &module,
103 {
return util_make_unique<ansi_c_languaget>(); }
105 std::string
id()
const override {
return "C"; }
107 std::set<std::string>
extensions()
const override;
120 #endif // CPROVER_ANSI_C_ANSI_C_LANGUAGE_H
bool type_to_name(const typet &type, std::string &name, const namespacet &ns) override
Encodes the given type in a language-specific way.
The type of an expression, extends irept.
~ansi_c_languaget() override
bool to_expr(const std::string &code, const std::string &module, exprt &expr, const namespacet &ns) override
Parses the given string into an expression.
Base class for all expressions.
std::string id() const override
bool from_type(const typet &type, std::string &code, const namespacet &ns) override
Formats the given type in a language-specific way.
bool can_keep_file_local() override
Is it possible to call three-argument typecheck() on this object?
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool preprocess(std::istream &instream, const std::string &path, std::ostream &outstream) override
ANSI-C preprocessing.
c_object_factory_parameterst object_factory_params
void set(const optionst &)
Assigns the parameters from given options.
ansi_c_parse_treet parse_tree
std::unique_ptr< languaget > new_language() override
void show_parse(std::ostream &out) override
std::unique_ptr< languaget > new_ansi_c_language()
bool parse(std::istream &instream, const std::string &path) override
std::set< std::string > extensions() const override
void modules_provided(std::set< std::string > &modules) override
bool generate_support_functions(symbol_tablet &symbol_table) override
Create language-specific support functions, such as __CPROVER_start, __CPROVER_initialize and languag...
bool from_expr(const exprt &expr, std::string &code, const namespacet &ns) override
Formats the given expression in a language-specific way.
std::string description() const override
bool typecheck(symbol_tablet &symbol_table, const std::string &module, const bool keep_file_local) override
typecheck without removing specified entries from the symbol table
bool typecheck(symbol_tablet &symbol_table, const std::string &module) override
void set_language_options(const optionst &options) override
Set language-specific options.