@@ -14,13 +14,9 @@ Author: Daniel Kroening, kroening@kroening.com
14
14
15
15
#include < util/format_expr.h>
16
16
#include < util/std_expr.h>
17
- #include < util/throw_with_nested.h>
18
- #include < util/unwrap_nested_exception.h>
19
17
20
18
#include < solvers/decision_procedure.h>
21
- #include < solvers/flattening/bv_conversion_exceptions.h>
22
19
23
- #include " equation_conversion_exceptions.h"
24
20
#include " goto_symex_state.h"
25
21
#include " ssa_step.h"
26
22
@@ -329,24 +325,15 @@ void symex_target_equationt::constraint(
329
325
330
326
void symex_target_equationt::convert (decision_proceduret &decision_procedure)
331
327
{
332
- try
333
- {
334
- convert_guards (decision_procedure);
335
- convert_assignments (decision_procedure);
336
- convert_decls (decision_procedure);
337
- convert_assumptions (decision_procedure);
338
- convert_assertions (decision_procedure);
339
- convert_goto_instructions (decision_procedure);
340
- convert_function_calls (decision_procedure);
341
- convert_io (decision_procedure);
342
- convert_constraints (decision_procedure);
343
- }
344
- catch (const equation_conversion_exceptiont &conversion_exception)
345
- {
346
- // unwrap the except and throw like normal
347
- const std::string full_error = unwrap_exception (conversion_exception);
348
- throw full_error;
349
- }
328
+ convert_guards (decision_procedure);
329
+ convert_assignments (decision_procedure);
330
+ convert_decls (decision_procedure);
331
+ convert_assumptions (decision_procedure);
332
+ convert_assertions (decision_procedure);
333
+ convert_goto_instructions (decision_procedure);
334
+ convert_function_calls (decision_procedure);
335
+ convert_io (decision_procedure);
336
+ convert_constraints (decision_procedure);
350
337
}
351
338
352
339
void symex_target_equationt::convert_assignments (
@@ -376,17 +363,8 @@ void symex_target_equationt::convert_decls(
376
363
{
377
364
// The result is not used, these have no impact on
378
365
// the satisfiability of the formula.
379
- try
380
- {
381
- decision_procedure.handle (step.cond_expr );
382
- step.converted = true ;
383
- }
384
- catch (const bitvector_conversion_exceptiont &)
385
- {
386
- util_throw_with_nested (
387
- equation_conversion_exceptiont (
388
- " Error converting decls for step" , step));
389
- }
366
+ decision_procedure.handle (step.cond_expr );
367
+ step.converted = true ;
390
368
}
391
369
}
392
370
}
@@ -405,16 +383,7 @@ void symex_target_equationt::convert_guards(
405
383
mstream << messaget::eom;
406
384
});
407
385
408
- try
409
- {
410
- step.guard_handle = decision_procedure.handle (step.guard );
411
- }
412
- catch (const bitvector_conversion_exceptiont &)
413
- {
414
- util_throw_with_nested (
415
- equation_conversion_exceptiont (
416
- " Error converting guard for step" , step));
417
- }
386
+ step.guard_handle = decision_procedure.handle (step.guard );
418
387
}
419
388
}
420
389
}
@@ -436,16 +405,7 @@ void symex_target_equationt::convert_assumptions(
436
405
mstream << messaget::eom;
437
406
});
438
407
439
- try
440
- {
441
- step.cond_handle = decision_procedure.handle (step.cond_expr );
442
- }
443
- catch (const bitvector_conversion_exceptiont &)
444
- {
445
- util_throw_with_nested (
446
- equation_conversion_exceptiont (
447
- " Error converting assumptions for step" , step));
448
- }
408
+ step.cond_handle = decision_procedure.handle (step.cond_expr );
449
409
}
450
410
}
451
411
}
@@ -468,16 +428,7 @@ void symex_target_equationt::convert_goto_instructions(
468
428
mstream << messaget::eom;
469
429
});
470
430
471
- try
472
- {
473
- step.cond_handle = decision_procedure.handle (step.cond_expr );
474
- }
475
- catch (const bitvector_conversion_exceptiont &)
476
- {
477
- util_throw_with_nested (
478
- equation_conversion_exceptiont (
479
- " Error converting goto instructions for step" , step));
480
- }
431
+ step.cond_handle = decision_procedure.handle (step.cond_expr );
481
432
}
482
433
}
483
434
}
@@ -495,16 +446,8 @@ void symex_target_equationt::convert_constraints(
495
446
mstream << messaget::eom;
496
447
});
497
448
498
- try
499
- {
500
- decision_procedure.set_to_true (step.cond_expr );
501
- step.converted = true ;
502
- }
503
- catch (const bitvector_conversion_exceptiont &)
504
- {
505
- util_throw_with_nested (equation_conversion_exceptiont (
506
- " Error converting constraints for step" , step));
507
- }
449
+ decision_procedure.set_to_true (step.cond_expr );
450
+ step.converted = true ;
508
451
}
509
452
}
510
453
}
@@ -569,16 +512,7 @@ void symex_target_equationt::convert_assertions(
569
512
step.cond_expr );
570
513
571
514
// do the conversion
572
- try
573
- {
574
- step.cond_handle = decision_procedure.handle (implication);
575
- }
576
- catch (const bitvector_conversion_exceptiont &)
577
- {
578
- util_throw_with_nested (
579
- equation_conversion_exceptiont (
580
- " Error converting assertions for step" , step));
581
- }
515
+ step.cond_handle = decision_procedure.handle (implication);
582
516
583
517
// store disjunct
584
518
disjuncts.push_back (not_exprt (step.cond_handle ));
0 commit comments