Go to the documentation of this file.
22 if(type.
id()==ID_array)
27 else if(type.
id()==ID_pointer)
31 else if(type.
id()==ID_struct ||
36 typet &subtype = c.type();
40 else if(type.
id() == ID_template_parameter_symbol_type)
42 type_mapt::const_iterator m_it =
51 else if(type.
id()==ID_code)
59 if(it->id()==ID_parameter)
63 else if(type.
id()==ID_merged_type)
74 if(expr.
id()==ID_symbol)
76 expr_mapt::const_iterator m_it =
92 type_mapt::const_iterator t_it=
98 e.
type()=t_it->second;
102 expr_mapt::const_iterator e_it=
113 type_mapt::const_iterator t_it=
124 expr_mapt::const_iterator e_it=
136 out << mapping.first <<
" = " << mapping.second.pretty() <<
'\n';
139 out << mapping.first <<
" = " << mapping.second.pretty() <<
'\n';
152 template_typet::template_parameterst::const_iterator t_it=
153 template_parameters.begin();
155 if(instance.size()<template_parameters.size())
158 for(std::size_t i=instance.size();
159 i<template_parameters.size();
173 instance.size() == template_parameters.size(),
174 "template instantiation expected to match declaration");
176 for(cpp_template_args_tct::argumentst::const_iterator
177 i_it=instance.begin();
178 i_it!=instance.end();
189 if(parameter.
id()==ID_type)
191 if(parameter.
id()!=ID_type)
203 if(value.
id()==ID_type)
218 typet tmp(ID_unassigned);
219 tmp.
set(ID_identifier, t.type().get(ID_identifier));
221 type_map[t.type().get(ID_identifier)]=tmp;
225 exprt tmp(ID_unassigned, t.type());
226 tmp.
set(ID_identifier, t.get(ID_identifier));
240 template_args.
arguments().resize(template_parameters.size());
242 for(std::size_t i=0; i<template_parameters.size(); i++)
258 return template_args;
#define UNREACHABLE
This should be used to mark dead code.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const typet & subtype() const
void build_unassigned(const template_typet &template_type)
#define Forall_operands(it, expr)
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
The type of an expression, extends irept.
irept & add(const irep_namet &name)
Base class for all expressions.
cpp_template_args_tct build_template_args(const template_typet &template_type) const
C++ Language Type Checking.
#define Forall_irep(it, irep)
void apply(exprt &dest) const
exprt lookup(const irep_idt &identifier) const
typet & type()
Return the type of the expression.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
typet lookup_type(const irep_idt &identifier) const
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
void print(std::ostream &out) const
template_parameterst & template_parameters()
std::vector< template_parametert > template_parameterst
#define Forall_subtypes(it, type)
const template_parameter_symbol_typet & to_template_parameter_symbol_type(const typet &type)
Cast a typet to a template_parameter_symbol_typet.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
source_locationt & add_source_location()
exprt lookup_expr(const irep_idt &identifier) const
bool has_default_argument() const
const irep_idt & get(const irep_namet &name) const
void set(const irep_namet &name, const irep_idt &value)
exprt & default_argument()
void set(const template_parametert ¶meter, const exprt &value)
const irept & get_nil_irep()
exprt::operandst argumentst
void build(const template_typet &template_type, const cpp_template_args_tct &template_args)
source_locationt & add_source_location()
API to expression classes.