File tree Expand file tree Collapse file tree 4 files changed +24
-17
lines changed Expand file tree Collapse file tree 4 files changed +24
-17
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,17 @@ void goto_statet::output_propagation_map(std::ostream &out)
20
20
out << name_value.first << " <- " << format (name_value.second ) << " \n " ;
21
21
}
22
22
}
23
+
24
+ std::size_t goto_statet::increase_generation (
25
+ const irep_idt l1_identifier,
26
+ const ssa_exprt &lhs,
27
+ std::function<std::size_t (const irep_idt &)> fresh_l2_name_provider)
28
+ {
29
+ auto current_emplace_res =
30
+ level2.current_names .emplace (l1_identifier, std::make_pair (lhs, 0 ));
31
+
32
+ current_emplace_res.first ->second .second =
33
+ fresh_l2_name_provider (l1_identifier);
34
+
35
+ return current_emplace_res.first ->second .second ;
36
+ }
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ class goto_statet
74
74
: guard(true_exprt(), guard_manager)
75
75
{
76
76
}
77
+
78
+ std::size_t increase_generation (
79
+ const irep_idt l1_identifier,
80
+ const ssa_exprt &lhs,
81
+ std::function<std::size_t (const irep_idt &)> fresh_l2_name_provider);
77
82
};
78
83
79
84
#endif // CPROVER_GOTO_SYMEX_GOTO_STATE_H
Original file line number Diff line number Diff line change @@ -459,22 +459,6 @@ bool goto_symex_statet::l2_thread_read_encoding(
459
459
return true ;
460
460
}
461
461
462
- // / Allocates a fresh L2 name for the given L1 identifier, and makes it the
463
- // / latest generation on this path.
464
- // / \return the newly allocated generation number
465
- std::size_t goto_symex_statet::increase_generation (
466
- const irep_idt l1_identifier,
467
- const ssa_exprt &lhs)
468
- {
469
- auto current_emplace_res =
470
- level2.current_names .emplace (l1_identifier, std::make_pair (lhs, 0 ));
471
-
472
- current_emplace_res.first ->second .second =
473
- fresh_l2_name_provider (l1_identifier);
474
-
475
- return current_emplace_res.first ->second .second ;
476
- }
477
-
478
462
// / Allocates a fresh L2 name for the given L1 identifier, and makes it the
479
463
// / latest generation on this path. Does nothing if there isn't an expression
480
464
// / keyed by the l1 identifier.
Original file line number Diff line number Diff line change @@ -208,7 +208,11 @@ class goto_symex_statet final : public goto_statet
208
208
// / Allocates a fresh L2 name for the given L1 identifier, and makes it the
209
209
// latest generation on this path.
210
210
std::size_t
211
- increase_generation (const irep_idt l1_identifier, const ssa_exprt &lhs);
211
+ increase_generation (const irep_idt l1_identifier, const ssa_exprt &lhs)
212
+ {
213
+ return goto_statet::increase_generation (
214
+ l1_identifier, lhs, fresh_l2_name_provider);
215
+ }
212
216
213
217
// / Increases the generation of the L1 identifier. Does nothing if there
214
218
// / isn't an expression keyed by it.
You can’t perform that action at this time.
0 commit comments