cprover
string_instrumentation.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: String Abstraction
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_PROGRAMS_STRING_INSTRUMENTATION_H
13 #define CPROVER_GOTO_PROGRAMS_STRING_INSTRUMENTATION_H
14 
15 #include "goto_functions.h"
16 
17 #include <util/exception_utils.h>
18 
19 class message_handlert;
20 class goto_modelt;
21 
23 {
24 public:
26  std::string message,
29  {
30  }
31  std::string what() const override
32  {
33  return message + " (at: " + source_location.as_string() + ")";
34  }
35 
36 private:
37  std::string message;
39 };
40 
42  symbol_tablet &,
44  goto_programt &);
45 
47  symbol_tablet &,
49  goto_functionst &);
50 
52  goto_modelt &,
54 
55 predicate_exprt is_zero_string(const exprt &what, bool write = false);
56 exprt zero_string_length(const exprt &what, bool write=false);
57 exprt buffer_size(const exprt &what);
58 
59 #endif // CPROVER_GOTO_PROGRAMS_STRING_INSTRUMENTATION_H
Goto Programs with Functions.
std::string as_string() const
STL namespace.
std::string what() const override
A human readable description of what went wrong.
void string_instrumentation(symbol_tablet &, message_handlert &, goto_programt &)
exprt zero_string_length(const exprt &what, bool write=false)
predicate_exprt is_zero_string(const exprt &what, bool write=false)
Base class for exceptions thrown in the cprover project.
The symbol table.
Definition: symbol_table.h:19
A collection of goto functions.
incorrect_source_program_exceptiont(std::string message, source_locationt source_location)
A generic container class for the GOTO intermediate representation of one function.
Definition: goto_program.h:72
exprt buffer_size(const exprt &what)
Base class for all expressions.
Definition: expr.h:54
A base class for expressions that are predicates, i.e., Boolean-typed.
Definition: std_expr.h:633