CBMC
synthesizer_utils.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Utility functions for loop invariant synthesizer.
4 
5 Author: Qinheping Hu
6 
7 \*******************************************************************/
8 
9 #ifndef CPROVER_GOTO_INSTRUMENT_SYNTHESIZER_SYNTHESIZER_UTILS_H
10 #define CPROVER_GOTO_INSTRUMENT_SYNTHESIZER_SYNTHESIZER_UTILS_H
11 
14 #include <goto-programs/loop_ids.h>
15 
16 #include <analyses/loop_analysis.h>
18 
19 class messaget;
20 
21 typedef std::map<loop_idt, exprt> invariant_mapt;
22 
25  const goto_programt::targett &loop_head,
28  const goto_programt::const_targett &loop_head,
30 
34  const unsigned int loop_number,
35  goto_functiont &function,
36  bool finding_head);
37 
41 get_loop_end(const unsigned int loop_number, goto_functiont &function);
42 
46 get_loop_head(const unsigned int loop_number, goto_functiont &function);
47 
51  const invariant_mapt &invariant_map,
52  goto_modelt &goto_model,
53  messaget &log);
54 
55 #endif // CPROVER_GOTO_INSTRUMENT_SYNTHESIZER_SYNTHESIZER_UTILS_H
messaget
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:154
get_loop_head_or_end
goto_programt::targett get_loop_head_or_end(const unsigned int loop_number, goto_functiont &function, bool finding_head)
Return loop head if finding_head is true, Otherwise return loop end.
Definition: synthesizer_utils.cpp:55
goto_model.h
goto_modelt
Definition: goto_model.h:25
loop_analysis.h
get_loop_end_from_loop_head_and_content
goto_programt::const_targett get_loop_end_from_loop_head_and_content(const goto_programt::const_targett &loop_head, const loop_templatet< goto_programt::const_targett > &loop)
Definition: synthesizer_utils.cpp:11
get_loop_end
goto_programt::targett get_loop_end(const unsigned int loop_number, goto_functiont &function)
Find and return the last instruction of the natural loop with loop_number in function.
Definition: synthesizer_utils.cpp:82
loop_templatet
A loop, specified as a set of instructions.
Definition: loop_analysis.h:23
goto_functiont
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
Definition: goto_function.h:23
get_loop_head
goto_programt::targett get_loop_head(const unsigned int loop_number, goto_functiont &function)
Find and return the first instruction of the natural loop with loop_number in function.
Definition: synthesizer_utils.cpp:88
annotate_invariants
void annotate_invariants(const invariant_mapt &invariant_map, goto_modelt &goto_model, messaget &log)
Annotate the invariants in invariant_map to their corresponding loops.
Definition: synthesizer_utils.cpp:93
loop_utils.h
goto_program.h
invariant_mapt
std::map< loop_idt, exprt > invariant_mapt
Definition: synthesizer_utils.h:19
loop_ids.h
goto_programt::const_targett
instructionst::const_iterator const_targett
Definition: goto_program.h:587
goto_programt::targett
instructionst::iterator targett
Definition: goto_program.h:586
get_loop_end_from_loop_head_and_content_mutable
goto_programt::targett get_loop_end_from_loop_head_and_content_mutable(const goto_programt::targett &loop_head, const loop_templatet< goto_programt::targett > &loop)
Find the goto instruction of loop that jumps to loop_head
Definition: synthesizer_utils.cpp:33