Skip to content

Commit

Permalink
Revert model-checking#3080 except for std enablement
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Apr 26, 2024
1 parent f3e2053 commit e3d1568
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 41 deletions.
3 changes: 0 additions & 3 deletions kani-compiler/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ pub struct Arguments {
/// Enable specific checks.
#[clap(long)]
pub ub_check: Vec<ExtraChecks>,
/// Ignore storage markers.
#[clap(long)]
pub ignore_storage_markers: bool,
}

#[derive(Debug, Clone, Copy, AsRefStr, EnumString, VariantNames, PartialEq, Eq)]
Expand Down
8 changes: 2 additions & 6 deletions kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ impl<'tcx> GotocCtx<'tcx> {
self.codegen_set_discriminant(dest_ty, dest_expr, *variant_index, location)
}
StatementKind::StorageLive(var_id) => {
if self.queries.args().ignore_storage_markers
|| !self.current_fn().is_address_taken_local(*var_id)
{
if !self.current_fn().is_address_taken_local(*var_id) {
Stmt::skip(location)
} else {
let global_dead_object = self.ensure_global_var(
Expand All @@ -102,9 +100,7 @@ impl<'tcx> GotocCtx<'tcx> {
}
}
StatementKind::StorageDead(var_id) => {
if self.queries.args().ignore_storage_markers
|| !self.current_fn().is_address_taken_local(*var_id)
{
if !self.current_fn().is_address_taken_local(*var_id) {
Stmt::skip(location)
} else {
let global_dead_object = self.ensure_global_var(
Expand Down
8 changes: 0 additions & 8 deletions kani-driver/src/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,6 @@ pub struct VerificationArgs {
#[arg(long, hide_short_help = true, requires("enable_unstable"))]
pub ignore_global_asm: bool,

/// Ignore lifetimes of local variables. This effectively extends their
/// lifetimes to the function scope, and hence may cause Kani to miss
/// undefined behavior resulting from using the variable after it dies.
/// This option may impact the soundness of the analysis and may cause false
/// proofs and/or counterexamples
#[arg(long, hide_short_help = true, requires("enable_unstable"))]
pub ignore_locals_lifetime: bool,

/// Write the GotoC symbol table to a file in JSON format instead of goto binary format.
#[arg(long, hide_short_help = true)]
pub write_json_symtab: bool,
Expand Down
4 changes: 0 additions & 4 deletions kani-driver/src/call_single_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ impl KaniSession {
flags.push("--ub-check=validity".into())
}

if self.args.ignore_locals_lifetime {
flags.push("--ignore-storage-markers".into())
}

flags.extend(self.args.common_args.unstable_features.as_arguments().map(str::to_string));

// This argument will select the Kani flavour of the compiler. It will be removed before
Expand Down
5 changes: 0 additions & 5 deletions tests/perf/btreeset/insert_any/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

# Temporarily ignore the handling of storage markers till
# https://github.com/model-checking/kani/issues/3099 is fixed
[package.metadata.kani]
flags = { ignore-locals-lifetime = true, enable-unstable = true }
5 changes: 0 additions & 5 deletions tests/perf/btreeset/insert_multi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

# Temporarily ignore the handling of storage markers till
# https://github.com/model-checking/kani/issues/3099 is fixed
[package.metadata.kani]
flags = { ignore-locals-lifetime = true, enable-unstable = true }
5 changes: 0 additions & 5 deletions tests/perf/btreeset/insert_same/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

# Temporarily ignore the handling of storage markers till
# https://github.com/model-checking/kani/issues/3099 is fixed
[package.metadata.kani]
flags = { ignore-locals-lifetime = true, enable-unstable = true }
5 changes: 0 additions & 5 deletions tests/perf/hashset/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ description = "Verify HashSet basic behavior"

[package.metadata.kani.unstable]
stubbing = true

# Temporarily ignore the handling of storage markers till
# https://github.com/model-checking/kani/issues/3099 is fixed
[package.metadata.kani]
flags = { ignore-locals-lifetime = true, enable-unstable = true }

0 comments on commit e3d1568

Please sign in to comment.