Skip to content

Commit

Permalink
Change default solver to CaDiCal
Browse files Browse the repository at this point in the history
From our analysis, this seems to be a much better option than MiniSat.
  • Loading branch information
celinval committed Aug 2, 2023
1 parent 7fc9fa7 commit 2b9838f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions kani-driver/src/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ pub struct VerificationArgs {
#[arg(long, requires("harnesses"))]
pub unwind: Option<u32>,
/// Specify the CBMC solver to use. Overrides the harness `solver` attribute.
/// If no solver is specified (with --solver or harness attribute), Kani will use CaDiCal.
#[arg(long, value_parser = CbmcSolverValueParser::new(CbmcSolver::VARIANTS))]
pub solver: Option<CbmcSolver>,
/// Pass through directly to CBMC; must be the last flag.
Expand Down
7 changes: 5 additions & 2 deletions kani-driver/src/call_cbmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ use crate::cbmc_output_parser::{
use crate::cbmc_property_renderer::{format_coverage, format_result, kani_cbmc_output_filter};
use crate::session::KaniSession;

/// We will use Cadical by default since it performed better than MiniSAT in our analysis.
/// Note: Kissat was marginally better, but it is an external solver which could be more unstable.
static DEFAULT_SOLVER: CbmcSolver = CbmcSolver::Cadical;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum VerificationStatus {
Success,
Expand Down Expand Up @@ -206,8 +210,7 @@ impl KaniSession {
} else if let Some(solver) = harness_solver {
solver
} else {
// Nothing to do
return Ok(());
&DEFAULT_SOLVER
};

match solver {
Expand Down

0 comments on commit 2b9838f

Please sign in to comment.