File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ SRC = accelerate/accelerate.cpp \
19
19
contracts/contracts.cpp \
20
20
contracts/dynamic-frames/dfcc_utils.cpp \
21
21
contracts/dynamic-frames/dfcc_library.cpp \
22
+ contracts/dynamic-frames/dfcc_is_cprover_symbol.cpp \
22
23
contracts/dynamic-frames/dfcc_is_fresh.cpp \
23
24
contracts/dynamic-frames/dfcc_pointer_in_range.cpp \
24
25
contracts/dynamic-frames/dfcc_is_freeable.cpp \
Original file line number Diff line number Diff line change
1
+ /* ******************************************************************\
2
+
3
+ Module: Dynamic frame condition checking
4
+
5
+ Author: Remi Delmas, delmasrd@amazon.com
6
+
7
+ Date: March 2023
8
+
9
+ \*******************************************************************/
10
+
11
+ #include " dfcc_is_cprover_symbol.h"
12
+
13
+ #include < util/cprover_prefix.h>
14
+ #include < util/prefix.h>
15
+ #include < util/suffix.h>
16
+
17
+ bool dfcc_is_cprover_symbol (const irep_idt &id)
18
+ {
19
+ std::string str = id2string (id);
20
+ return has_prefix (str, CPROVER_PREFIX) || has_prefix (str, " __VERIFIER" ) ||
21
+ has_prefix (str, " nondet" ) || has_suffix (str, " $object" );
22
+ }
Original file line number Diff line number Diff line change
1
+ /*******************************************************************\
2
+
3
+ Module: Dynamic frame condition checking
4
+
5
+ Author: Remi Delmas, delmasrd@amazon.com
6
+
7
+ Date: March 2023
8
+
9
+ \*******************************************************************/
10
+
11
+ /// \file
12
+
13
+ #ifndef CPROVER_GOTO_INSTRUMENT_CONTRACTS_DYNAMIC_FRAMES_DFCC_IS_CPROVER_SYMBOL_H
14
+ #define CPROVER_GOTO_INSTRUMENT_CONTRACTS_DYNAMIC_FRAMES_DFCC_IS_CPROVER_SYMBOL_H
15
+
16
+ #include <util/irep.h>
17
+
18
+ /// \return True iff the id starts with CPROVER_PREFIX, `__VERIFIER`, `nondet`
19
+ /// or ends with `$object`.
20
+ bool dfcc_is_cprover_symbol (const irep_idt & id );
21
+
22
+ #endif
You can’t perform that action at this time.
0 commit comments