cprover
Loading...
Searching...
No Matches
cpp_typecheck.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: C++ Language Type Checking
4
5Author: Daniel Kroening, kroening@cs.cmu.edu
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_CPP_CPP_TYPECHECK_H
13#define CPROVER_CPP_CPP_TYPECHECK_H
14
15#include <util/std_code_base.h>
16
18
19#include "cpp_parse_tree.h"
20#include "cpp_scopes.h"
22#include "template_map.h"
23
24#include <list>
25#include <set>
26#include <unordered_set>
27
28bool cpp_typecheck(
29 cpp_parse_treet &cpp_parse_tree,
30 symbol_table_baset &symbol_table,
31 const std::string &module,
32 message_handlert &message_handler);
33
34bool cpp_typecheck(
35 exprt &expr,
36 message_handlert &message_handler,
37 const namespacet &ns);
38
40{
41public:
54
72
73 ~cpp_typecheckt() override
74 {
75 }
76
77 void typecheck() override;
78
79 // overload to use C++ syntax
80 std::string to_string(const typet &) override;
81 std::string to_string(const exprt &) override;
82
85
96
97 void typecheck_expr(exprt &) override;
98
99 bool cpp_is_pod(const typet &type) const;
100
102 const source_locationt &source_location,
103 const exprt &object,
104 const exprt::operandst &operands);
105
106protected:
108
111
114 void convert(cpp_usingt &);
115 void convert(cpp_itemt &);
119
120 void convert_initializer(symbolt &symbol);
121 void convert_function(symbolt &symbol);
122
123 void convert_pmop(exprt &expr);
124
126
128 const cpp_declarationt &declaration,
129 const irep_idt &access,
130 struct_typet::componentst &components);
131
132 //
133 // Templates
134 //
138
140
142
144 cpp_declarationt &declaration);
145
147 cpp_declarationt &declaration);
148
150
152
154
155 std::string class_template_identifier(
156 const irep_idt &base_name,
157 const template_typet &template_type,
158 const cpp_template_args_non_tct &partial_specialization_args);
159
161 const irep_idt &base_name,
162 const template_typet &template_type,
163 const typet &function_type);
164
166 const source_locationt &source_location,
169
170 // template instantiations
178
179 typedef std::list<instantiationt> instantiation_stackt;
181
182 void show_instantiation_stack(std::ostream &);
183
202
204 const source_locationt &source_location,
207 const cpp_template_args_tct &full_template_args);
208
210 const typet &type);
211
213 const source_locationt &source_location,
214 const symbolt &symbol,
216 const cpp_template_args_tct &full_template_args,
218
220 const source_locationt &source_location,
221 const struct_tag_typet &type);
222
224 unsigned anon_counter;
225
227
228 std::string template_suffix(
230
233 const std::string &suffix);
234
235 void
236 convert_parameters(const irep_idt &current_mode, code_typet &function_type);
237
239 const irep_idt &current_mode,
241
242 //
243 // Misc
244 //
245
246 void default_ctor(
247 const source_locationt &source_location,
248 const irep_idt &base_name,
249 cpp_declarationt &ctor) const;
250
251 void default_cpctor(
252 const symbolt&, cpp_declarationt &cpctor) const;
253
254 void default_assignop(
255 const symbolt &symbol, cpp_declarationt &cpctor);
256
258 const symbolt &symbol, cpp_declaratort &declarator);
259
261
262 codet dtor(const symbolt &symb, const symbol_exprt &this_expr);
263
265 const struct_typet::basest &bases,
266 const struct_typet::componentst &components,
267 const irept &initializers);
268
272
276
277 bool find_cpctor(const symbolt &symbol)const;
278 bool find_assignop(const symbolt &symbol)const;
279 bool find_dtor(const symbolt &symbol)const;
280
281 bool find_parent(
282 const symbolt &symb,
283 const irep_idt &base_name,
284 irep_idt &identifier);
285
286 bool get_component(
287 const source_locationt &source_location,
288 const exprt &object,
289 const irep_idt &component_name,
290 exprt &member);
291
292 void new_temporary(const source_locationt &source_location,
293 const typet &,
294 const exprt::operandst &ops,
296
297 void new_temporary(const source_locationt &source_location,
298 const typet &,
299 const exprt &op,
301
303 void do_not_typechecked();
304 void clean_up();
305
307 const struct_typet &from,
308 const irep_idt &access,
310 std::set<irep_idt> &bases,
311 std::set<irep_idt> &vbases,
312 bool is_virtual);
313
314 bool cast_away_constness(const typet &t1,
315 const typet &t2) const;
316
317 void do_virtual_table(const symbolt &symbol);
318
319 // we need to be able to delay the typechecking
320 // of method bodies to handle methods with
321 // bodies in the class definition
339
340 typedef std::list<method_bodyt> method_bodiest;
341 std::set<irep_idt> methods_seen;
343
345
346 bool builtin_factory(const irep_idt &);
347
348 // types
349
350 void typecheck_type(typet &) override;
351
353 template_typet &type);
354
356 void check_fixed_size_array(typet &type);
357 void typecheck_enum_type(typet &type);
358
359 // determine the scope into which a tag goes
360 // (enums, structs, union, classes)
362 const irep_idt &_base_name,
363 bool has_body,
365
367 const symbolt &symbol,
368 const cpp_declarationt &declaration,
369 cpp_declaratort &declarator,
370 struct_typet::componentst &components,
371 const irep_idt &access,
372 bool is_static,
373 bool is_typedef,
374 bool is_mutable);
375
377 symbolt &symbol,
379
381 void typecheck_compound_body(symbolt &symbol);
383 {
385 }
386 void typecheck_enum_body(symbolt &symbol);
390
393 const code_typet &type,
394 exprt &value);
395
396 static bool has_const(const typet &type);
397 static bool has_volatile(const typet &type);
398 static bool has_auto(const typet &type);
399
404 const typet &method_qualifier,
405 exprt &value);
406
410 const typet &method_qualifier);
411
412 // for function overloading
414
415 void zero_initializer(
416 const exprt &object,
417 const typet &type,
418 const source_locationt &source_location,
420
421 // code conversion
422 void typecheck_code(codet &) override;
425 void typecheck_decl(codet &) override;
426 void typecheck_block(code_blockt &) override;
427 void typecheck_ifthenelse(code_ifthenelset &) override;
428 void typecheck_while(code_whilet &) override;
429 void typecheck_switch(codet &) override;
430
432
434 cpp_destructor(const source_locationt &source_location, const exprt &object);
435
436 // expressions
438 void typecheck_expr_main(exprt &) override;
439 void typecheck_expr_member(exprt &) override;
440 void typecheck_expr_ptrmember(exprt &) override;
447 void typecheck_expr_trinary(if_exprt &) override;
451 void typecheck_expr_address_of(exprt &) override;
452 void typecheck_expr_dereference(exprt &) override;
457 void typecheck_expr_sizeof(exprt &) override;
462 void typecheck_expr_typecast(exprt &) override;
463 void typecheck_expr_index(exprt &) override;
465 void typecheck_expr_comma(exprt &) override;
466
467 void
469
471 bool overloadable(const exprt &);
472
474
477
479
480public:
481 //
482 // Type Conversions
483 //
484
486 const exprt &expr, exprt &new_expr) const;
487
489 const exprt &expr, exprt &new_expr) const;
490
492 const exprt &expr, exprt &new_expr) const;
493
495 const exprt &expr, const typet&, exprt &new_expr) const;
496
498 const exprt &expr, exprt &new_expr) const;
499
501 const exprt &expr, exprt &new_expr) const;
502
504 const exprt &expr, const typet &type, exprt &new_expr) const;
505
507 const exprt &expr, const typet &type, exprt &new_expr) const;
508
510 const exprt &expr, const typet &type, exprt &new_expr) const;
511
513 const exprt &expr, const typet &type, exprt &new_expr);
514
516 const exprt &expr, const typet &type, exprt &new_expr);
517
519 const exprt &expr, exprt &new_expr) const;
520
522 const exprt &expr, const typet &type, exprt &new_expr, unsigned &rank);
523
525 const exprt &expr, const typet &type, exprt &new_expr, unsigned &rank);
526
528 const exprt &expr, const typet &type) const;
529
531 const exprt &expr, const typet &type, unsigned &rank) const;
532
534 exprt expr, const typet &type, exprt &new_expr, unsigned &rank);
535
537 const exprt &expr, const typet &type, exprt &new_expr, unsigned &rank);
538
540 const exprt &expr, const typet &type, unsigned &rank);
541
543 const exprt &expr, const typet &type, exprt &new_expr);
544
545 void reference_initializer(exprt &expr, const typet &type);
546
547 void implicit_typecast(exprt &expr, const typet &type) override;
548
549 void get_bases(const struct_typet &type,
550 std::set<irep_idt> &set_bases) const;
551
552 void get_virtual_bases(const struct_typet &type,
553 std::list<irep_idt> &vbases) const;
554
555 bool subtype_typecast(
556 const struct_typet &from,
557 const struct_typet &to) const;
558
560 exprt &expr,
561 const typet &dest_type);
562
563 // the C++ typecasts
564
565 bool const_typecast(
566 const exprt &expr,
567 const typet &type,
568 exprt &new_expr);
569
570 bool dynamic_typecast(
571 const exprt &expr,
572 const typet &type,
573 exprt &new_expr);
574
576 const exprt &expr,
577 const typet &type,
579 bool check_constantness=true);
580
581 bool static_typecast(
582 const exprt &expr,
583 const typet &type,
585 bool check_constantness=true);
586
587 bool contains_cpp_name(const exprt &);
588
589private:
590 typedef std::list<irep_idt> dynamic_initializationst;
592 bool disable_access_control; // Disable protect and private
593 std::unordered_set<irep_idt> deferred_typechecking;
594};
595
596#endif // CPROVER_CPP_CPP_TYPECHECK_H
ANSI-C Language Type Checking.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:563
A base class for relations, i.e., binary predicates whose two operands have the same type.
Definition std_expr.h:707
A codet representing sequential composition of program statements.
Definition std_code.h:130
codet representation of an if-then-else statement.
Definition std_code.h:460
Base type of functions.
Definition std_types.h:539
codet representing a while statement.
Definition std_code.h:610
Data structure for representing an arbitrary statement in a program.
instantiation_stackt & instantiation_stack
instantiation_levelt(instantiation_stackt &_instantiation_stack)
cpp_template_args_tct full_template_args
bool find_parent(const symbolt &symb, const irep_idt &base_name, irep_idt &identifier)
void default_assignop(const symbolt &symbol, cpp_declarationt &cpctor)
Generate declaration of the implicit default assignment operator.
void typecheck_expr_typecast(exprt &) override
void typecheck_compound_body(symbolt &symbol)
void do_virtual_table(const symbolt &symbol)
void static_and_dynamic_initialization()
Initialization of static objects:
std::string template_suffix(const cpp_template_args_tct &template_args)
std::set< irep_idt > methods_seen
void typecheck_side_effect_assignment(side_effect_exprt &) override
bool implicit_conversion_sequence(const exprt &expr, const typet &type, exprt &new_expr, unsigned &rank)
implicit conversion sequence
bool reference_compatible(const exprt &expr, const typet &type, unsigned &rank) const
Reference-compatible.
optionalt< codet > cpp_destructor(const source_locationt &source_location, const exprt &object)
bool standard_conversion_floating_point_conversion(const exprt &expr, const typet &type, exprt &new_expr) const
Floating-point conversion.
void put_compound_into_scope(const struct_union_typet::componentt &component)
std::string class_template_identifier(const irep_idt &base_name, const template_typet &template_type, const cpp_template_args_non_tct &partial_specialization_args)
void typecheck_type(typet &) override
void convert_anon_struct_union_member(const cpp_declarationt &declaration, const irep_idt &access, struct_typet::componentst &components)
void typecheck_switch(codet &) override
void explicit_typecast_ambiguity(exprt &)
void typecheck_compound_body(struct_union_typet &) override
instantiation_stackt instantiation_stack
void full_member_initialization(const struct_union_typet &struct_union_type, irept &initializers)
Build the full initialization list of the constructor.
bool contains_cpp_name(const exprt &)
void typecheck_decl(codet &) override
template_mapt template_map
bool reinterpret_typecast(const exprt &expr, const typet &type, exprt &new_expr, bool check_constantness=true)
std::string function_template_identifier(const irep_idt &base_name, const template_typet &template_type, const typet &function_type)
void typecheck_enum_type(typet &type)
void convert_pmop(exprt &expr)
void typecheck_expr_sizeof(exprt &) override
void add_base_components(const struct_typet &from, const irep_idt &access, struct_typet &to, std::set< irep_idt > &bases, std::set< irep_idt > &vbases, bool is_virtual)
static bool has_const(const typet &type)
dynamic_initializationst dynamic_initializations
bool standard_conversion_boolean(const exprt &expr, exprt &new_expr) const
Boolean conversion.
void typecheck_code(codet &) override
std::list< method_bodyt > method_bodiest
void convert_template_declaration(cpp_declarationt &declaration)
bool standard_conversion_pointer(const exprt &expr, const typet &type, exprt &new_expr)
Pointer conversion.
void convert_function(symbolt &symbol)
void typecheck_expr_explicit_typecast(exprt &)
void typecheck_compound_declarator(const symbolt &symbol, const cpp_declarationt &declaration, cpp_declaratort &declarator, struct_typet::componentst &components, const irep_idt &access, bool is_static, bool is_typedef, bool is_mutable)
void implicit_typecast(exprt &expr, const typet &type) override
void typecheck_cast_expr(exprt &)
void salvage_default_arguments(const template_typet &old_type, template_typet &new_type)
void default_dtor(const symbolt &symb, cpp_declarationt &dtor)
Note:
bool standard_conversion_integral_conversion(const exprt &expr, const typet &type, exprt &new_expr) const
Integral conversion.
bool standard_conversion_sequence(const exprt &expr, const typet &type, exprt &new_expr, unsigned &rank)
Standard Conversion Sequence.
void typecheck_expr_dereference(exprt &) override
void convert_non_template_declaration(cpp_declarationt &declaration)
irep_idt current_linkage_spec
bool standard_conversion_qualification(const exprt &expr, const typet &, exprt &new_expr) const
Qualification conversion.
unsigned anon_counter
void typecheck_function_template(cpp_declarationt &declaration)
typecheck function templates
unsigned template_counter
void typecheck_member_initializer(codet &)
bool check_component_access(const struct_union_typet::componentt &component, const struct_union_typet &struct_union_type)
void typecheck_side_effect_function_call(side_effect_expr_function_callt &) override
std::list< instantiationt > instantiation_stackt
void typecheck_member_function(const symbolt &compound_symbol, struct_typet::componentt &component, irept &initializers, const typet &method_qualifier, exprt &value)
bool cpp_is_pod(const typet &type) const
void convert_initializer(symbolt &symbol)
Initialize an object with a value.
void check_fixed_size_array(typet &type)
check that an array has fixed size
void default_cpctor(const symbolt &, cpp_declarationt &cpctor) const
Generate code for implicit default copy constructor.
bool standard_conversion_floating_point_promotion(const exprt &expr, exprt &new_expr) const
Floating-point-promotion conversion.
bool find_assignop(const symbolt &symbol) const
bool get_component(const source_locationt &source_location, const exprt &object, const irep_idt &component_name, exprt &member)
bool standard_conversion_floating_integral_conversion(const exprt &expr, const typet &type, exprt &new_expr) const
Floating-integral conversion.
bool const_typecast(const exprt &expr, const typet &type, exprt &new_expr)
void new_temporary(const source_locationt &source_location, const typet &, const exprt::operandst &ops, exprt &temporary)
void typecheck_compound_type(struct_union_typet &) override
void add_anonymous_members_to_scope(const symbolt &struct_union_symbol)
void typecheck_expr_trinary(if_exprt &) override
void typecheck_class_template_member(cpp_declarationt &declaration)
typecheck class template members; these can be methods or static members
codet dtor(const symbolt &symb, const symbol_exprt &this_expr)
produces destructor code for a class object
void typecheck_try_catch(codet &)
void get_virtual_bases(const struct_typet &type, std::list< irep_idt > &vbases) const
void typecheck_expr_rel(binary_relation_exprt &) override
void typecheck_expr_reference_to(exprt &)
void show_instantiation_stack(std::ostream &)
bool standard_conversion_function_to_pointer(const exprt &expr, exprt &new_expr) const
Function-to-pointer conversion.
cpp_template_args_tct typecheck_template_args(const source_locationt &source_location, const symbolt &template_symbol, const cpp_template_args_non_tct &template_args)
void convert(cpp_linkage_spect &)
bool standard_conversion_array_to_pointer(const exprt &expr, exprt &new_expr) const
Array-to-pointer conversion.
std::unordered_set< irep_idt > deferred_typechecking
bool dynamic_typecast(const exprt &expr, const typet &type, exprt &new_expr)
void add_method_body(symbolt *_method_symbol)
void check_member_initializers(const struct_typet::basest &bases, const struct_typet::componentst &components, const irept &initializers)
Check a constructor initialization-list.
void typecheck_expr_binary_arithmetic(exprt &) override
void typecheck_expr_delete(exprt &)
method_bodiest method_bodies
void default_assignop_value(const symbolt &symbol, cpp_declaratort &declarator)
Generate code for the implicit default assignment operator.
cpp_scopet & sub_scope_for_instantiation(cpp_scopet &template_scope, const std::string &suffix)
Set up a scope as subscope of the template scope.
cpp_typecheckt(cpp_parse_treet &_cpp_parse_tree, symbol_table_baset &_symbol_table, const std::string &_module, message_handlert &message_handler)
void typecheck_ifthenelse(code_ifthenelset &) override
cpp_scopet & tag_scope(const irep_idt &_base_name, bool has_body, bool tag_only_declaration)
void typecheck_compound_bases(struct_typet &type)
optionalt< codet > cpp_constructor(const source_locationt &source_location, const exprt &object, const exprt::operandst &operands)
void typecheck_expr_main(exprt &) override
Called after the operands are done.
void elaborate_class_template(const typet &type)
elaborate class template instances
static bool has_auto(const typet &type)
static bool has_volatile(const typet &type)
bool operator_is_overloaded(exprt &)
bool user_defined_conversion_sequence(const exprt &expr, const typet &type, exprt &new_expr, unsigned &rank)
User-defined conversion sequence.
cpp_typecheckt(cpp_parse_treet &_cpp_parse_tree, symbol_table_baset &_symbol_table1, const symbol_table_baset &_symbol_table2, const std::string &_module, message_handlert &message_handler)
~cpp_typecheckt() override
bool standard_conversion_lvalue_to_rvalue(const exprt &expr, exprt &new_expr) const
Lvalue-to-rvalue conversion.
irep_idt function_identifier(const typet &type)
for function overloading
bool cast_away_constness(const typet &t1, const typet &t2) const
void typecheck() override
typechecking main method
void typecheck_expr_new(exprt &)
codet convert_anonymous_union(cpp_declarationt &declaration)
void add_implicit_dereference(exprt &)
void typecheck_expr_cpp_name(exprt &, const cpp_typecheck_fargst &)
void typecheck_expr(exprt &) override
void typecheck_friend_declaration(symbolt &symbol, cpp_declarationt &cpp_declaration)
void add_this_to_method_type(const symbolt &compound_symbol, code_typet &method_type, const typet &method_qualifier)
void typecheck_expr_side_effect(side_effect_exprt &) override
void typecheck_expr_comma(exprt &) override
bool static_typecast(const exprt &expr, const typet &type, exprt &new_expr, bool check_constantness=true)
bool subtype_typecast(const struct_typet &from, const struct_typet &to) const
void convert_parameter(const irep_idt &current_mode, code_typet::parametert &parameter)
void typecheck_enum_body(symbolt &symbol)
void typecheck_expr_explicit_constructor_call(exprt &)
bool standard_conversion_integral_promotion(const exprt &expr, exprt &new_expr) const
Integral-promotion conversion.
bool builtin_factory(const irep_idt &)
bool find_cpctor(const symbolt &symbol) const
void typecheck_function_expr(exprt &, const cpp_typecheck_fargst &)
cpp_scopet & typecheck_template_parameters(template_typet &type)
void move_member_initializers(irept &initializers, const code_typet &type, exprt &value)
void convert(cpp_declaratort &)
void typecheck_method_application(side_effect_expr_function_callt &)
std::string to_string(const typet &) override
bool disable_access_control
void elaborate_class_template(const source_locationt &source_location, const struct_tag_typet &type)
void typecheck_expr_this(exprt &)
void typecheck_expr_throw(exprt &)
bool overloadable(const exprt &)
void typecheck_block(code_blockt &) override
std::list< irep_idt > dynamic_initializationst
void convert_parameters(const irep_idt &current_mode, code_typet &function_type)
void typecheck_while(code_whilet &) override
const struct_typet & this_struct_type()
void typecheck_expr_index(exprt &) override
void typecheck_side_effect_inc_dec(side_effect_exprt &)
void make_ptr_typecast(exprt &expr, const typet &dest_type)
void zero_initializer(const exprt &object, const typet &type, const source_locationt &source_location, exprt::operandst &ops)
bool standard_conversion_pointer_to_member(const exprt &expr, const typet &type, exprt &new_expr)
Pointer-to-member conversion.
void typecheck_class_template(cpp_declarationt &declaration)
cpp_parse_treet & cpp_parse_tree
void typecheck_function_call_arguments(side_effect_expr_function_callt &) override
const symbolt & instantiate_template(const source_locationt &source_location, const symbolt &symbol, const cpp_template_args_tct &specialization_template_args, const cpp_template_args_tct &full_template_args, const typet &specialization=uninitialized_typet{})
void typecheck_expr_ptrmember(exprt &) override
const symbolt & class_template_symbol(const source_locationt &source_location, const symbolt &template_symbol, const cpp_template_args_tct &specialization_template_args, const cpp_template_args_tct &full_template_args)
void default_ctor(const source_locationt &source_location, const irep_idt &base_name, cpp_declarationt &ctor) const
Generate code for implicit default constructors.
exprt resolve(const cpp_namet &cpp_name, const cpp_typecheck_resolvet::wantt want, const cpp_typecheck_fargst &fargs, bool fail_with_exception=true)
cpp_scopest cpp_scopes
void reference_initializer(exprt &expr, const typet &type)
A reference to type "cv1 T1" is initialized by an expression of type "cv2 T2" as follows:
void get_bases(const struct_typet &type, std::set< irep_idt > &set_bases) const
void convert_template_function_or_member_specialization(cpp_declarationt &declaration)
void convert_class_template_specialization(cpp_declarationt &declaration)
bool reference_binding(exprt expr, const typet &type, exprt &new_expr, unsigned &rank)
Reference binding.
void typecheck_expr_address_of(exprt &) override
bool find_dtor(const symbolt &symbol) const
void typecheck_expr_function_identifier(exprt &) override
void typecheck_expr_member(exprt &) override
bool reference_related(const exprt &expr, const typet &type) const
Reference-related.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:39
Base class for all expressions.
Definition expr.h:56
std::vector< exprt > operandst
Definition expr.h:58
The trinary if-then-else operator.
Definition std_expr.h:2323
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition irep.h:372
message_handlert * message_handler
Definition message.h:439
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition namespace.h:91
A side_effect_exprt representation of a function call side effect.
Definition std_code.h:1692
An expression containing a side effect.
Definition std_code.h:1450
A struct tag type, i.e., struct_typet with an identifier.
Definition std_types.h:449
Structure type, corresponds to C style structs.
Definition std_types.h:231
std::vector< baset > basest
Definition std_types.h:259
Base type for structs and unions.
Definition std_types.h:62
std::vector< componentt > componentst
Definition std_types.h:140
Expression to hold a symbol (variable)
Definition std_expr.h:113
The symbol table base class interface.
Symbol table entry.
Definition symbol.h:28
The type of an expression, extends irept.
Definition type.h:29
C++ Parser.
C++ Language Type Checking.
bool cpp_typecheck(cpp_parse_treet &cpp_parse_tree, symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler)
C++ Language Type Checking.
#define UNREACHABLE
This should be used to mark dead code.
Definition invariant.h:525
auto component(T &struct_expr, const irep_idt &name, const namespacet &ns) -> decltype(struct_expr.op0())
Definition std_expr.cpp:77
instantiation_stackt instantiation_stack
method_bodyt(symbolt *_method_symbol, const template_mapt &_template_map, const instantiation_stackt &_instantiation_stack)
C++ Language Type Checking.