51 : pointer_based_variables(vars), BH(_BH), std_functor(
std_var_pp_functor(_BH)), add_restrict(_add_restrict)
70 std::string offset_str = this->
operator()(offset);
74 size_t found_square_bracket = type_string.find(
'[');
75 if(found_square_bracket != std::string::npos)
77 type_string.insert(found_square_bracket,
"(*)");
81 type_string = type_string +
"*";
86 type_string = type_string +
"*";
90 return "(*((" + type_string +
")(" + this->
operator()(base) +
")))" +
"[" + this->
operator()(index) +
"]";
94 return "(*((" + type_string +
")((unsigned char*)" + this->
operator()(base) +
" + " + offset_str +
")))" +
120 size_t found_square_bracket = type_string.find(
'[');
121 if(found_square_bracket != std::string::npos)
123 type_string.insert(found_square_bracket,
"(*)");
127 type_string = type_string +
"*";
132 type_string = type_string +
"*";
134 return "((" + type_string +
")((unsigned char*)" + this->
operator()(base) +
" + " + this->
operator()(offset) +
139 return "(&(" + this->
operator()(pointed) +
"))";
145 return "__real__ " + this->
operator()(complex);
150 return "__imag__ " + this->
operator()(complex);
201 return "&(" + this->
operator()(pointed) +
")";
207 return "__real__ " + this->
operator()(complex);
212 return "__imag__ " + this->
operator()(complex);
298 std::string offset_str = this->
operator()(offset);
302 size_t found_square_bracket = type_string.find(
'[');
303 if(found_square_bracket != std::string::npos)
305 type_string.insert(found_square_bracket,
"(*)");
309 type_string = type_string +
"*";
314 type_string = type_string +
"*";
316 if(offset_str ==
"0")
318 return "(*((" + type_string +
")(" + this->
operator()(base) +
")))" +
"[" + this->
operator()(index) +
"]";
322 return "(*((" + type_string +
")((unsigned char*)" + this->
operator()(base) +
" + " + offset_str +
")))" +
348 size_t found_square_bracket = type_string.find(
'[');
349 if(found_square_bracket != std::string::npos)
351 type_string.insert(found_square_bracket,
"(*)");
355 type_string = type_string +
"*";
360 type_string = type_string +
"*";
362 return "((" + type_string +
")((unsigned char*)" + this->
operator()(base) +
" + " + this->
operator()(offset) +
367 return "(&(" + this->
operator()(pointed) +
"))";
373 return "__real__ " + this->
operator()(complex);
378 return "__imag__ " + this->
operator()(complex);
virtual bool is_an_array_ref(unsigned int variable) const
Return true if the index is an array ref.
const CustomSet< unsigned int > addr_based_variables
reference to the set of variable that has to have a star in front when returned by operator() ...
address_var_pp_functor(const BehavioralHelperConstRef _BH, const CustomSet< unsigned int > vars, const CustomSet< unsigned int > pointer_vars)
Constructor.
virtual bool is_a_mem_ref(unsigned int variable) const
Return true if the index is a mem_ref.
virtual unsigned int get_component_ref_record(unsigned int obj) const
Return the record variable of a component ref.
char base
This version is stamped on May 10, 2016.
virtual unsigned int get_mem_ref_offset(unsigned int obj) const
Return the offset of a mem ref.
virtual std::string print_type(unsigned int type, bool global=false, bool print_qualifiers=false, bool print_storage=false, unsigned int var=0, const var_pp_functorConstRef vppf=var_pp_functorConstRef(), const std::string &prefix="", const std::string &tail="") const
Print a type and its variable in case var is not zero.
virtual unsigned int get_operand_from_unary_expr(unsigned int obj) const
Return the index of the operand if index is addr_expr, a realpart_expr or a imagpart_expr.
const CustomSet< unsigned int > pointer_based_variables
reference to the set of variable that has to have a star in front when returned by operator() ...
virtual bool is_an_array(unsigned int variable) const
Return true if index is a variable or a type of type array.
bool IsDefaultSsaName(const unsigned int ssa_name_index) const
Return true if node is the default ssa_name.
virtual bool is_a_realpart_expr(unsigned int obj) const
Return true if index is a realpart_expr.
std::string operator()(unsigned int var) const override
return the name of the variable with a star as a prefix.
const std_var_pp_functor std_functor
standard functor used for print array variable
Standard functor that returns the name of a variable.
virtual unsigned int get_array_ref_array(unsigned int obj) const
Return the array variable of an array ref.
const BehavioralHelperConstRef BH
behavioral helper
bool add_restrict
it controls the addition to the parameters declarations of the restrict keyword.
virtual unsigned int get_mem_ref_base(unsigned int obj) const
Return the base of a mem ref.
unsigned offset[NUM_VERTICES+1]
std::string PrintVariable(unsigned int var) const
Print the name of the variable associated to the index.
std::string operator()(unsigned int var) const override
return the name of the variable with a star as a prefix.
virtual bool is_an_addr_expr(unsigned int variable) const
Return true if the index is an addr_expr.
virtual bool is_a_struct(unsigned int variable) const
Return true if index is a variable or a type of type struct.
std::string operator()(unsigned int var) const override
return the name of the variable.
pointer_var_pp_functor(const BehavioralHelperConstRef _BH, const CustomSet< unsigned int > vars, bool _add_restrict=false)
Constructor.
virtual unsigned int GetVarFromSsa(unsigned int index) const
Return the index of the variable base of a ssa var.
virtual bool is_a_imagpart_expr(unsigned int obj) const
Return true if index is a imagpart_expr.
virtual bool is_an_union(unsigned int variable) const
Return true if index is a variable of a type of type union.
virtual unsigned int get_indirect_ref_var(unsigned int obj) const
Return the variable of an indirect ref.
virtual unsigned int get_type(const unsigned int var) const
Return the type of the variable.
virtual unsigned int get_component_ref_field(unsigned int obj) const
Return the field index of a component ref.
virtual bool is_a_component_ref(unsigned int variable) const
Return true if the index is a component ref.
virtual bool is_an_indirect_ref(unsigned int variable) const
Return true if the index is an indirect ref.
const BehavioralHelperConstRef BH
behavioral helper
std::string operator()(unsigned int var) const override
return the name of the variable.
virtual unsigned int get_array_ref_index(unsigned int obj) const
Return the index variable of an array ref.
const CustomSet< unsigned int > pointer_based_variables
reference to the set of variable that has to have a star in front when returned by operator() ...