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