cprover
string_concat_char_builtin_functiont Class Reference

Adding a character at the end of a string. More...

#include <string_builtin_function.h>

Inheritance diagram for string_concat_char_builtin_functiont:
[legend]
Collaboration diagram for string_concat_char_builtin_functiont:
[legend]

Public Member Functions

 string_concat_char_builtin_functiont (const exprt &return_code, const std::vector< exprt > &fun_args, array_poolt &array_pool)
 Constructor from arguments of a function application. More...
 
std::vector< mp_integereval (const std::vector< mp_integer > &input_value, const std::vector< mp_integer > &args_value) const override
 Evaluate the result from a concrete valuation of the arguments. More...
 
std::string name () const override
 
exprt add_constraints (string_constraint_generatort &generator) const override
 Add constraints ensuring that the value of result expression of the builtin function corresponds to the value of the function call. More...
 
exprt length_constraint () const override
 Constraint ensuring that the length of the strings are coherent with the function call. More...
 
- Public Member Functions inherited from string_transformation_builtin_functiont
 string_transformation_builtin_functiont (const exprt &return_code, const std::vector< exprt > &fun_args, array_poolt &array_pool)
 Constructor from arguments of a function application. More...
 
optionalt< array_string_exprtstring_result () const override
 
std::vector< array_string_exprtstring_arguments () const override
 
optionalt< exprteval (const std::function< exprt(const exprt &)> &get_value) const override
 
bool maybe_testing_function () const override
 Tells whether the builtin function can be a testing function, that is a function that does not return a string, for instance like equals, indexOf or compare. More...
 
- Public Member Functions inherited from string_builtin_functiont
 string_builtin_functiont (const string_builtin_functiont &)=delete
 
virtual ~string_builtin_functiont ()=default
 

Additional Inherited Members

- Public Attributes inherited from string_transformation_builtin_functiont
array_string_exprt result
 
array_string_exprt input
 
std::vector< exprtargs
 
- Public Attributes inherited from string_builtin_functiont
exprt return_code
 
- Protected Member Functions inherited from string_builtin_functiont
 string_builtin_functiont (const exprt &return_code)
 

Detailed Description

Adding a character at the end of a string.

Definition at line 107 of file string_builtin_function.h.

Constructor & Destructor Documentation

◆ string_concat_char_builtin_functiont()

string_concat_char_builtin_functiont::string_concat_char_builtin_functiont ( const exprt return_code,
const std::vector< exprt > &  fun_args,
array_poolt array_pool 
)
inline

Constructor from arguments of a function application.

The arguments in fun_args should be in order: an integer result.length, a character pointer &result[0], a string arg1 of type refined_string_typet, and a character.

Definition at line 115 of file string_builtin_function.h.

Member Function Documentation

◆ add_constraints()

exprt string_concat_char_builtin_functiont::add_constraints ( string_constraint_generatort constraint_generator) const
inlineoverridevirtual

Add constraints ensuring that the value of result expression of the builtin function corresponds to the value of the function call.

Implements string_builtin_functiont.

Definition at line 132 of file string_builtin_function.h.

References string_constraint_generatort::add_axioms_for_concat_char(), string_transformation_builtin_functiont::args, string_transformation_builtin_functiont::input, and string_transformation_builtin_functiont::result.

◆ eval()

std::vector< mp_integer > string_concat_char_builtin_functiont::eval ( const std::vector< mp_integer > &  input_value,
const std::vector< mp_integer > &  args_value 
) const
overridevirtual

Evaluate the result from a concrete valuation of the arguments.

Implements string_transformation_builtin_functiont.

Definition at line 159 of file string_builtin_function.cpp.

References PRECONDITION, and string_transformation_builtin_functiont::result.

◆ length_constraint()

exprt string_concat_char_builtin_functiont::length_constraint ( ) const
inlineoverridevirtual

Constraint ensuring that the length of the strings are coherent with the function call.

Implements string_builtin_functiont.

Definition at line 137 of file string_builtin_function.h.

References string_transformation_builtin_functiont::input, length_constraint_for_concat_char(), and string_transformation_builtin_functiont::result.

◆ name()

std::string string_concat_char_builtin_functiont::name ( ) const
inlineoverridevirtual

Implements string_builtin_functiont.

Definition at line 127 of file string_builtin_function.h.


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