54 std::istream &instream,
55 const std::string &path)
126 const std::string &code,
132 std::istringstream instream(code);
152 if(symbol_table.
symbols.size()!=1)
156 expr=symbol_table.
symbols.begin()->second.value;
Base class for all expressions.
bool preprocess(std::istream &instream, const std::string &path, std::ostream &outstream) override
jsil_parse_treet parse_tree
bool from_expr(const exprt &expr, std::string &code, const namespacet &ns) override
Formats the given expression in a language-specific way.
bool parse(std::istream &instream, const std::string &path) override
virtual ~jsil_languaget()
bool to_expr(const std::string &code, const std::string &module, exprt &expr, const namespacet &ns) override
Parses the given string into an expression.
std::set< std::string > extensions() const override
bool typecheck(symbol_table_baset &context, const std::string &module) override
Converting from parse tree and type checking.
bool from_type(const typet &type, std::string &code, const namespacet &ns) override
Formats the given type in a language-specific way.
bool generate_support_functions(symbol_table_baset &symbol_table) override
Create language-specific support functions, such as __CPROVER_start, __CPROVER_initialize and languag...
bool interfaces(symbol_table_baset &symbol_table) override
Adding symbols for all procedure declarations.
void show_parse(std::ostream &out) override
void modules_provided(std::set< std::string > &modules) override
void output(std::ostream &out) const
void swap(jsil_parse_treet &other)
jsil_parse_treet parse_tree
virtual bool parse() override
virtual void clear() override
message_handlert & get_message_handler()
virtual void set_message_handler(message_handlert &_message_handler)
mstreamt & result() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
void set_file(const irep_idt &file)
The symbol table base class interface.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
The type of an expression, extends irept.
std::string type2jsil(const typet &type, const namespacet &ns)
std::string expr2jsil(const exprt &expr, const namespacet &ns)
std::string get_base_name(const std::string &in, bool strip_suffix)
cleans a filename from path and extension
bool jsil_convert(const jsil_parse_treet &parse_tree, symbol_table_baset &symbol_table, message_handlert &message_handler)
Jsil Language Conversion.
bool jsil_entry_point(symbol_table_baset &symbol_table, message_handlert &message_handler)
void jsil_internal_additions(symbol_table_baset &dest)
std::unique_ptr< languaget > new_jsil_language()
bool jsil_typecheck(symbol_table_baset &symbol_table, message_handlert &message_handler)
std::unique_ptr< T > util_make_unique(Ts &&... ts)