@@ -375,21 +375,20 @@ void symex_target_equationt::convert(
375
375
try
376
376
{
377
377
convert_guards (prop_conv);
378
+ convert_assignments (prop_conv);
379
+ convert_decls (prop_conv);
380
+ convert_assumptions (prop_conv);
381
+ convert_assertions (prop_conv);
382
+ convert_goto_instructions (prop_conv);
383
+ convert_io (prop_conv);
384
+ convert_constraints (prop_conv);
378
385
}
379
- catch (guard_conversion_exceptiont &guard_conversion_exception )
386
+ catch (const equation_conversion_exceptiont &conversion_exception )
380
387
{
381
388
// unwrap the except and throw like normal
382
- const std::string full_error = unwrap_exception (guard_conversion_exception );
389
+ const std::string full_error = unwrap_exception (conversion_exception );
383
390
throw full_error;
384
391
}
385
-
386
- convert_assignments (prop_conv);
387
- convert_decls (prop_conv);
388
- convert_assumptions (prop_conv);
389
- convert_assertions (prop_conv);
390
- convert_goto_instructions (prop_conv);
391
- convert_io (prop_conv);
392
- convert_constraints (prop_conv);
393
392
}
394
393
395
394
// / converts assignments
@@ -416,7 +415,16 @@ void symex_target_equationt::convert_decls(
416
415
{
417
416
// The result is not used, these have no impact on
418
417
// the satisfiability of the formula.
419
- prop_conv.convert (step.cond_expr );
418
+ try
419
+ {
420
+ prop_conv.convert (step.cond_expr );
421
+ }
422
+ catch (const bitvector_conversion_exceptiont &conversion_exception)
423
+ {
424
+ util_throw_with_nested (
425
+ equation_conversion_exceptiont (
426
+ " Error converting decls for step" , step, ns));
427
+ }
420
428
}
421
429
}
422
430
}
@@ -438,7 +446,9 @@ void symex_target_equationt::convert_guards(
438
446
}
439
447
catch (const bitvector_conversion_exceptiont &conversion_exception)
440
448
{
441
- util_throw_with_nested (guard_conversion_exceptiont (step, ns));
449
+ util_throw_with_nested (
450
+ equation_conversion_exceptiont (
451
+ " Error converting guard for step" , step, ns));
442
452
}
443
453
}
444
454
}
@@ -456,7 +466,18 @@ void symex_target_equationt::convert_assumptions(
456
466
if (step.ignore )
457
467
step.cond_literal =const_literal (true );
458
468
else
459
- step.cond_literal =prop_conv.convert (step.cond_expr );
469
+ {
470
+ try
471
+ {
472
+ step.cond_literal = prop_conv.convert (step.cond_expr );
473
+ }
474
+ catch (const bitvector_conversion_exceptiont &conversion_exception)
475
+ {
476
+ util_throw_with_nested (
477
+ equation_conversion_exceptiont (
478
+ " Error converting assumptions for step" , step, ns));
479
+ }
480
+ }
460
481
}
461
482
}
462
483
}
@@ -473,7 +494,18 @@ void symex_target_equationt::convert_goto_instructions(
473
494
if (step.ignore )
474
495
step.cond_literal =const_literal (true );
475
496
else
476
- step.cond_literal =prop_conv.convert (step.cond_expr );
497
+ {
498
+ try
499
+ {
500
+ step.cond_literal = prop_conv.convert (step.cond_expr );
501
+ }
502
+ catch (const bitvector_conversion_exceptiont &conversion_exception)
503
+ {
504
+ util_throw_with_nested (
505
+ equation_conversion_exceptiont (
506
+ " Error converting goto instructions for step" , step, ns));
507
+ }
508
+ }
477
509
}
478
510
}
479
511
}
@@ -542,7 +574,16 @@ void symex_target_equationt::convert_assertions(
542
574
step.cond_expr );
543
575
544
576
// do the conversion
545
- step.cond_literal =prop_conv.convert (implication);
577
+ try
578
+ {
579
+ step.cond_literal = prop_conv.convert (implication);
580
+ }
581
+ catch (const bitvector_conversion_exceptiont &conversion_exception)
582
+ {
583
+ util_throw_with_nested (
584
+ equation_conversion_exceptiont (
585
+ " Error converting assertions for step" , step, ns));
586
+ }
546
587
547
588
// store disjunct
548
589
disjuncts.push_back (literal_exprt (!step.cond_literal ));
0 commit comments