Skip to content

Commit

Permalink
Create kani_middle module to host backend agnostic code (#1833)
Browse files Browse the repository at this point in the history
For now I just moved the reachability code to this new module. As a follow up PR, I am planning to move the unsized coercion related code into a separate module so it can be used to refactor and fix codegen casting logic (related issues #1531, #566, and #1528) .
  • Loading branch information
celinval authored Nov 2, 2022
1 parent 6ef19f2 commit 7592365
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

//! This file contains the code necessary to interface with the compiler backend

use crate::codegen_cprover_gotoc::reachability::{collect_reachable_items, filter_crate_items};
use crate::codegen_cprover_gotoc::GotocCtx;
use crate::kani_middle::reachability::{collect_reachable_items, filter_crate_items};
use bitflags::_core::any::Any;
use cbmc::goto_program::{symtab_transformer, Location};
use cbmc::{InternedString, MachineModel};
Expand Down
1 change: 0 additions & 1 deletion kani-compiler/src/codegen_cprover_gotoc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod codegen;
mod compiler_interface;
mod context;
mod overrides;
mod reachability;
mod utils;

pub use compiler_interface::GotocCodegenBackend;
Expand Down
5 changes: 5 additions & 0 deletions kani-compiler/src/kani_middle/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//! This module contains code that are backend agnostic. For example, MIR analysis
//! and transformations.
pub mod reachability;
1 change: 1 addition & 0 deletions kani-compiler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern crate rustc_target;

#[cfg(feature = "cprover")]
mod codegen_cprover_gotoc;
mod kani_middle;
mod parser;
mod session;
mod unsound_experiments;
Expand Down

0 comments on commit 7592365

Please sign in to comment.