@@ -14,13 +14,9 @@ Author: Daniel Kroening, kroening@kroening.com
1414
1515#include < util/format_expr.h>
1616#include < util/std_expr.h>
17- #include < util/throw_with_nested.h>
18- #include < util/unwrap_nested_exception.h>
1917
2018#include < solvers/decision_procedure.h>
21- #include < solvers/flattening/bv_conversion_exceptions.h>
2219
23- #include " equation_conversion_exceptions.h"
2420#include " goto_symex_state.h"
2521#include " ssa_step.h"
2622
@@ -329,24 +325,15 @@ void symex_target_equationt::constraint(
329325
330326void symex_target_equationt::convert (decision_proceduret &decision_procedure)
331327{
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);
350337}
351338
352339void symex_target_equationt::convert_assignments (
@@ -376,17 +363,8 @@ void symex_target_equationt::convert_decls(
376363 {
377364 // The result is not used, these have no impact on
378365 // 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 ;
390368 }
391369 }
392370}
@@ -405,16 +383,7 @@ void symex_target_equationt::convert_guards(
405383 mstream << messaget::eom;
406384 });
407385
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 );
418387 }
419388 }
420389}
@@ -436,16 +405,7 @@ void symex_target_equationt::convert_assumptions(
436405 mstream << messaget::eom;
437406 });
438407
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 );
449409 }
450410 }
451411 }
@@ -468,16 +428,7 @@ void symex_target_equationt::convert_goto_instructions(
468428 mstream << messaget::eom;
469429 });
470430
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 );
481432 }
482433 }
483434 }
@@ -495,16 +446,8 @@ void symex_target_equationt::convert_constraints(
495446 mstream << messaget::eom;
496447 });
497448
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 ;
508451 }
509452 }
510453}
@@ -569,16 +512,7 @@ void symex_target_equationt::convert_assertions(
569512 step.cond_expr );
570513
571514 // 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);
582516
583517 // store disjunct
584518 disjuncts.push_back (not_exprt (step.cond_handle ));
0 commit comments