Skip to content

Commit

Permalink
chore: adapt to crab api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
caballa committed Jun 19, 2023
1 parent 5c2bc02 commit cbfcb56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions lib/Clam/Clam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,15 @@ class IntraClamImpl {
{m_cfg_builder->getCrabBasicBlock(kv.first), absval});
}

crab::analyzer::fwd_bwd_parameters fwd_bwd_params;
fwd_bwd_params.enable_backward() = params.run_backward;
crab::fixpoint_parameters fixpo_params;
fixpo_params.get_widening_delay() = params.widening_delay;
fixpo_params.get_descending_iterations() = params.narrowing_iters;
fixpo_params.get_max_thresholds() = params.widening_jumpset;

analyzer.run(m_cfg_builder->getCrabBasicBlock(entry), entry_abs,
!params.run_backward, crab_assumptions, live,
params.widening_delay, params.narrowing_iters,
params.widening_jumpset);
crab_assumptions, live, fixpo_params, fwd_bwd_params);
CRAB_VERBOSE_IF(1, crab::get_msg_stream()
<< "Finished intra-procedural analysis.\n");

Expand Down
6 changes: 3 additions & 3 deletions lib/Clam/crab/output/crabir/cfg_printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ void print_block::operator()(const basic_block_label_t &bbl) const {
unsigned error = 0;
for (unsigned i = 0, num_checks = checks.size(); i < num_checks; ++i) {
switch (checks[i]) {
case crab::checker::_SAFE:
case crab::checker::_UNREACH:
case crab::checker::check_kind::CRAB_SAFE:
case crab::checker::check_kind::CRAB_UNREACH:
safe++;
break;
case crab::checker::_ERR:
case crab::checker::check_kind::CRAB_ERR:
error++;
break;
default:
Expand Down

0 comments on commit cbfcb56

Please sign in to comment.