CBMC
cpp_typecheck_resolvet Class Reference

#include <cpp_typecheck_resolve.h>

+ Collaboration diagram for cpp_typecheck_resolvet:

Classes

struct  matcht
 

Public Types

enum class  wantt { VAR , TYPE , BOTH }
 

Public Member Functions

 cpp_typecheck_resolvet (class cpp_typecheckt &_cpp_typecheck)
 
exprt resolve (const cpp_namet &cpp_name, const wantt want, const cpp_typecheck_fargst &fargs, bool fail_with_exception=true)
 
cpp_scopetresolve_scope (const cpp_namet &cpp_name, irep_idt &base_name, cpp_template_args_non_tct &template_args)
 
cpp_scopetresolve_namespace (const cpp_namet &cpp_name)
 

Protected Types

typedef std::vector< exprtresolve_identifierst
 

Protected Member Functions

void convert_identifiers (const cpp_scopest::id_sett &id_set, const cpp_typecheck_fargst &fargs, resolve_identifierst &identifiers)
 
exprt convert_template_parameter (const cpp_idt &id)
 
exprt convert_identifier (const cpp_idt &id, const cpp_typecheck_fargst &fargs)
 
void disambiguate_functions (resolve_identifierst &identifiers, const cpp_typecheck_fargst &fargs)
 
void exact_match_functions (resolve_identifierst &identifiers, const cpp_typecheck_fargst &fargs)
 
void filter (resolve_identifierst &identifiers, const wantt want)
 
struct_tag_typet disambiguate_template_classes (const irep_idt &base_name, const cpp_scopest::id_sett &id_set, const cpp_template_args_non_tct &template_args)
 disambiguate partial specialization More...
 
void make_constructors (resolve_identifierst &identifiers)
 
void apply_template_args (resolve_identifierst &identifiers, const cpp_template_args_non_tct &template_args, const cpp_typecheck_fargst &fargs)
 
void apply_template_args (exprt &expr, const cpp_template_args_non_tct &template_args, const cpp_typecheck_fargst &fargs)
 
void guess_function_template_args (resolve_identifierst &identifiers, const cpp_typecheck_fargst &fargs)
 guess arguments of function templates More...
 
void remove_templates (resolve_identifierst &identifiers)
 
void remove_duplicates (resolve_identifierst &identifiers)
 
exprt guess_function_template_args (const exprt &expr, const cpp_typecheck_fargst &fargs)
 Guess template arguments for function templates. More...
 
void guess_template_args (const typet &template_parameter, const typet &desired_type)
 
void guess_template_args (const exprt &template_parameter, const exprt &desired_expr)
 
bool disambiguate_functions (const exprt &expr, unsigned &args_distance, const cpp_typecheck_fargst &fargs)
 
void resolve_argument (exprt &argument, const cpp_typecheck_fargst &fargs)
 
exprt do_builtin (const irep_idt &base_name, const cpp_typecheck_fargst &fargs, const cpp_template_args_non_tct &template_args)
 
void show_identifiers (const irep_idt &base_name, const resolve_identifierst &identifiers, std::ostream &out)
 
void resolve_with_arguments (cpp_scopest::id_sett &id_set, const irep_idt &base_name, const cpp_typecheck_fargst &fargs)
 
void filter_for_named_scopes (cpp_scopest::id_sett &id_set)
 
void filter_for_namespaces (cpp_scopest::id_sett &id_set)
 

Protected Attributes

cpp_typechecktcpp_typecheck
 
source_locationt source_location
 
cpp_scopetoriginal_scope
 

Detailed Description

Definition at line 23 of file cpp_typecheck_resolve.h.

Member Typedef Documentation

◆ resolve_identifierst

typedef std::vector<exprt> cpp_typecheck_resolvet::resolve_identifierst
protected

Definition at line 51 of file cpp_typecheck_resolve.h.

Member Enumeration Documentation

◆ wantt

Enumerator
VAR 
TYPE 
BOTH 

Definition at line 29 of file cpp_typecheck_resolve.h.

Constructor & Destructor Documentation

◆ cpp_typecheck_resolvet()

cpp_typecheck_resolvet::cpp_typecheck_resolvet ( class cpp_typecheckt _cpp_typecheck)

Definition at line 36 of file cpp_typecheck_resolve.cpp.

Member Function Documentation

◆ apply_template_args() [1/2]

void cpp_typecheck_resolvet::apply_template_args ( exprt expr,
const cpp_template_args_non_tct template_args,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 2035 of file cpp_typecheck_resolve.cpp.

◆ apply_template_args() [2/2]

void cpp_typecheck_resolvet::apply_template_args ( resolve_identifierst identifiers,
const cpp_template_args_non_tct template_args,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 61 of file cpp_typecheck_resolve.cpp.

◆ convert_identifier()

exprt cpp_typecheck_resolvet::convert_identifier ( const cpp_idt id,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 215 of file cpp_typecheck_resolve.cpp.

◆ convert_identifiers()

void cpp_typecheck_resolvet::convert_identifiers ( const cpp_scopest::id_sett id_set,
const cpp_typecheck_fargst fargs,
resolve_identifierst identifiers 
)
protected

Definition at line 42 of file cpp_typecheck_resolve.cpp.

◆ convert_template_parameter()

exprt cpp_typecheck_resolvet::convert_template_parameter ( const cpp_idt id)
protected

Definition at line 189 of file cpp_typecheck_resolve.cpp.

◆ disambiguate_functions() [1/2]

bool cpp_typecheck_resolvet::disambiguate_functions ( const exprt expr,
unsigned &  args_distance,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 2143 of file cpp_typecheck_resolve.cpp.

◆ disambiguate_functions() [2/2]

void cpp_typecheck_resolvet::disambiguate_functions ( resolve_identifierst identifiers,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 443 of file cpp_typecheck_resolve.cpp.

◆ disambiguate_template_classes()

struct_tag_typet cpp_typecheck_resolvet::disambiguate_template_classes ( const irep_idt base_name,
const cpp_scopest::id_sett id_set,
const cpp_template_args_non_tct template_args 
)
protected

disambiguate partial specialization

Definition at line 1000 of file cpp_typecheck_resolve.cpp.

◆ do_builtin()

exprt cpp_typecheck_resolvet::do_builtin ( const irep_idt base_name,
const cpp_typecheck_fargst fargs,
const cpp_template_args_non_tct template_args 
)
protected

Definition at line 670 of file cpp_typecheck_resolve.cpp.

◆ exact_match_functions()

void cpp_typecheck_resolvet::exact_match_functions ( resolve_identifierst identifiers,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 421 of file cpp_typecheck_resolve.cpp.

◆ filter()

void cpp_typecheck_resolvet::filter ( resolve_identifierst identifiers,
const wantt  want 
)
protected

Definition at line 387 of file cpp_typecheck_resolve.cpp.

◆ filter_for_named_scopes()

void cpp_typecheck_resolvet::filter_for_named_scopes ( cpp_scopest::id_sett id_set)
protected

Definition at line 2207 of file cpp_typecheck_resolve.cpp.

◆ filter_for_namespaces()

void cpp_typecheck_resolvet::filter_for_namespaces ( cpp_scopest::id_sett id_set)
protected

Definition at line 2325 of file cpp_typecheck_resolve.cpp.

◆ guess_function_template_args() [1/2]

exprt cpp_typecheck_resolvet::guess_function_template_args ( const exprt expr,
const cpp_typecheck_fargst fargs 
)
protected

Guess template arguments for function templates.

Definition at line 1886 of file cpp_typecheck_resolve.cpp.

◆ guess_function_template_args() [2/2]

void cpp_typecheck_resolvet::guess_function_template_args ( resolve_identifierst identifiers,
const cpp_typecheck_fargst fargs 
)
protected

guess arguments of function templates

Definition at line 84 of file cpp_typecheck_resolve.cpp.

◆ guess_template_args() [1/2]

void cpp_typecheck_resolvet::guess_template_args ( const exprt template_parameter,
const exprt desired_expr 
)
protected

Definition at line 1715 of file cpp_typecheck_resolve.cpp.

◆ guess_template_args() [2/2]

void cpp_typecheck_resolvet::guess_template_args ( const typet template_parameter,
const typet desired_type 
)
protected

Definition at line 1755 of file cpp_typecheck_resolve.cpp.

◆ make_constructors()

void cpp_typecheck_resolvet::make_constructors ( resolve_identifierst identifiers)
protected

Definition at line 582 of file cpp_typecheck_resolve.cpp.

◆ remove_duplicates()

void cpp_typecheck_resolvet::remove_duplicates ( resolve_identifierst identifiers)
protected

Definition at line 156 of file cpp_typecheck_resolve.cpp.

◆ remove_templates()

void cpp_typecheck_resolvet::remove_templates ( resolve_identifierst identifiers)
protected

Definition at line 132 of file cpp_typecheck_resolve.cpp.

◆ resolve()

exprt cpp_typecheck_resolvet::resolve ( const cpp_namet cpp_name,
const wantt  want,
const cpp_typecheck_fargst fargs,
bool  fail_with_exception = true 
)

Definition at line 1373 of file cpp_typecheck_resolve.cpp.

◆ resolve_argument()

void cpp_typecheck_resolvet::resolve_argument ( exprt argument,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 656 of file cpp_typecheck_resolve.cpp.

◆ resolve_namespace()

cpp_scopet & cpp_typecheck_resolvet::resolve_namespace ( const cpp_namet cpp_name)

Definition at line 1241 of file cpp_typecheck_resolve.cpp.

◆ resolve_scope()

cpp_scopet & cpp_typecheck_resolvet::resolve_scope ( const cpp_namet cpp_name,
irep_idt base_name,
cpp_template_args_non_tct template_args 
)
parameters: a cpp_name
Returns
a base_name, and potentially template arguments for the base name; as side-effect, we got to the right scope

Definition at line 866 of file cpp_typecheck_resolve.cpp.

◆ resolve_with_arguments()

void cpp_typecheck_resolvet::resolve_with_arguments ( cpp_scopest::id_sett id_set,
const irep_idt base_name,
const cpp_typecheck_fargst fargs 
)
protected

Definition at line 2345 of file cpp_typecheck_resolve.cpp.

◆ show_identifiers()

void cpp_typecheck_resolvet::show_identifiers ( const irep_idt base_name,
const resolve_identifierst identifiers,
std::ostream &  out 
)
protected

Definition at line 1279 of file cpp_typecheck_resolve.cpp.

Member Data Documentation

◆ cpp_typecheck

cpp_typecheckt& cpp_typecheck_resolvet::cpp_typecheck
protected

Definition at line 47 of file cpp_typecheck_resolve.h.

◆ original_scope

cpp_scopet* cpp_typecheck_resolvet::original_scope
protected

Definition at line 49 of file cpp_typecheck_resolve.h.

◆ source_location

source_locationt cpp_typecheck_resolvet::source_location
protected

Definition at line 48 of file cpp_typecheck_resolve.h.


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