55 const std::string &path)
126 const std::string &code,
152 if(symbol_table.
symbols.size()!=1)
156 expr=symbol_table.
symbols.begin()->second.value;
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Base class for all expressions.
virtual bool preprocess(std::istream &instream, const std::string &path, std::ostream &outstream) override
jsil_parse_treet parse_tree
virtual bool from_expr(const exprt &expr, std::string &code, const namespacet &ns) override
Formats the given expression in a language-specific way.
virtual bool parse(std::istream &instream, const std::string &path) override
virtual ~jsil_languaget()
virtual bool generate_support_functions(symbol_tablet &symbol_table) override
Create language-specific support functions, such as __CPROVER_start, __CPROVER_initialize and languag...
virtual bool typecheck(symbol_tablet &context, const std::string &module) override
Converting from parse tree and type checking.
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.
virtual std::set< std::string > extensions() const override
virtual bool from_type(const typet &type, std::string &code, const namespacet &ns) override
Formats the given type in a language-specific way.
virtual void show_parse(std::ostream &out) override
virtual void modules_provided(std::set< std::string > &modules) override
virtual bool interfaces(symbol_tablet &symbol_table) override
Adding symbols for all procedure declarations.
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)
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_tablet &symbol_table, message_handlert &message_handler)
Jsil Language Conversion.
bool jsil_entry_point(symbol_tablet &symbol_table, message_handlert &message_handler)
void jsil_internal_additions(symbol_tablet &dest)
std::unique_ptr< languaget > new_jsil_language()
bool jsil_typecheck(symbol_tablet &symbol_table, message_handlert &message_handler)