@@ -76,23 +76,23 @@ compute the value of the corresponding stream expression
7676evaluated at index ` n ` , assuming the C program has been fed
7777inputs corresponding to the first ` n ` values of the external stream
7878inputs. Moreover, the trigger functions should be called from
79- the ` step ` function exactly at time values when the stream expressions
79+ the ` step ` function exactly at the time values when the stream expressions
8080evaluate to true.
8181
8282The notion of correspondence for the values flowing in streams is
8383relatively straightforward: these values consist of fixed-width
8484machine integers, floating-point values, structs and fixed-length
8585arrays. For each, the appropriate notion of equality is fairly clear.
8686
87- Both the original Stream program and the generated C program
87+ Both the original ` Stream ` program and the generated C program
8888can be viewed straightforwardly as a transition system, and under
8989this view, the correspondence we want to establish is a bisimulation
9090between the states of the high-level stream program and the low-level
9191C program. The proof method for bisimulation requires us to provide
9292a "correspondence" relation between the program states, and then prove
9393three things about this relation:
9494
95- 1 . that the initial states of thee programs are in the relation;
95+ 1 . that the initial states of the programs are in the relation;
96962 . if we assume two arbitrary program states begin in the relation
9797and each takes a single transition (consuming corresponding inputs),
9898the resulting states are back in the relation;
@@ -113,15 +113,15 @@ let `buf` be the global variable name of the ring-buffer in the C
113113program, and ` idx ` be the global variable name maintaining the
114114current index into the ring buffer. Then the correspondence
115115relation is basically that ` 0 <= idx < k ` and
116- ` s[n+i] =buf[(idx+i) mod k] ` as ` i ` ranges from ` 0 .. k-1 ` .
116+ ` s[n+i] = buf[(idx+i) mod k] ` as ` i ` ranges from ` 0 .. k-1 ` .
117117By abuse of notation, here we mean that ` s[j] ` is
118118the value of the stream expression ` s ` evaluated at index ` j ` ,
119119whereas ` buf[j] ` means the value obtained by reading the ` j ` th value
120120of the buffer ` buf ` from memory. The overall correspondence relation
121121is a conjunction of statements like this, one for each stream
122122expression that is realized via a buffer.
123123
124- ### Implementing the Bismulation proof steps
124+ ### Implementing the Bisimulation proof steps
125125
126126The kind of program correspondence property we desire is a largely
127127mechanical affair. As the code under consideration is automatically
@@ -171,12 +171,12 @@ compute the value of each stream at time `n+k`.
171171
172172Next we set up an initial state of the C program by choosing,
173173for each ring buffer, an arbitrary value for its current index
174- within it's allowed range, and then writing the variables
174+ within its allowed range, and then writing the variables
175175corresponding to each stream value into the buffers at
176176their appropriate offsets. The symbolic simulator is then
177177invoked to compute the state update effects of the ` step() `
178178function. Afterward, we read the poststate values from the
179- ring-buffers and verify that the correspond to the stream
179+ ring-buffers and verify that they correspond to the stream
180180values from ` n+1 ` up to ` n+k ` .
181181
182182As part of symbolic simulation, Crucible may also generate
@@ -188,7 +188,7 @@ submitted to an SMT solver.
188188#### Observable effects
189189
190190For our purposes, the only observable effects of a Copilot program
191- relate to any "trigger" functions defined in the spec. Our task it to
191+ relate to any "trigger" functions defined in the spec. Our task is to
192192show that the generated C code calls the external trigger functions if
193193and only if the corresponding guard condition is true, and that the
194194arguments passed to those functions are as expected.
@@ -228,7 +228,7 @@ and produce LLVM intermediate language, which then becomes the input
228228to the later verification steps. To the extent that the input program
229229is not fully-portable C, ` clang ` may make implementation-specific
230230decisions about how to compile the program which might be made
231- different if compiled by a different compiler, (e.g. ` gcc ` ). We expect
231+ different if compiled by a different compiler (e.g. ` gcc ` ). We expect
232232this aspect to be mitigated by the fact that Copilot programs are
233233automatically generated into a rather simple subset of the C language,
234234and is designed to be as simple as possible.
@@ -252,7 +252,7 @@ this risk other than manual examination and comparison against the
252252intended semantics of Copilot, as encoded in the interpreter.
253253
254254There is limited SMT solver support for floating-point values,
255- especially for trancendental functions like the trig primitives. As a
255+ especially for transcendental functions like the trig primitives. As a
256256result, we reason about floating point expressions via uninterpreted
257257functions. In other words, we leave the semantics of the
258258floating-point operations totally abstract, and simply verify that the
0 commit comments