24 if(type.
id()==ID_array)
29 else if(type.
id()==ID_pointer)
33 else if(type.
id()==ID_struct ||
38 typet &subtype = c.type();
42 else if(type.
id() == ID_template_parameter_symbol_type)
44 type_mapt::const_iterator m_it =
53 else if(type.
id()==ID_code)
59 for(
auto ¶meter : parameters)
61 if(parameter.id() == ID_parameter)
62 apply(
static_cast<typet &
>(parameter.add(ID_type)));
65 else if(type.
id()==ID_merged_type)
76 if(expr.
id()==ID_symbol)
78 expr_mapt::const_iterator m_it =
94 type_mapt::const_iterator t_it=
100 e.
type()=t_it->second;
104 expr_mapt::const_iterator e_it=
115 type_mapt::const_iterator t_it=
126 expr_mapt::const_iterator e_it=
138 out << mapping.first <<
" = " << mapping.second.pretty() <<
'\n';
141 out << mapping.first <<
" = " << mapping.second.pretty() <<
'\n';
154 template_typet::template_parameterst::const_iterator t_it=
155 template_parameters.begin();
157 if(instance.size()<template_parameters.size())
160 for(std::size_t i=instance.size();
161 i<template_parameters.size();
175 instance.size() == template_parameters.size(),
176 "template instantiation expected to match declaration");
178 for(cpp_template_args_tct::argumentst::const_iterator
179 i_it=instance.begin();
180 i_it!=instance.end();
191 if(parameter.
id()==ID_type)
193 if(parameter.
id()!=ID_type)
205 if(value.
id()==ID_type)
220 typet tmp(ID_unassigned);
221 tmp.
set(ID_identifier, t.type().get(ID_identifier));
223 type_map[t.type().get(ID_identifier)]=tmp;
227 exprt tmp(ID_unassigned, t.type());
228 tmp.
set(ID_identifier, t.get(ID_identifier));
242 template_args.
arguments().resize(template_parameters.size());
244 for(std::size_t i=0; i<template_parameters.size(); i++)
260 return template_args;
exprt::operandst argumentst
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
typet & type()
Return the type of the expression.
source_locationt & add_source_location()
const irep_idt & get(const irep_idt &name) const
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & id() const
irept & add(const irep_idt &name)
void build(const template_typet &template_type, const cpp_template_args_tct &template_args)
exprt lookup(const irep_idt &identifier) const
void build_unassigned(const template_typet &template_type)
void print(std::ostream &out) const
void apply(exprt &dest) const
exprt lookup_expr(const irep_idt &identifier) const
void set(const template_parametert ¶meter, const exprt &value)
typet lookup_type(const irep_idt &identifier) const
cpp_template_args_tct build_template_args(const template_typet &template_type) const
template_parameterst & template_parameters()
std::vector< template_parametert > template_parameterst
The type of an expression, extends irept.
const typet & subtype() const
source_locationt & add_source_location()
const template_parameter_symbol_typet & to_template_parameter_symbol_type(const typet &type)
Cast a typet to a template_parameter_symbol_typet.
#define Forall_operands(it, expr)
const irept & get_nil_irep()
static optionalt< smt_termt > get_identifier(const exprt &expr, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_handle_identifiers, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_identifiers)
#define UNREACHABLE
This should be used to mark dead code.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
exprt & default_argument()
bool has_default_argument() const
C++ Language Type Checking.
const type_with_subtypest & to_type_with_subtypes(const typet &type)