@@ -256,6 +256,19 @@ static obligationst property_obligations_rec(
256256
257257 obligationst obligations;
258258
259+ // Traces with any φ state from "current" onwards satisfy Fφ
260+ exprt::operandst phi_disjuncts;
261+
262+ phi_disjuncts.reserve (numeric_cast_v<std::size_t >(no_timeframes - current));
263+
264+ for (mp_integer j = current; j < no_timeframes; ++j)
265+ {
266+ auto tmp = property_obligations_rec (phi, j, no_timeframes);
267+ phi_disjuncts.push_back (tmp.conjunction ().second );
268+ }
269+
270+ auto phi_disjunction = disjunction (phi_disjuncts);
271+
259272 // Counterexamples to Fφ must have a loop.
260273 // We consider l-k loops with l<k.
261274 for (mp_integer k = current + 1 ; k < no_timeframes; ++k)
@@ -265,19 +278,13 @@ static obligationst property_obligations_rec(
265278 //
266279 // (1) There is a loop from timeframe k back to
267280 // some earlier state l with current<=l<k.
268- // (2) No state j with current<=j<=k to the end of the
269- // lasso satisfies 'φ'.
281+ // (2) No state j with current<=j<no_timeframes satisfies 'φ'.
282+ // The weaker alternative current<=j<=k yields counterexamples
283+ // that exhibit a ¬φ loop, but are then followed by a φ state.
270284 for (mp_integer l = current; l < k; ++l)
271285 {
272- exprt::operandst disjuncts = {not_exprt (lasso_symbol (l, k))};
273-
274- for (mp_integer j = current; j <= k; ++j)
275- {
276- auto tmp = property_obligations_rec (phi, j, no_timeframes);
277- disjuncts.push_back (tmp.conjunction ().second );
278- }
279-
280- obligations.add (k, disjunction (disjuncts));
286+ auto tmp = or_exprt{not_exprt (lasso_symbol (l, k)), phi_disjunction};
287+ obligations.add (k, std::move (tmp));
281288 }
282289 }
283290
0 commit comments