@@ -51,40 +51,38 @@ void memory_model_baset::read_from(symex_target_equationt &equation)
51
51
52
52
for (const auto &address : address_map)
53
53
{
54
- const a_rect &a_rec=address.second ;
55
-
56
- for (const auto &read_event : a_rec.reads )
54
+ for (const auto &read_event : address.second .reads )
57
55
{
58
- const event_it r=read_event;
59
-
60
- exprt::operandst rf_some_operands;
61
- rf_some_operands.reserve (a_rec.writes .size ());
56
+ exprt::operandst rf_choice_symbols;
57
+ rf_choice_symbols.reserve (address.second .writes .size ());
62
58
63
59
// this is quadratic in #events per address
64
- for (const auto &write_event : a_rec .writes )
60
+ for (const auto &write_event : address. second .writes )
65
61
{
66
- const event_it w=write_event;
67
-
68
62
// rf cannot contradict program order
69
- if (po (r, w ))
63
+ if (po (read_event, write_event ))
70
64
continue ; // contradicts po
71
65
72
- rf_some_operands .push_back (
73
- register_read_from_choice_symbol (r, w , equation));
66
+ rf_choice_symbols .push_back (
67
+ register_read_from_choice_symbol (read_event, write_event , equation));
74
68
}
75
69
76
70
// value equals the one of some write
77
- exprt rf_some = disjunction (rf_some_operands);
71
+
72
+ exprt rf_some = disjunction (rf_choice_symbols);
78
73
79
74
// uninitialised global symbol like symex_dynamic::dynamic_object*
80
75
// or *$object
81
- if (rf_some_operands .empty ())
76
+ if (rf_choice_symbols .empty ())
82
77
continue ;
83
78
84
79
// Add the read's guard, each of the writes' guards is implied
85
80
// by each entry in rf_some
86
- add_constraint (equation,
87
- implies_exprt (r->guard , rf_some), " rf-some" , r->source );
81
+ add_constraint (
82
+ equation,
83
+ implies_exprt (read_event->guard , rf_some),
84
+ " rf-some" ,
85
+ read_event->source );
88
86
}
89
87
}
90
88
}
0 commit comments