@@ -220,7 +220,11 @@ bool is_subsumed(
220
220
return true ; // b is subsumed by a conjunct in a
221
221
222
222
cout_message_handlert message_handler;
223
+ #if 0
223
224
message_handler.set_verbosity(verbose ? 10 : 1);
225
+ #else
226
+ message_handler.set_verbosity (1 );
227
+ #endif
224
228
satcheckt satcheck (message_handler);
225
229
bv_pointers_widet solver (ns, satcheck, message_handler);
226
230
axiomst axioms (solver, address_taken, verbose, ns);
@@ -295,7 +299,7 @@ void solver(
295
299
take_time_resourcet stop_time (property.stop );
296
300
297
301
if (solver_options.verbose )
298
- std::cout << " \n Doing " << format (property.condition ) << ' \n ' ;
302
+ std::cout << " Doing " << format (property.condition ) << ' \n ' ;
299
303
300
304
for (auto &frame : frames)
301
305
frame.reset ();
@@ -325,31 +329,50 @@ void solver(
325
329
326
330
if (solver_options.verbose )
327
331
{
328
- std::cout << " F: " << format (symbol) << " <- " << format (invariant)
329
- << ' \n ' ;
332
+ // print the current invariants in the frame
333
+ for (const auto &invariant : f.invariants )
334
+ {
335
+ std::cout << consolet::faint << consolet::blue;
336
+ std::cout << ' I' << std::setw (2 ) << frame_ref.index << ' ' ;
337
+ std::cout << format (invariant);
338
+ std::cout << consolet::reset << ' \n ' ;
339
+ }
340
+
341
+ std::cout << " \u2192 " << consolet::faint << std::setw (2 )
342
+ << frame_ref.index << consolet::reset << ' ' ;
330
343
}
331
344
332
- // check if already subsumed
333
- if (is_subsumed (
334
- f.invariants ,
335
- f.auxiliaries ,
336
- invariant,
337
- address_taken,
338
- solver_options.verbose ,
339
- ns))
345
+ // trivially true?
346
+ if (invariant.is_true ())
347
+ {
348
+ if (solver_options.verbose )
349
+ std::cout << " trivial\n " ;
350
+ }
351
+ else if (is_subsumed (
352
+ f.invariants ,
353
+ f.auxiliaries ,
354
+ invariant,
355
+ address_taken,
356
+ solver_options.verbose ,
357
+ ns))
340
358
{
341
359
if (solver_options.verbose )
342
- std::cout << " *** SUBSUMED \n " ;
360
+ std::cout << " subsumed " << format (invariant) << ' \n ' ;
343
361
}
344
362
else if (count_frame (path, frame_ref) > solver_options.loop_limit )
345
363
{
346
364
// loop limit exceeded, drop it
347
365
if (solver_options.verbose )
348
- std::cout << " *** DROPPED\n " ;
349
- dropped.push_back (workt (frame_ref, invariant, path));
366
+ std::cout << consolet::red << " dropped" << consolet::reset << ' '
367
+ << format (invariant) << ' \n ' ;
368
+ dropped.emplace_back (frame_ref, invariant, path);
350
369
}
351
370
else
352
371
{
372
+ // propagate
373
+ if (solver_options.verbose )
374
+ std::cout << format (invariant) << ' \n ' ;
375
+
353
376
auto new_path = path;
354
377
new_path.push_back (frame_ref);
355
378
queue.emplace_back (f.ref , std::move (invariant), std::move (new_path));
@@ -367,11 +390,13 @@ void solver(
367
390
368
391
frames[work.frame .index ].add_invariant (work.invariant );
369
392
393
+ #if 0
370
394
if(solver_options.verbose)
371
395
{
372
396
dump(frames, property, true, true);
373
397
std::cout << '\n';
374
398
}
399
+ #endif
375
400
376
401
auto counterexample_found = ::counterexample_found (
377
402
frames, work, address_taken, solver_options.verbose , ns);
@@ -401,11 +426,13 @@ solver_resultt solver(
401
426
{
402
427
const auto address_taken = ::address_taken (constraints);
403
428
429
+ #if 0
404
430
if(solver_options.verbose)
405
431
{
406
432
for(auto &a : address_taken)
407
433
std::cout << "address_taken: " << format(a) << '\n';
408
434
}
435
+ #endif
409
436
410
437
auto frames = setup_frames (constraints);
411
438
0 commit comments