Skip to content

Commit

Permalink
Use constant
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jul 26, 2024
1 parent 7ab6f60 commit e902354
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cprover_bindings/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ pub fn machine_model_symbols(mm: &MachineModel) -> Vec<Symbol> {
]
}

const DEAD_OBJECT_IDENTIFIER: &str = "__CPROVER_dead_object";

pub fn additional_env_symbols() -> Vec<Symbol> {
vec![
Symbol::builtin_function("__CPROVER_initialize", vec![], Type::empty()),
Expand All @@ -83,8 +85,8 @@ pub fn additional_env_symbols() -> Vec<Symbol> {
)
.with_is_extern(true),
Symbol::static_variable(
"__CPROVER_dead_object",
"__CPROVER_dead_object",
DEAD_OBJECT_IDENTIFIER,
DEAD_OBJECT_IDENTIFIER,
Type::void_pointer(),
Location::none(),
)
Expand All @@ -93,5 +95,5 @@ pub fn additional_env_symbols() -> Vec<Symbol> {
}

pub fn global_dead_object(symbol_table: &SymbolTable) -> Expr {
symbol_table.lookup("__CPROVER_dead_object").unwrap().to_expr()
symbol_table.lookup(DEAD_OBJECT_IDENTIFIER).unwrap().to_expr()
}

0 comments on commit e902354

Please sign in to comment.