Skip to content

Commit 31dfa3e

Browse files
authored
Merge pull request #7687 from tautschnig/cleanup/use-history
dfcc_wrapper_programt::encode_ensures_clauses: remove unnecessary local
2 parents 73ffe8d + 52839ed commit 31dfa3e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/goto-instrument/contracts/dynamic-frames/dfcc_wrapper_program.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,6 @@ void dfcc_wrapper_programt::encode_ensures_clauses()
617617
const auto &statement_type =
618618
(contract_mode == dfcc_contract_modet::CHECK) ? ID_assert : ID_assume;
619619

620-
// goto program where all history variable snapshots are added
621-
goto_programt history_snapshot_program;
622-
623620
// goto program where all requires are added
624621
goto_programt ensures_program;
625622

@@ -635,10 +632,7 @@ void dfcc_wrapper_programt::encode_ensures_clauses()
635632

636633
// this also rewrites ID_old expressions to fresh variables
637634
generate_history_variables_initialization(
638-
goto_model.symbol_table,
639-
ensures,
640-
language_mode,
641-
history_snapshot_program);
635+
goto_model.symbol_table, ensures, language_mode, history);
642636

643637
source_locationt sl(e.source_location());
644638
if(statement_type == ID_assert)
@@ -671,9 +665,6 @@ void dfcc_wrapper_programt::encode_ensures_clauses()
671665
addr_of_ensures_write_set,
672666
function_pointer_contracts);
673667

674-
// add the snapshot program in the history section
675-
history.destructive_append(history_snapshot_program);
676-
677668
// add the ensures program to the postconditions section
678669
postconditions.destructive_append(ensures_program);
679670
}

0 commit comments

Comments
 (0)