@@ -72,7 +72,7 @@ Function: property
72
72
73
73
void property (
74
74
const exprt &property_expr,
75
- exprt::operandst &prop_handles ,
75
+ std::map<std:: size_t , exprt::operandst> &obligations ,
76
76
message_handlert &message_handler,
77
77
decision_proceduret &solver,
78
78
std::size_t no_timeframes,
@@ -87,16 +87,14 @@ void property(
87
87
property_expr.id () == ID_sva_nexttime ||
88
88
property_expr.id () == ID_sva_s_nexttime)
89
89
{
90
- prop_handles.resize (no_timeframes, true_exprt ());
91
90
if (no_timeframes > 0 )
92
91
{
93
92
exprt tmp = instantiate (property_expr, 0 , no_timeframes, ns);
94
- prop_handles .push_back (solver.handle (tmp));
93
+ obligations[ 0 ] .push_back (solver.handle (tmp));
95
94
}
96
95
97
96
return ;
98
97
}
99
-
100
98
// We want AG p.
101
99
auto &p = [](const exprt &expr) -> const exprt & {
102
100
if (expr.id () == ID_AG)
@@ -115,7 +113,45 @@ void property(
115
113
instantiate (p, c, no_timeframes, ns);
116
114
117
115
auto handle = solver.handle (tmp);
118
- prop_handles.push_back (std::move (handle));
116
+ obligations[c].push_back (std::move (handle));
117
+ }
118
+ }
119
+
120
+ /* ******************************************************************\
121
+
122
+ Function: property
123
+
124
+ Inputs:
125
+
126
+ Outputs:
127
+
128
+ Purpose:
129
+
130
+ \*******************************************************************/
131
+
132
+ void property (
133
+ const exprt &property_expr,
134
+ exprt::operandst &prop_handles,
135
+ message_handlert &message_handler,
136
+ decision_proceduret &solver,
137
+ std::size_t no_timeframes,
138
+ const namespacet &ns)
139
+ {
140
+ // The first element of the pair is the length of the
141
+ // counterexample, and the second is the condition that
142
+ // must be valid for the property to hold.
143
+ std::map<std::size_t , exprt::operandst> obligations;
144
+
145
+ property (
146
+ property_expr, obligations, message_handler, solver, no_timeframes, ns);
147
+
148
+ // Map obligations onto timeframes.
149
+ prop_handles.resize (no_timeframes, true_exprt ());
150
+ for (auto &obligation_it : obligations)
151
+ {
152
+ auto t = obligation_it.first ;
153
+ DATA_INVARIANT (t < no_timeframes, " obligation must have valid timeframe" );
154
+ prop_handles[t] = conjunction (obligation_it.second );
119
155
}
120
156
}
121
157
0 commit comments