@@ -76,11 +76,23 @@ class context_sensitive_value_set_analysis_drivert : public messaget
76
76
// / pointed at the usual goto_modelt or similar in future.
77
77
const get_goto_programt get_goto_program;
78
78
79
+ typedef std::pair<context_indext, locationt> working_set_entryt;
80
+
81
+ // / Compares two working set entries, ordering those with higher context
82
+ // / numbers first (favouring callees over callers) and then lower location
83
+ // / numbers (favouring complete exploration of a loop, for example, before
84
+ // / its successors, assuming programs generally flow forwards)
85
+ struct compare_working_set_entriest
86
+ {
87
+ bool operator ()(const working_set_entryt &a, const working_set_entryt &b);
88
+ };
89
+
79
90
// / Working set, containing <context-pointer, instruction> pairs (constrast
80
91
// / the normal value-set analysis working set, which only contains
81
92
// / instructions). Pointers are non-owning, and are never held beyond the
82
93
// / lifespan of `context_graph` (which owns the contexts).
83
- std::set<std::pair<context_indext, locationt>> working_set;
94
+ std::set<std::pair<context_indext, locationt>, compare_working_set_entriest>
95
+ working_set;
84
96
85
97
// / Graph of analysis contexts, each concerning a particular use context of a
86
98
// / particular function (e.g. "function f when called from main line 5")
0 commit comments