Skip to content

Commit dd7841a

Browse files
author
Remi Delmas
committed
CONTRACTS: Add dfcc_dsl_wrapper_programt class
The class generates a sequence of GOTO instruction from a contract expressed in the DSL syntax. The instructions either encode a checked call to the function under verification (CHECK mode) or an abstraction derived from the contract (REPLACE mode). In CHECK mode, it generates GOTO instructions that assume preconditions, snapshots history variables, creates a write set instance, call the function under verification asserts the postconditions, and returns the call's return value. In REPLACE mode, it generates GOTO instructions encoding the nondeterministic abstraction defined by the contract: assert preconditions, create and havoc assigns clause targets, create a nondet return value for the call, nondeterministically free frees clause targets, assume postconditions, return a value that satisfies the post conditions. These instructions are meant to be added to the GOTO function that serves as a wrapper for the function under verification or being replaced by the contract.
1 parent 644ffe7 commit dd7841a

File tree

3 files changed

+1422
-0
lines changed

3 files changed

+1422
-0
lines changed

src/goto-instrument/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SRC = accelerate/accelerate.cpp \
2424
contracts/dynamic-frames/dfcc_instrument.cpp \
2525
contracts/dynamic-frames/dfcc_spec_functions.cpp \
2626
contracts/dynamic-frames/dfcc_dsl_contract_functions.cpp \
27+
contracts/dynamic-frames/dfcc_dsl_wrapper_program.cpp \
2728
contracts/havoc_assigns_clause_targets.cpp \
2829
contracts/instrument_spec_assigns.cpp \
2930
contracts/memory_predicates.cpp \

0 commit comments

Comments
 (0)