forked from AbsInt/CompCert
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtable.html
378 lines (378 loc) · 13.1 KB
/
table.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<h1 class="page-title" id="artifact">Artifact</h1>
<div class="page-body">
<h1 id="7071474a-5ac4-42f2-9913-d3769c176851">Correctness: folder or
branch <code>ccs-main</code></h1>
<h2 id="7eb3510e-9cc5-4990-a213-ba7b2170df9d">Generic Claims</h2>
<table>
<thead>
<tr>
<th style="text-align: left;">Claim</th>
<th style="text-align: left;">File</th>
<th style="text-align: left;">Location in file</th>
<th style="text-align: left;">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Compartment model</td>
<td style="text-align: left;">common/AST.v</td>
<td style="text-align: left;">Module <code>COMP</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Compartments</td>
<td style="text-align: left;">common/AST.v</td>
<td style="text-align: left;">Definition <code>compartment</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Interfaces</td>
<td style="text-align: left;">common/AST.v</td>
<td style="text-align: left;">Module <code>Policy</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Programs</td>
<td style="text-align: left;">common/AST.v</td>
<td style="text-align: left;">Record <code>program</code></td>
<td style="text-align: left;">Standard CompCert definition with the
addition of a <code>Policy.t</code>(interface) component, properties
related to well-formedness of this component</td>
</tr>
<tr>
<td style="text-align: left;">Assignment of compartment to definitions
and objects</td>
<td style="text-align: left;">common/AST.v</td>
<td style="text-align: left;">Typeclass <code>has_comp</code></td>
<td style="text-align: left;">This is defined as a typeclass because the
type of functions varies.</td>
</tr>
<tr>
<td style="text-align: left;">Interface checks: definition of allowed
cross-compartment calls</td>
<td style="text-align: left;">common/Globalenvs.v</td>
<td style="text-align: left;">Definition
<code>allowed_cross_call</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Interface checks: allowed calls</td>
<td style="text-align: left;">common/Globalenvs.v</td>
<td style="text-align: left;">Definition <code>allowed_call</code></td>
<td style="text-align: left;">Builds on top of the previous definition
to allow for intra-compartment calls</td>
</tr>
<tr>
<td style="text-align: left;">Interface checks: preservation by
compilation of allowed calls</td>
<td style="text-align: left;">common/Globalenvs.v</td>
<td style="text-align: left;">Theorems
<code>match_genvs_allowed_calls</code>,
<code>allowed_call_transf_partial</code>,
<code>allowed_call_transf</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Trace events</td>
<td style="text-align: left;">common/Events.v</td>
<td style="text-align: left;">Definition <code>event</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Properties of system calls</td>
<td style="text-align: left;">common/Events.v</td>
<td style="text-align: left;">Record
<code>extcall_properties</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Generation of the new trace events</td>
<td style="text-align: left;">common/Events.v</td>
<td style="text-align: left;">Definitions <code>call_trace</code> and
<code>return_trace</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Memory containing compartment
information</td>
<td style="text-align: left;">common/Memory.v</td>
<td style="text-align: left;">Record <code>mem'</code> and in particular
field <code>mem_compartments</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Memory operations require compartment
permissions</td>
<td style="text-align: left;">common/Memory.v</td>
<td style="text-align: left;">Definition <code>valid_access</code></td>
<td style="text-align: left;">Given by the conjunct
<code>can_access_block m b cp</code> meaning that <code>cp</code> can
access the block <code>b</code> in memory <code>m</code></td>
</tr>
<tr>
<td style="text-align: left;">Registers are all caller saved</td>
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<h2 id="b79c5752-b66c-4758-a1f9-5dc7e09862b8">How to check changes to
CompCert’s languages</h2>
<p>All the languages are changed in similar ways. As such, we describe
the location of the changes on the Cminor language, and invite the
reviewers to check the other languages if they wish to do so.</p>
<table>
<thead>
<tr>
<th style="text-align: left;">Claim</th>
<th style="text-align: left;">File</th>
<th style="text-align: left;">Location in file</th>
<th style="text-align: left;">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Interface checks at the point of calls and
returns</td>
<td style="text-align: left;">backend/Cminor.v</td>
<td style="text-align: left;">In <code>step</code>, conditions
<code>(ALLOWED: Genv.allowed_call ge (comp_of f) vf)</code> for
calls.</td>
<td style="text-align: left;">There is no check for allowed returns in
most languages, including Cminor.</td>
</tr>
<tr>
<td style="text-align: left;">Cross-compartment calls and returns don’t
pass pointers</td>
<td style="text-align: left;">backend/Cminor.v</td>
<td style="text-align: left;">In <code>step</code>, conditions
<code>(NO_CROSS_PTR: Genv.type_of_call (comp_of f) (comp_of fd) = Genv.CrossCompartmentCall -> Forall not_ptr vargs)</code>
and
<code>(NO_CROSS_PTR: Genv.type_of_call (comp_of f) cp = Genv.CrossCompartmentCall -> not_ptr v)</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Generation of events</td>
<td style="text-align: left;">backend/Cminor.v</td>
<td style="text-align: left;">In <code>step</code>, condition
<code>(EV: call_trace ge (comp_of f) (comp_of fd) vf vargs (sig_args sig) t)</code>
and <code>(EV: return_trace ge (comp_of f) cp v ty t)</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Correctness of the pass from Csharpminor
to Cminor</td>
<td style="text-align: left;">cfrontend/Cminorgenproof.v</td>
<td style="text-align: left;">Entire file. The most important theorem is
the theorem <code>transl_step_correct</code></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<h2 id="6a3fbff0-9339-4c98-b10d-3333a5a95645">Recomposition: folder or
branch <code>ccs-main</code></h2>
<table>
<thead>
<tr>
<th style="text-align: left;">Claim</th>
<th style="text-align: left;">File</th>
<th style="text-align: left;">Location in file</th>
<th style="text-align: left;">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Three-way simulation</td>
<td style="text-align: left;">common/Smallstep.v</td>
<td style="text-align: left;">Definition
<code>tsim_properties</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Three-way simulation implies preservation
of traces</td>
<td style="text-align: left;">common/Smallstep.v</td>
<td style="text-align: left;">Theorem <code>tsimulation_star</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Simulation diagrams</td>
<td style="text-align: left;">common/Smallstep.v</td>
<td style="text-align: left;">Section
<code>THREEWAY_SIMU_DIAGRAM</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Proof of recomposition</td>
<td style="text-align: left;">security/Recomposition.v</td>
<td style="text-align: left;">Theorems <code>simulation</code>,
<code>step_E0_strong</code>, <code>step_E0_weak</code>,
<code>step_t</code></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<h2 id="8e8cd141-be2c-485d-b848-2d9f8f3d309d">Language-specific
claims</h2>
<table>
<thead>
<tr>
<th style="text-align: left;">Claim</th>
<th style="text-align: left;">File</th>
<th style="text-align: left;">Location in file</th>
<th style="text-align: left;">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Cross-compartment inlining disabled</td>
<td style="text-align: left;">backend/Inlining.v</td>
<td style="text-align: left;">Definition <code>can_inline</code></td>
<td style="text-align: left;">This comes from the check
<code>cp_eq_dec cp (comp_of f)</code></td>
</tr>
<tr>
<td style="text-align: left;">Cross-compartment tailcall optimization
disabled</td>
<td style="text-align: left;">backend/Tailcall.v</td>
<td style="text-align: left;">Definition <code>transf_instr</code></td>
<td style="text-align: left;">The <code>Itailcall</code> instruction is
only generated when the condition <code>intra_compartment_call</code>
holds.</td>
</tr>
<tr>
<td style="text-align: left;">Cross-compartment tailcalls disabled</td>
<td style="text-align: left;">All languages definition</td>
<td style="text-align: left;">Semantics of the languages</td>
<td style="text-align: left;">When a tailcall instruction exists, then
the semantics prevent it from being executed cross-compartment by having
a condition <code>(COMP: comp_of fd = comp_of f)</code></td>
</tr>
</tbody>
</table>
<h1 id="788a3b83-9095-47b9-af7a-6deff08c2b48">Back-translation: folder
or branch <code>ccs-backtranslation</code></h1>
<table>
<thead>
<tr>
<th style="text-align: left;">Claim</th>
<th style="text-align: left;">File</th>
<th style="text-align: left;">Location in file</th>
<th style="text-align: left;">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Informative events</td>
<td style="text-align: left;">security/BtInfoAsm.v</td>
<td style="text-align: left;">Definition <code>bundle_event</code></td>
<td style="text-align: left;">This is a more general version of the
events presented in the paper</td>
</tr>
<tr>
<td style="text-align: left;">Well-formed informative trace</td>
<td style="text-align: left;">security/BtInfoAsm.v</td>
<td style="text-align: left;">Definition <code>istar</code> and
<code>ir_step</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Memory deltas</td>
<td style="text-align: left;">security/MemoryDelta.v</td>
<td style="text-align: left;">Section <code>MEMDELTA</code>, definitions
<code>mem_delta_kind</code> , <code>mem_delta</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Existence of a well-formed informative
trace corresponding to a trace prefix</td>
<td style="text-align: left;">security/BtInfoAsm.v</td>
<td style="text-align: left;">Theorem <code>asm_to_ir</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Back-translation function on informative
traces</td>
<td style="text-align: left;">security/Backtranslation.v</td>
<td style="text-align: left;">Definition <code>gen_program</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Correctness of the back-translation from
the intermediate language to Clight</td>
<td style="text-align: left;">security/BacktranslationProof.v</td>
<td style="text-align: left;">Definition <code>ir_to_clight</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Correctness of the back-translation</td>
<td style="text-align: left;">security/BacktranslationProof2.v</td>
<td style="text-align: left;">Theorem
<code>backtranslation_proof</code></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<h1 id="d8fe786d-136b-4a8f-bf55-f4e35c83be5a">Blame: folder or branch
<code>ccs-blame</code></h1>
<table style="width:98%;">
<colgroup>
<col style="width: 21%" />
<col style="width: 22%" />
<col style="width: 28%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr>
<th style="text-align: left;">Claim</th>
<th style="text-align: left;">File</th>
<th style="text-align: left;">Location in file</th>
<th style="text-align: left;">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Main blame theorem</td>
<td style="text-align: left;">security/Blame.v</td>
<td style="text-align: left;">Theorem <code>does_prefix_star</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Definition 6: Blame</td>
<td style="text-align: left;">security/Blame.v</td>
<td style="text-align: left;">Theorem <code>blame_program</code></td>
<td style="text-align: left;">Follows directly from
<code>does_prefix_star</code></td>
</tr>
<tr>
<td style="text-align: left;">Full program run lemmas</td>
<td style="text-align: left;">security/Blame.v</td>
<td style="text-align: left;">Theorems <code>parallel_exec</code>
and<br />
<br />
<code>parallel_exec'</code>.</td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Synchronized execution lemmas</td>
<td style="text-align: left;">security/Blame.v</td>
<td style="text-align: left;">Theorems
<code>parallel_star_E0</code><br />
and<br />
<code>parallel_exec1</code></td>
<td style="text-align: left;"></td>
</tr>
<tr>
<td style="text-align: left;">Stepwise lemmas</td>
<td style="text-align: left;">security/Blame.v</td>
<td style="text-align: left;">Theorems <code>parallel_concrete</code>
and<br />
<br />
<code>parallel_abstract_t</code></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
</div>
<p><span class="sans" style="font-size:14px;padding-top:2em"></span></p>