Skip to content

Commit f8a5668

Browse files
committed
edit
1 parent 3e9c2e6 commit f8a5668

File tree

2 files changed

+56
-50
lines changed

2 files changed

+56
-50
lines changed

README.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,26 @@ A (fairly) large part of the code-base is shared between $\lambda_{\mathtt{IFC}}
9898
$\lambda_{\mathtt{SEC}}^\star$.
9999

100100

101-
## Meta-theoretical results and demo programs
101+
## Top-level modules of meta-theoretical results and demo programs
102102

103103
There are three top-level modules in the [`src/`](./src) directory:
104104

105-
1. [**`Proofs`**](./src/Proofs.agda): sources the proofs of important **meta-theoretical results**
106-
in the following modules:
107-
- Here are some meta-theoretical results for $\lambda_{\mathtt{SEC}}^\star$ and its cast
108-
calculus $\lambda_{\mathtt{SEC}}^{c}$:
105+
1. [**`Proofs`**](./src/Proofs.agda): The module sources the proofs of important **meta-theoretical
106+
results** in the following files:
107+
- Meta-theoretical results for $\lambda_{\mathtt{SEC}}^\star$ and its cast calculus
108+
$\lambda_{\mathtt{SEC}}^{c}$:
109109
- [`CC.TypeSafety`](./src/CC/TypeSafety.agda): $\lambda_{\mathtt{SEC}}^{c}$ is type safe by satisfying progress and
110110
preservation.
111111
- [`CC.BigStepPreservation`](./src/CC/BigStepPreservation.agda): The big-step semantics of $\lambda_{\mathtt{SEC}}^{c}$ also
112-
preserves types. The big-step semantics
112+
preserves types. This big-step semantics is used in the erasure-based
113+
noninterference proof.
113114
- [`CC.BigStepErasedDeterministic`](./src/CC/BigStepErasedDeterministic.agda): The big-step evaluation of erased
114115
$\lambda_{\mathtt{SEC}}^{c}$ is deterministic.
115116
- [`CC.Noninterference`](./src/CC/Noninterference.agda): $\lambda_{\mathtt{SEC}}^{c}$ satisfies termination-insensitive
116117
noninterference (TINI).
117118
- [`CC.Compile`](./src/CC/Compile.agda): The compilation from $\lambda_{\mathtt{SEC}}^\star$ to $\lambda_{\mathtt{SEC}}^{c}$
118119
preserves types.
119-
- Here are meta-theoretical results for $\lambda_{\mathtt{IFC}}^\star$ and its cast calculus
120-
$\lambda_{\mathtt{IFC}}^{c}$:
120+
- Meta-theoretical results for $\lambda_{\mathtt{IFC}}^\star$ and its cast calculus $\lambda_{\mathtt{IFC}}^{c}$:
121121
- [`CC2.Progress`](./src/CC2/Progress.agda): $\lambda_{\mathtt{IFC}}^{c}$ satisfies progress, so that a well-typed $\lambda_{\mathtt{IFC}}^{c}$
122122
term is either a value or a blame, which does not reduce, or the term
123123
takes one reduction step.
@@ -172,14 +172,14 @@ There are three top-level modules in the [`src/`](./src) directory:
172172
blame, that contains its blame label. In this way, the programmer knows which
173173
cast is causing the problem.
174174
- [`Common.TypeBasedCast`](./src/Common/TypeBasedCast.agda): This module defines *type-based casts* between two
175-
security types. In particular, $\lambda_{\mathtt{SEC}}^{c}$ uses type-based cast as its
175+
security types. In particular, $\lambda_{\mathtt{SEC}}^{c}$ uses type-based casts as its
176176
cast representation.
177177
- [`Common.Coercions`](./src/Common/Coercions.agda): This modules defines the coercion-based cast
178-
representation used by $\lambda_{\mathtt{IFC}}^{c}$; in particular, it defines the *security
178+
representation used by $\lambda_{\mathtt{IFC}}^{c}$. In particular, it defines the *security
179179
coercions on values* of $\lambda_{\mathtt{IFC}}^{c}$.
180180

181181

182-
### The shared heap model [in directory `Memory/`](./src/Memory)
182+
### The heap model of $\lambda_{\mathtt{SEC}}^\star$ and $\lambda_{\mathtt{IFC}}^\star$ [in directory `Memory/`](./src/Memory)
183183

184184
- [`Memory.Addr`](./src/Memory/Addr.agda): Definition of memory addresses.
185185
- [`Memory.Heap`](./src/Memory/Heap.agda): Definition and helper methods of the split-heap model, where
@@ -224,9 +224,9 @@ There are three top-level modules in the [`src/`](./src) directory:
224224
- [`CC.Values`](./src/CC/Values.agda): The definition of values in $\lambda_{\mathtt{SEC}}^{c}$. A value can be (1) a
225225
constant (2) an address (3) a $\lambda$ abstraction or (4) a value wrapped
226226
with an irreducible (`Inert`) cast. The opaque term is also a value in the
227-
semantics of erased $\lambda_{\mathtt{SEC}}^{c}$. There are canonical-form lemmas for
228-
constants, functions, and memory addresses in this model: for example, a value
229-
of function type must be either a $\lambda$ or a function proxy (a $\lambda$
227+
semantics of erased $\lambda_{\mathtt{SEC}}^{c}$. In this module, there are canonical-form
228+
lemmas for constants, functions, and memory addresses. For example, a value of
229+
function type must be either a $\lambda$ or a function proxy (a $\lambda$
230230
wrapped with at least one inert function cast).
231231
- [`CC.Reduction`](./src/CC/Reduction.agda): The operational semantics for $\lambda_{\mathtt{SEC}}^{c}$. The relation
232232
$M \mid \mu \mid \ell \longrightarrow N \mid \mu'$ says that $\lambda_{\mathtt{SEC}}^{c}$
@@ -248,37 +248,40 @@ There are three top-level modules in the [`src/`](./src) directory:
248248
- [`CC.Interp`](./src/CC/Interp.agda): A stepper that replies on the progress proof to generate a
249249
reduction sequence of $k$ steps for a well-typed $\lambda_{\mathtt{SEC}}^{c}$ term.
250250
- [`CC.Compile`](./src/CC/Compile.agda): Compilation from $\lambda_{\mathtt{SEC}}^\star$ to $\lambda_{\mathtt{SEC}}^{c}$. The module
251-
also contains a proof that the compilation preserves types
251+
also contains a proof that this compilation function preserves types
252252
(`compilation-preserves-type`).
253253

254254
The noninterference proof of $\lambda_{\mathtt{SEC}}^{c}$ is erasure-based. It uses the
255255
following auxiliary definitions:
256256

257257
- [`CC.BigStep`](./src/CC/BigStep.agda): The big-step semantics for $\lambda_{\mathtt{SEC}}^{c}$. It is a direct
258-
mechanical translation from the semantics in [CC.Reduction](./src/CC/Reduction.agda).
259-
- [`CC.Erasure`](./src/CC/Erasure.agda): Definition of the erasure functions for $\lambda_{\mathtt{SEC}}^{c}$ terms
260-
(`erase`) and heaps (`erase-μ`). Note that the memory cells of high security
261-
are completely erased, because the values read from those cells are always
262-
of high security and thus appear to be opaque for a low observer.
258+
mechanical translation from the semantics in [`CC.Reduction`](./src/CC/Reduction.agda).
259+
- [`CC.Erasure`](./src/CC/Erasure.agda): Definition of the erasure functions for terms (`erase`) and
260+
heaps (`erase-μ`) in $\lambda_{\mathtt{SEC}}^{c}$. Note that the memory cells of high security
261+
are completely erased, because the values read from those cells are always of
262+
high security and thus appear to be opaque from a low-observer's point of
263+
view.
263264
- [`CC.BigStepErased`](./src/CC/BigStepErased.agda): The big-step semantics for erased $\lambda_{\mathtt{SEC}}^{c}$.
264265

265266

266267
### Technical definitions of the surface language $\lambda_{\mathtt{IFC}}^\star$ [in directory `Surface2/`](./src/Surface2)
267268

268269
- [`Surface2.Syntax`](./src/Surface2/Syntax.agda): The syntax of $\lambda_{\mathtt{IFC}}^\star$. The most noteworthy difference
269-
from $\lambda_{\mathtt{SEC}}^\star$ is that in $\lambda_{\mathtt{IFC}}^\star$, the PC annotation on a $\lambda$
270-
is treated as a type annotation, which means that it can be $\star$.
270+
from $\lambda_{\mathtt{SEC}}^\star$ is that in $\lambda_{\mathtt{IFC}}^\star$, the PC annotation on a
271+
$\lambda$ is treated as a type annotation instead of a value annotation, which
272+
means that it is allowed to be $\star$ in $\lambda_{\mathtt{IFC}}^\star$ (but not in
273+
$\lambda_{\mathtt{SEC}}^\star$).
271274
- [`Surface2.Typing`](./src/Surface2/Typing.agda): The typing rules for $\lambda_{\mathtt{IFC}}^\star$.
272275
- [`Surface2.Precision`](./src/Surface2/Precision.agda): The precision rules for $\lambda_{\mathtt{IFC}}^\star$. The precision
273276
relation is used in the definition and the proof of the gradual guarantee.
274277

275278

276279
### The coercion calculus for security labels [in directory `CoercionExpr/`](./src/CoercionExpr)
277280

278-
This directory contains the definition of and lemmas about the *coercion calculus
279-
on security labels*.
281+
This directory contains the definition of and the lemmas about the *coercion
282+
calculus on security labels*.
280283

281-
- [`CoercionExpr.Coercions`](./src/CoercionExpr/Coercions.agda): One single coercion on security labels can either
284+
- [`CoercionExpr.Coercions`](./src/CoercionExpr/Coercions.agda): A single coercion on security labels can either
282285
be identity ($\mathbf{id}$), subtype ($\uparrow$), injection from $\ell$ ($\ell!$),
283286
or projection to $\ell$ with blame label $p$ ($\ell?^p$).
284287
- [`CoercionExpr.CoercionExpr`](./src/CoercionExpr/CoercionExpr.agda): The syntax, typing, reduction, and normal forms

README.org

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,26 @@ All Agda source files are located in the [[./src][=src/=]] directory and end wit
9999
A (fairly) large part of the code-base is shared between {{{surface}}} and
100100
{{{surface_old}}}.
101101

102-
** Meta-theoretical results and demo programs
102+
** Top-level modules of meta-theoretical results and demo programs
103103

104104
There are three top-level modules in the [[./src][=src/=]] directory:
105105

106-
1. [[./src/Proofs.agda][*=Proofs=*]]: sources the proofs of important *meta-theoretical results*
107-
in the following modules:
108-
* Here are some meta-theoretical results for {{{surface_old}}} and its cast
109-
calculus {{{cc_old}}}:
106+
1. [[./src/Proofs.agda][*=Proofs=*]]: The module sources the proofs of important *meta-theoretical
107+
results* in the following files:
108+
* Meta-theoretical results for {{{surface_old}}} and its cast calculus
109+
{{{cc_old}}}:
110110
* [[./src/CC/TypeSafety.agda][=CC.TypeSafety=]]: {{{cc_old}}} is type safe by satisfying progress and
111111
preservation.
112112
* [[./src/CC/BigStepPreservation.agda][=CC.BigStepPreservation=]]: The big-step semantics of {{{cc_old}}} also
113-
preserves types. The big-step semantics
113+
preserves types. This big-step semantics is used in the erasure-based
114+
noninterference proof.
114115
* [[./src/CC/BigStepErasedDeterministic.agda][=CC.BigStepErasedDeterministic=]]: The big-step evaluation of erased
115116
{{{cc_old}}} is deterministic.
116117
* [[./src/CC/Noninterference.agda][=CC.Noninterference=]]: {{{cc_old}}} satisfies termination-insensitive
117118
noninterference (TINI).
118119
* [[./src/CC/Compile.agda][=CC.Compile=]]: The compilation from {{{surface_old}}} to {{{cc_old}}}
119120
preserves types.
120-
* Here are meta-theoretical results for {{{surface}}} and its cast calculus
121-
{{{cc}}}:
121+
* Meta-theoretical results for {{{surface}}} and its cast calculus {{{cc}}}:
122122
* [[./src/CC2/Progress.agda][=CC2.Progress=]]: {{{cc}}} satisfies progress, so that a well-typed {{{cc}}}
123123
term is either a value or a blame, which does not reduce, or the term
124124
takes one reduction step.
@@ -171,13 +171,13 @@ There are three top-level modules in the [[./src][=src/=]] directory:
171171
blame, that contains its blame label. In this way, the programmer knows which
172172
cast is causing the problem.
173173
+ [[./src/Common/TypeBasedCast.agda][=Common.TypeBasedCast=]]: This module defines /type-based casts/ between two
174-
security types. In particular, {{{cc_old}}} uses type-based cast as its
174+
security types. In particular, {{{cc_old}}} uses type-based casts as its
175175
cast representation.
176176
+ [[./src/Common/Coercions.agda][=Common.Coercions=]]: This modules defines the coercion-based cast
177-
representation used by {{{cc}}}; in particular, it defines the /security
177+
representation used by {{{cc}}}. In particular, it defines the /security
178178
coercions on values/ of {{{cc}}}.
179179

180-
*** The shared heap model [[./src/Memory][in directory =Memory/=]]
180+
*** The heap model of {{{surface_old}}} and {{{surface}}} [[./src/Memory][in directory =Memory/=]]
181181

182182
+ [[./src/Memory/Addr.agda][=Memory.Addr=]]: Definition of memory addresses.
183183
+ [[./src/Memory/Heap.agda][=Memory.Heap=]]: Definition and helper methods of the split-heap model, where
@@ -220,9 +220,9 @@ There are three top-level modules in the [[./src][=src/=]] directory:
220220
+ [[./src/CC/Values.agda][=CC.Values=]]: The definition of values in {{{cc_old}}}. A value can be (1) a
221221
constant (2) an address (3) a $\lambda$ abstraction or (4) a value wrapped
222222
with an irreducible (~Inert~) cast. The opaque term is also a value in the
223-
semantics of erased {{{cc_old}}}. There are canonical-form lemmas for
224-
constants, functions, and memory addresses in this model: for example, a value
225-
of function type must be either a $\lambda$ or a function proxy (a $\lambda$
223+
semantics of erased {{{cc_old}}}. In this module, there are canonical-form
224+
lemmas for constants, functions, and memory addresses. For example, a value of
225+
function type must be either a $\lambda$ or a function proxy (a $\lambda$
226226
wrapped with at least one inert function cast).
227227
+ [[./src/CC/Reduction.agda][=CC.Reduction=]]: The operational semantics for {{{cc_old}}}. The relation
228228
$M \mid \mu \mid \ell \longrightarrow N \mid \mu'$ says that {{{cc_old}}}
@@ -244,34 +244,37 @@ There are three top-level modules in the [[./src][=src/=]] directory:
244244
+ [[./src/CC/Interp.agda][=CC.Interp=]]: A stepper that replies on the progress proof to generate a
245245
reduction sequence of $k$ steps for a well-typed {{{cc_old}}} term.
246246
+ [[./src/CC/Compile.agda][=CC.Compile=]]: Compilation from {{{surface_old}}} to {{{cc_old}}}. The module
247-
also contains a proof that the compilation preserves types
247+
also contains a proof that this compilation function preserves types
248248
(~compilation-preserves-type~).
249249

250250
The noninterference proof of {{{cc_old}}} is erasure-based. It uses the
251251
following auxiliary definitions:
252252
+ [[./src/CC/BigStep.agda][=CC.BigStep=]]: The big-step semantics for {{{cc_old}}}. It is a direct
253-
mechanical translation from the semantics in [[./src/CC/Reduction.agda][CC.Reduction]].
254-
+ [[./src/CC/Erasure.agda][=CC.Erasure=]]: Definition of the erasure functions for {{{cc_old}}} terms
255-
(~erase~) and heaps (~erase-μ~). Note that the memory cells of high security
256-
are completely erased, because the values read from those cells are always
257-
of high security and thus appear to be opaque for a low observer.
253+
mechanical translation from the semantics in [[./src/CC/Reduction.agda][=CC.Reduction=]].
254+
+ [[./src/CC/Erasure.agda][=CC.Erasure=]]: Definition of the erasure functions for terms (~erase~) and
255+
heaps (~erase-μ~) in {{{cc_old}}}. Note that the memory cells of high security
256+
are completely erased, because the values read from those cells are always of
257+
high security and thus appear to be opaque from a low-observer's point of
258+
view.
258259
+ [[./src/CC/BigStepErased.agda][=CC.BigStepErased=]]: The big-step semantics for erased {{{cc_old}}}.
259260

260261
*** Technical definitions of the surface language {{{surface}}} [[./src/Surface2][in directory =Surface2/=]]
261262

262263
+ [[./src/Surface2/Syntax.agda][=Surface2.Syntax=]]: The syntax of {{{surface}}}. The most noteworthy difference
263-
from {{{surface_old}}} is that in {{{surface}}}, the PC annotation on a $\lambda$
264-
is treated as a type annotation, which means that it can be $\star$.
264+
from {{{surface_old}}} is that in {{{surface}}}, the PC annotation on a
265+
$\lambda$ is treated as a type annotation instead of a value annotation, which
266+
means that it is allowed to be $\star$ in {{{surface}}} (but not in
267+
{{{surface_old}}}).
265268
+ [[./src/Surface2/Typing.agda][=Surface2.Typing=]]: The typing rules for {{{surface}}}.
266269
+ [[./src/Surface2/Precision.agda][=Surface2.Precision=]]: The precision rules for {{{surface}}}. The precision
267270
relation is used in the definition and the proof of the gradual guarantee.
268271

269272
*** The coercion calculus for security labels [[./src/CoercionExpr][in directory =CoercionExpr/=]]
270273

271-
This directory contains the definition of and lemmas about the /coercion calculus
272-
on security labels/.
274+
This directory contains the definition of and the lemmas about the /coercion
275+
calculus on security labels/.
273276

274-
+ [[./src/CoercionExpr/Coercions.agda][=CoercionExpr.Coercions=]]: One single coercion on security labels can either
277+
+ [[./src/CoercionExpr/Coercions.agda][=CoercionExpr.Coercions=]]: A single coercion on security labels can either
275278
be identity ($\mathbf{id}$), subtype ($\uparrow$), injection from $\ell$ ($\ell!$),
276279
or projection to $\ell$ with blame label $p$ ($\ell?^p$).
277280
+ [[./src/CoercionExpr/CoercionExpr.agda][=CoercionExpr.CoercionExpr=]]: The syntax, typing, reduction, and normal forms

0 commit comments

Comments
 (0)