Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cbmc/bmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,10 @@ int bmct::do_language_agnostic_bmc(
message.error() << error_msg << message.eom;
return CPROVER_EXIT_EXCEPTION;
}
catch(...)
catch(std::runtime_error &e)
{
message.error() << "unable to get solver" << message.eom;
throw std::current_exception();
message.error() << e.what() << message.eom;
return CPROVER_EXIT_EXCEPTION;
}

switch(result)
Expand Down
17 changes: 13 additions & 4 deletions src/goto-symex/symex_target_equation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,19 @@ void symex_target_equationt::convert_constraints(
{
if(step.is_constraint())
{
if(step.ignore)
continue;

decision_procedure.set_to_true(step.cond_expr);
if(!step.ignore)
{
try
{
decision_procedure.set_to_true(step.cond_expr);
}
catch(const bitvector_conversion_exceptiont &conversion_exception)
{
util_throw_with_nested(
equation_conversion_exceptiont(
"Error converting constraints for step", step));
}
}
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions src/solvers/flattening/boolbv_equality.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ Author: Daniel Kroening, kroening@kroening.com
#include <util/base_type.h>
#include <util/invariant.h>

#include "bv_conversion_exceptions.h"
#include "flatten_byte_operators.h"

literalt boolbvt::convert_equality(const equal_exprt &expr)
{
const bool is_base_type_eq =
base_type_eq(expr.lhs().type(), expr.rhs().type(), ns);
DATA_INVARIANT(
is_base_type_eq,
std::string("equality without matching types:\n") + "######### lhs: " +
expr.lhs().pretty() + '\n' + "######### rhs: " + expr.rhs().pretty());
if(!is_base_type_eq)
{
const std::string error_msg =
std::string("equality without matching types:\n") + "######### lhs: " +
expr.lhs().pretty() + '\n' + "######### rhs: " + expr.rhs().pretty();
throw bitvector_conversion_exceptiont(error_msg, expr);
}

// see if it is an unbounded array
if(is_unbounded_array(expr.lhs().type()))
Expand Down