Skip to content

Commit 87e3b15

Browse files
authored
Remove experimental unsound features (model-checking#2372)
Remove stale option that's no longer being used.
1 parent a85f77c commit 87e3b15

File tree

23 files changed

+1
-249
lines changed

23 files changed

+1
-249
lines changed

.github/workflows/kani.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,6 @@ jobs:
5252
KANI_ENABLE_WRITE_JSON_SYMTAB: 1
5353
run: ./scripts/kani-regression.sh
5454

55-
experimental-features-regression:
56-
runs-on: ubuntu-20.04
57-
env:
58-
KANI_ENABLE_UNSOUND_EXPERIMENTS: 1
59-
steps:
60-
- name: Checkout Kani
61-
uses: actions/checkout@v3
62-
63-
- name: Setup Kani Dependencies
64-
uses: ./.github/actions/setup
65-
with:
66-
os: ubuntu-20.04
67-
68-
- name: Build Kani
69-
run: cargo build-dev
70-
71-
- name: Execute Kani regression
72-
run: ./scripts/kani-regression.sh
73-
7455
perf:
7556
runs-on: ubuntu-20.04
7657
steps:

kani-compiler/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ tracing-tree = "0.2.2"
3737
default = ['cprover']
3838
cprover = ['ar', 'cbmc', 'libc', 'num', 'object', 'rustc-demangle', 'serde',
3939
'serde_json', "strum", "strum_macros"]
40-
unsound_experiments = ["kani_queries/unsound_experiments"]
4140
write_json_symtab = []
4241

4342
[package.metadata.rust-analyzer]

kani-compiler/kani_queries/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ edition = "2021"
88
license = "MIT OR Apache-2.0"
99
publish = false
1010

11-
[features]
12-
unsound_experiments = []
13-
1411
[dependencies]
1512
tracing = {version = "0.1"}
1613
strum = {version = "0.24.0"}

kani-compiler/kani_queries/src/lib.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
use std::sync::{Arc, Mutex};
55
use strum_macros::{AsRefStr, EnumString, EnumVariantNames};
66

7-
#[cfg(feature = "unsound_experiments")]
8-
mod unsound_experiments;
9-
10-
#[cfg(feature = "unsound_experiments")]
11-
use crate::unsound_experiments::UnsoundExperiments;
12-
137
#[derive(Debug, Default, Clone, Copy, AsRefStr, EnumString, EnumVariantNames, PartialEq, Eq)]
148
#[strum(serialize_all = "snake_case")]
159
pub enum ReachabilityType {
@@ -47,11 +41,6 @@ pub trait UserInput {
4741

4842
fn set_stubbing_enabled(&mut self, stubbing_enabled: bool);
4943
fn get_stubbing_enabled(&self) -> bool;
50-
51-
#[cfg(feature = "unsound_experiments")]
52-
fn get_unsound_experiments(&self) -> UnsoundExperiments;
53-
#[cfg(feature = "unsound_experiments")]
54-
fn set_unsound_experiments(&mut self, experiments: UnsoundExperiments);
5544
}
5645

5746
/// This structure should only be used behind a synchronized reference or a snapshot.
@@ -65,8 +54,6 @@ pub struct QueryDb {
6554
write_json_symtab: bool,
6655
reachability_analysis: ReachabilityType,
6756
stubbing_enabled: bool,
68-
#[cfg(feature = "unsound_experiments")]
69-
unsound_experiments: UnsoundExperiments,
7057
}
7158

7259
impl QueryDb {
@@ -79,8 +66,6 @@ impl QueryDb {
7966
write_json_symtab: false,
8067
reachability_analysis: ReachabilityType::None,
8168
stubbing_enabled: false,
82-
#[cfg(feature = "unsound_experiments")]
83-
unsound_experiments: unsound_experiments::UnsoundExperiments { zero_init_vars: false },
8469
}))
8570
}
8671
}
@@ -141,14 +126,4 @@ impl UserInput for QueryDb {
141126
fn get_write_json_symtab(&self) -> bool {
142127
self.write_json_symtab
143128
}
144-
145-
#[cfg(feature = "unsound_experiments")]
146-
fn get_unsound_experiments(&self) -> UnsoundExperiments {
147-
self.unsound_experiments
148-
}
149-
150-
#[cfg(feature = "unsound_experiments")]
151-
fn set_unsound_experiments(&mut self, experiments: UnsoundExperiments) {
152-
self.unsound_experiments = experiments
153-
}
154129
}

kani-compiler/kani_queries/src/unsound_experiments.rs

Lines changed: 0 additions & 13 deletions
This file was deleted.

kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ impl<'tcx> GotocCtx<'tcx> {
263263
/// Our model of GotoC has a similar statement, which is later lowered
264264
/// to assigning a Nondet in CBMC, with a comment specifying that it
265265
/// corresponds to a Deinit.
266-
#[cfg(not(feature = "unsound_experiments"))]
267266
fn codegen_deinit(&mut self, place: &Place<'tcx>, loc: Location) -> Stmt {
268267
let dst_mir_ty = self.place_ty(place);
269268
let dst_type = self.codegen_ty(dst_mir_ty);

kani-compiler/src/codegen_cprover_gotoc/codegen/typ.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,6 @@ impl<'tcx> GotocCtx<'tcx> {
708708
/// By default, returns `None` which leaves the variable uninitilized.
709709
/// In CBMC, this translates to a NONDET value.
710710
/// In the future, we might want to replace this with `Poison`.
711-
#[cfg(not(feature = "unsound_experiments"))]
712711
pub fn codegen_default_initializer(&self, _e: &Expr) -> Option<Expr> {
713712
None
714713
}

kani-compiler/src/kani_compiler.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ impl Callbacks for KaniCompiler {
146146
);
147147
queries.set_reachability_analysis(matches.reachability_type());
148148

149-
#[cfg(feature = "unsound_experiments")]
150-
crate::unsound_experiments::arg_parser::add_unsound_experiment_args_to_queries(
151-
queries, &matches,
152-
);
153-
154149
// If appropriate, collect and set the stub mapping.
155150
if matches.get_flag(parser::ENABLE_STUBBING)
156151
&& queries.get_reachability_analysis() == ReachabilityType::Harnesses

kani-compiler/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ mod kani_compiler;
3636
mod kani_middle;
3737
mod parser;
3838
mod session;
39-
mod unsound_experiments;
4039

4140
use rustc_driver::{RunCompiler, TimePassesCallbacks};
4241
use std::env;

kani-compiler/src/parser.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ pub fn parser() -> Command {
147147
.action(ArgAction::Set)
148148
.help("Pass the kani version to the compiler to ensure cache coherence."),
149149
);
150-
#[cfg(feature = "unsound_experiments")]
151-
let app = crate::unsound_experiments::arg_parser::add_unsound_experiments_to_parser(app);
152-
153150
app
154151
}
155152

0 commit comments

Comments
 (0)