|
17 | 17 | total memory locations: 4 |
18 | 18 |
|
19 | 19 | $ (yamlWitnessStrip < witness.yml) > new-stripped.yml |
20 | | - $ ./compare-ghost-alloc.sh 66-ghost-alloc-stripped.yml new-stripped.yml |
21 | | - The files are the same after renaming the variables. |
| 20 | + $ ./strip-ghost-alloc.sh new-stripped.yml |
| 21 | + - entry_type: ghost_instrumentation |
| 22 | + content: |
| 23 | + ghost_variables: |
| 24 | + - name: ALLOC_VAR1_LOCKED |
| 25 | + scope: global |
| 26 | + type: int |
| 27 | + initial: |
| 28 | + value: "0" |
| 29 | + format: c_expression |
| 30 | + - name: ALLOC_VAR2_LOCKED |
| 31 | + scope: global |
| 32 | + type: int |
| 33 | + initial: |
| 34 | + value: "0" |
| 35 | + format: c_expression |
| 36 | + - name: multithreaded |
| 37 | + scope: global |
| 38 | + type: int |
| 39 | + initial: |
| 40 | + value: "0" |
| 41 | + format: c_expression |
| 42 | + ghost_updates: |
| 43 | + - location: |
| 44 | + file_name: 66-ghost-alloc-lock.c |
| 45 | + file_hash: $FILE_HASH |
| 46 | + line: 10 |
| 47 | + column: 3 |
| 48 | + function: t_fun |
| 49 | + updates: |
| 50 | + - variable: ALLOC_VAR1_LOCKED |
| 51 | + value: "1" |
| 52 | + format: c_expression |
| 53 | + - location: |
| 54 | + file_name: 66-ghost-alloc-lock.c |
| 55 | + file_hash: $FILE_HASH |
| 56 | + line: 13 |
| 57 | + column: 3 |
| 58 | + function: t_fun |
| 59 | + updates: |
| 60 | + - variable: ALLOC_VAR1_LOCKED |
| 61 | + value: "0" |
| 62 | + format: c_expression |
| 63 | + - location: |
| 64 | + file_name: 66-ghost-alloc-lock.c |
| 65 | + file_hash: $FILE_HASH |
| 66 | + line: 14 |
| 67 | + column: 3 |
| 68 | + function: t_fun |
| 69 | + updates: |
| 70 | + - variable: ALLOC_VAR2_LOCKED |
| 71 | + value: "1" |
| 72 | + format: c_expression |
| 73 | + - location: |
| 74 | + file_name: 66-ghost-alloc-lock.c |
| 75 | + file_hash: $FILE_HASH |
| 76 | + line: 17 |
| 77 | + column: 3 |
| 78 | + function: t_fun |
| 79 | + updates: |
| 80 | + - variable: ALLOC_VAR2_LOCKED |
| 81 | + value: "0" |
| 82 | + format: c_expression |
| 83 | + - location: |
| 84 | + file_name: 66-ghost-alloc-lock.c |
| 85 | + file_hash: $FILE_HASH |
| 86 | + line: 28 |
| 87 | + column: 3 |
| 88 | + function: main |
| 89 | + updates: |
| 90 | + - variable: multithreaded |
| 91 | + value: "1" |
| 92 | + format: c_expression |
| 93 | + - location: |
| 94 | + file_name: 66-ghost-alloc-lock.c |
| 95 | + file_hash: $FILE_HASH |
| 96 | + line: 30 |
| 97 | + column: 3 |
| 98 | + function: main |
| 99 | + updates: |
| 100 | + - variable: ALLOC_VAR1_LOCKED |
| 101 | + value: "1" |
| 102 | + format: c_expression |
| 103 | + - location: |
| 104 | + file_name: 66-ghost-alloc-lock.c |
| 105 | + file_hash: $FILE_HASH |
| 106 | + line: 32 |
| 107 | + column: 3 |
| 108 | + function: main |
| 109 | + updates: |
| 110 | + - variable: ALLOC_VAR1_LOCKED |
| 111 | + value: "0" |
| 112 | + format: c_expression |
| 113 | + - location: |
| 114 | + file_name: 66-ghost-alloc-lock.c |
| 115 | + file_hash: $FILE_HASH |
| 116 | + line: 33 |
| 117 | + column: 3 |
| 118 | + function: main |
| 119 | + updates: |
| 120 | + - variable: ALLOC_VAR2_LOCKED |
| 121 | + value: "1" |
| 122 | + format: c_expression |
| 123 | + - location: |
| 124 | + file_name: 66-ghost-alloc-lock.c |
| 125 | + file_hash: $FILE_HASH |
| 126 | + line: 35 |
| 127 | + column: 3 |
| 128 | + function: main |
| 129 | + updates: |
| 130 | + - variable: ALLOC_VAR2_LOCKED |
| 131 | + value: "0" |
| 132 | + format: c_expression |
| 133 | + - entry_type: flow_insensitive_invariant |
| 134 | + flow_insensitive_invariant: |
| 135 | + string: '! multithreaded || (ALLOC_VAR2_LOCKED || g2 == 0)' |
| 136 | + type: assertion |
| 137 | + format: C |
| 138 | + - entry_type: flow_insensitive_invariant |
| 139 | + flow_insensitive_invariant: |
| 140 | + string: '! multithreaded || (ALLOC_VAR1_LOCKED || g1 == 0)' |
| 141 | + type: assertion |
| 142 | + format: C |
| 143 | + - entry_type: flow_insensitive_invariant |
| 144 | + flow_insensitive_invariant: |
| 145 | + string: '! multithreaded || (0 <= g2 && g2 <= 1)' |
| 146 | + type: assertion |
| 147 | + format: C |
| 148 | + - entry_type: flow_insensitive_invariant |
| 149 | + flow_insensitive_invariant: |
| 150 | + string: '! multithreaded || (0 <= g1 && g1 <= 1)' |
| 151 | + type: assertion |
| 152 | + format: C |
0 commit comments