cprover
jsil_typecheckt Class Reference

#include <jsil_typecheck.h>

+ Inheritance diagram for jsil_typecheckt:
+ Collaboration diagram for jsil_typecheckt:

Public Member Functions

 jsil_typecheckt (symbol_table_baset &_symbol_table, message_handlert &_message_handler)
 
virtual ~jsil_typecheckt ()
 
virtual void typecheck ()
 
virtual void typecheck_expr (exprt &expr)
 
- Public Member Functions inherited from typecheckt
 typecheckt (message_handlert &_message_handler)
 
virtual ~typecheckt ()
 
virtual bool typecheck_main ()
 
- Public Member Functions inherited from messaget
virtual void set_message_handler (message_handlert &_message_handler)
 
message_handlertget_message_handler ()
 
 messaget ()
 
 messaget (const messaget &other)
 
messagetoperator= (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level) const
 
mstreamterror () const
 
mstreamtwarning () const
 
mstreamtresult () const
 
mstreamtstatus () const
 
mstreamtstatistics () const
 
mstreamtprogress () const
 
mstreamtdebug () const
 
void conditional_output (mstreamt &mstream, const std::function< void(mstreamt &)> &output_generator) const
 Generate output to message_stream using output_generator if the configured verbosity is at least as high as that of message_stream. More...
 

Protected Member Functions

void update_expr_type (exprt &expr, const typet &type)
 
void make_type_compatible (exprt &expr, const typet &type, bool must)
 
void typecheck_type_symbol (symbolt &)
 
void typecheck_non_type_symbol (symbolt &symbol)
 typechecking procedure declaration; any other symbols should have been typechecked during typechecking of procedure declaration More...
 
void typecheck_symbol_expr (symbol_exprt &symbol_expr)
 
void typecheck_expr_side_effect_throw (side_effect_expr_throwt &expr)
 
void typecheck_expr_delete (exprt &expr)
 
void typecheck_expr_index (exprt &expr)
 
void typecheck_expr_proto_field (exprt &expr)
 
void typecheck_expr_proto_obj (exprt &expr)
 
void typecheck_expr_has_field (exprt &expr)
 
void typecheck_expr_ref (exprt &expr)
 
void typecheck_expr_field (exprt &expr)
 
void typecheck_expr_base (exprt &expr)
 
void typecheck_expr_constant (exprt &expr)
 
void typecheck_expr_concatenation (exprt &expr)
 
void typecheck_expr_subtype (exprt &expr)
 
void typecheck_expr_binary_boolean (exprt &expr)
 
void typecheck_expr_binary_arith (exprt &expr)
 
void typecheck_exp_binary_equal (exprt &expr)
 
void typecheck_expr_binary_compare (exprt &expr)
 
void typecheck_expr_unary_boolean (exprt &expr)
 
void typecheck_expr_unary_string (exprt &expr)
 
void typecheck_expr_unary_num (exprt &expr)
 
void typecheck_expr_operands (exprt &expr)
 
void typecheck_expr_main (exprt &expr)
 
void typecheck_code (codet &code)
 
void typecheck_function_call (code_function_callt &function_call)
 
void typecheck_return (code_returnt &code)
 
void typecheck_block (codet &code)
 
void typecheck_ifthenelse (code_ifthenelset &code)
 
void typecheck_assign (code_assignt &code)
 
void typecheck_try_catch (code_try_catcht &code)
 
void typecheck_type (typet &type)
 
irep_idt add_prefix (const irep_idt &ds)
 Prefix parameters and variables with a procedure name. More...
 
virtual std::string to_string (const exprt &expr)
 
virtual std::string to_string (const typet &type)
 

Protected Attributes

symbol_table_basetsymbol_table
 
const namespacet ns
 
irep_idt proc_name
 
std::unordered_set< irep_idtalready_typechecked
 
- Protected Attributes inherited from messaget
message_handlertmessage_handler
 
mstreamt mstream
 

Additional Inherited Members

- Public Types inherited from messaget
enum  message_levelt {
  M_ERROR =1, M_WARNING =2, M_RESULT =4, M_STATUS =6,
  M_STATISTICS =8, M_PROGRESS =9, M_DEBUG =10
}
 
- Static Public Member Functions inherited from messaget
static unsigned eval_verbosity (const std::string &user_input, const message_levelt default_verbosity, message_handlert &dest)
 Parse a (user-)provided string as a verbosity level and set it as the verbosity of dest. More...
 
static commandt command (unsigned c)
 Create an ECMA-48 SGR (Select Graphic Rendition) command. More...
 
- Static Public Attributes inherited from messaget
static eomt eom
 
static const commandt reset
 return to default formatting, as defined by the terminal More...
 
static const commandt red
 render text with red foreground color More...
 
static const commandt green
 render text with green foreground color More...
 
static const commandt yellow
 render text with yellow foreground color More...
 
static const commandt blue
 render text with blue foreground color More...
 
static const commandt magenta
 render text with magenta foreground color More...
 
static const commandt cyan
 render text with cyan foreground color More...
 
static const commandt bright_red
 render text with bright red foreground color More...
 
static const commandt bright_green
 render text with bright green foreground color More...
 
static const commandt bright_yellow
 render text with bright yellow foreground color More...
 
static const commandt bright_blue
 render text with bright blue foreground color More...
 
static const commandt bright_magenta
 render text with bright magenta foreground color More...
 
static const commandt bright_cyan
 render text with bright cyan foreground color More...
 
static const commandt bold
 render text with bold font More...
 
static const commandt faint
 render text with faint font More...
 
static const commandt italic
 render italic text More...
 
static const commandt underline
 render underlined text More...
 

Detailed Description

Definition at line 34 of file jsil_typecheck.h.

Constructor & Destructor Documentation

◆ jsil_typecheckt()

jsil_typecheckt::jsil_typecheckt ( symbol_table_baset _symbol_table,
message_handlert _message_handler 
)
inline

Definition at line 37 of file jsil_typecheck.h.

◆ ~jsil_typecheckt()

virtual jsil_typecheckt::~jsil_typecheckt ( )
inlinevirtual

Definition at line 47 of file jsil_typecheck.h.

Member Function Documentation

◆ add_prefix()

irep_idt jsil_typecheckt::add_prefix ( const irep_idt ds)
protected

Prefix parameters and variables with a procedure name.

Definition at line 32 of file jsil_typecheck.cpp.

◆ make_type_compatible()

void jsil_typecheckt::make_type_compatible ( exprt expr,
const typet type,
bool  must 
)
protected

Definition at line 60 of file jsil_typecheck.cpp.

◆ to_string() [1/2]

std::string jsil_typecheckt::to_string ( const exprt expr)
protectedvirtual

Definition at line 21 of file jsil_typecheck.cpp.

◆ to_string() [2/2]

std::string jsil_typecheckt::to_string ( const typet type)
protectedvirtual

Definition at line 26 of file jsil_typecheck.cpp.

◆ typecheck()

void jsil_typecheckt::typecheck ( )
virtual

Implements typecheckt.

Definition at line 867 of file jsil_typecheck.cpp.

◆ typecheck_assign()

void jsil_typecheckt::typecheck_assign ( code_assignt code)
protected

Definition at line 824 of file jsil_typecheck.cpp.

◆ typecheck_block()

void jsil_typecheckt::typecheck_block ( codet code)
protected

Definition at line 686 of file jsil_typecheck.cpp.

◆ typecheck_code()

void jsil_typecheckt::typecheck_code ( codet code)
protected

Definition at line 632 of file jsil_typecheck.cpp.

◆ typecheck_exp_binary_equal()

void jsil_typecheckt::typecheck_exp_binary_equal ( exprt expr)
protected

Definition at line 486 of file jsil_typecheck.cpp.

◆ typecheck_expr()

void jsil_typecheckt::typecheck_expr ( exprt expr)
virtual

Definition at line 137 of file jsil_typecheck.cpp.

◆ typecheck_expr_base()

void jsil_typecheckt::typecheck_expr_base ( exprt expr)
protected

Definition at line 383 of file jsil_typecheck.cpp.

◆ typecheck_expr_binary_arith()

void jsil_typecheckt::typecheck_expr_binary_arith ( exprt expr)
protected

Definition at line 471 of file jsil_typecheck.cpp.

◆ typecheck_expr_binary_boolean()

void jsil_typecheckt::typecheck_expr_binary_boolean ( exprt expr)
protected

Definition at line 456 of file jsil_typecheck.cpp.

◆ typecheck_expr_binary_compare()

void jsil_typecheckt::typecheck_expr_binary_compare ( exprt expr)
protected

Definition at line 500 of file jsil_typecheck.cpp.

◆ typecheck_expr_concatenation()

void jsil_typecheckt::typecheck_expr_concatenation ( exprt expr)
protected

Definition at line 426 of file jsil_typecheck.cpp.

◆ typecheck_expr_constant()

void jsil_typecheckt::typecheck_expr_constant ( exprt expr)
protected

Definition at line 278 of file jsil_typecheck.cpp.

◆ typecheck_expr_delete()

void jsil_typecheckt::typecheck_expr_delete ( exprt expr)
protected

Definition at line 318 of file jsil_typecheck.cpp.

◆ typecheck_expr_field()

void jsil_typecheckt::typecheck_expr_field ( exprt expr)
protected

Definition at line 369 of file jsil_typecheck.cpp.

◆ typecheck_expr_has_field()

void jsil_typecheckt::typecheck_expr_has_field ( exprt expr)
protected

Definition at line 354 of file jsil_typecheck.cpp.

◆ typecheck_expr_index()

void jsil_typecheckt::typecheck_expr_index ( exprt expr)
protected

Definition at line 333 of file jsil_typecheck.cpp.

◆ typecheck_expr_main()

void jsil_typecheckt::typecheck_expr_main ( exprt expr)
protected

Definition at line 152 of file jsil_typecheck.cpp.

◆ typecheck_expr_operands()

void jsil_typecheckt::typecheck_expr_operands ( exprt expr)
protected

Definition at line 146 of file jsil_typecheck.cpp.

◆ typecheck_expr_proto_field()

void jsil_typecheckt::typecheck_expr_proto_field ( exprt expr)
protected

Definition at line 288 of file jsil_typecheck.cpp.

◆ typecheck_expr_proto_obj()

void jsil_typecheckt::typecheck_expr_proto_obj ( exprt expr)
protected

Definition at line 303 of file jsil_typecheck.cpp.

◆ typecheck_expr_ref()

void jsil_typecheckt::typecheck_expr_ref ( exprt expr)
protected

Definition at line 397 of file jsil_typecheck.cpp.

◆ typecheck_expr_side_effect_throw()

void jsil_typecheckt::typecheck_expr_side_effect_throw ( side_effect_expr_throwt expr)
protected

Definition at line 269 of file jsil_typecheck.cpp.

◆ typecheck_expr_subtype()

void jsil_typecheckt::typecheck_expr_subtype ( exprt expr)
protected

Definition at line 441 of file jsil_typecheck.cpp.

◆ typecheck_expr_unary_boolean()

void jsil_typecheckt::typecheck_expr_unary_boolean ( exprt expr)
protected

Definition at line 515 of file jsil_typecheck.cpp.

◆ typecheck_expr_unary_num()

void jsil_typecheckt::typecheck_expr_unary_num ( exprt expr)
protected

Definition at line 543 of file jsil_typecheck.cpp.

◆ typecheck_expr_unary_string()

void jsil_typecheckt::typecheck_expr_unary_string ( exprt expr)
protected

Definition at line 529 of file jsil_typecheck.cpp.

◆ typecheck_function_call()

void jsil_typecheckt::typecheck_function_call ( code_function_callt function_call)
protected

Definition at line 710 of file jsil_typecheck.cpp.

◆ typecheck_ifthenelse()

void jsil_typecheckt::typecheck_ifthenelse ( code_ifthenelset code)
protected

Definition at line 812 of file jsil_typecheck.cpp.

◆ typecheck_non_type_symbol()

void jsil_typecheckt::typecheck_non_type_symbol ( symbolt symbol)
protected

typechecking procedure declaration; any other symbols should have been typechecked during typechecking of procedure declaration

parameters: any symbol

Definition at line 835 of file jsil_typecheck.cpp.

◆ typecheck_return()

void jsil_typecheckt::typecheck_return ( code_returnt code)
protected

Definition at line 680 of file jsil_typecheck.cpp.

◆ typecheck_symbol_expr()

void jsil_typecheckt::typecheck_symbol_expr ( symbol_exprt symbol_expr)
protected

Definition at line 555 of file jsil_typecheck.cpp.

◆ typecheck_try_catch()

void jsil_typecheckt::typecheck_try_catch ( code_try_catcht code)
protected

Definition at line 692 of file jsil_typecheck.cpp.

◆ typecheck_type()

void jsil_typecheckt::typecheck_type ( typet type)
protected

Definition at line 99 of file jsil_typecheck.cpp.

◆ typecheck_type_symbol()

void jsil_typecheckt::typecheck_type_symbol ( symbolt )
inlineprotected

Definition at line 60 of file jsil_typecheck.h.

◆ update_expr_type()

void jsil_typecheckt::update_expr_type ( exprt expr,
const typet type 
)
protected

Definition at line 37 of file jsil_typecheck.cpp.

Member Data Documentation

◆ already_typechecked

std::unordered_set<irep_idt> jsil_typecheckt::already_typechecked
protected

Definition at line 98 of file jsil_typecheck.h.

◆ ns

const namespacet jsil_typecheckt::ns
protected

Definition at line 54 of file jsil_typecheck.h.

◆ proc_name

irep_idt jsil_typecheckt::proc_name
protected

Definition at line 56 of file jsil_typecheck.h.

◆ symbol_table

symbol_table_baset& jsil_typecheckt::symbol_table
protected

Definition at line 53 of file jsil_typecheck.h.


The documentation for this class was generated from the following files: