Skip to content

Commit

Permalink
Apply automatic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsamenezes committed Jan 19, 2024
1 parent b20dbf4 commit 8411580
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/goto-programs/abstract-interpretation/interval_domain.cpp
Expand Up @@ -124,24 +124,27 @@ real_intervalt interval_domaint::get_interval_from_const(const expr2tc &e) const
value1.increment(true);
value2.decrement(true);

if (value1.is_NaN() || value1.is_infinity() || value2.is_NaN() || value2.is_infinity())
if (
value1.is_NaN() || value1.is_infinity() || value2.is_NaN() ||
value2.is_infinity())
{
assert(result.is_top() && !result.is_bottom());
return result;
}

// [value2, value1]
// a <= value1
if(value1.is_double())
// a <= value1
if (value1.is_double())
result.make_le_than(value1.to_double());
else
log_warning("Failed to convert value1: {}", value1.to_string_decimal(10));

// a >= value2
if(value2.is_double())
if (value2.is_double())
result.make_ge_than(value2.to_double());
else
log_warning("Failed to convert value2: {}", value2.to_string_decimal(10));//
log_warning(
"Failed to convert value2: {}", value2.to_string_decimal(10)); //

assert(!result.is_bottom());
return result;
Expand Down

0 comments on commit 8411580

Please sign in to comment.