mirror of
https://github.com/achlipala/frap.git
synced 2024-11-10 00:07:51 +00:00
Revising for tomorrow's lecture
This commit is contained in:
parent
52e47df705
commit
eb53c0d714
1 changed files with 8 additions and 8 deletions
|
@ -110,7 +110,7 @@ Inductive cstep : valuation * cmd -> option nat -> valuation * cmd -> Prop :=
|
||||||
|
|
||||||
(* To characterize correct compilation, it is helpful to define a relation to
|
(* To characterize correct compilation, it is helpful to define a relation to
|
||||||
* capture which output _traces_ a command might generate. Note that, for us, a
|
* capture which output _traces_ a command might generate. Note that, for us, a
|
||||||
* trace is a list of output values and/or terminating markers. We drop silent
|
* trace is a list of output values and/or termination markers. We drop silent
|
||||||
* labels as we run, and we use [Some n] for outputting of [n] and [None] for
|
* labels as we run, and we use [Some n] for outputting of [n] and [None] for
|
||||||
* termination. *)
|
* termination. *)
|
||||||
Inductive generate : valuation * cmd -> list (option nat) -> Prop :=
|
Inductive generate : valuation * cmd -> list (option nat) -> Prop :=
|
||||||
|
@ -463,7 +463,7 @@ Section simulation.
|
||||||
unfold traceInclusion; eauto using simulation_bwd'.
|
unfold traceInclusion; eauto using simulation_bwd'.
|
||||||
Qed.
|
Qed.
|
||||||
|
|
||||||
(* Put them together and we have trace equivalence. *)
|
(* Put them together, and we have trace equivalence. *)
|
||||||
|
|
||||||
Theorem simulation : forall vc1 vc2, R vc1 vc2
|
Theorem simulation : forall vc1 vc2, R vc1 vc2
|
||||||
-> vc1 =| vc2.
|
-> vc1 =| vc2.
|
||||||
|
@ -1053,11 +1053,11 @@ Fixpoint flatten (c : cmd) : cmd :=
|
||||||
(* Here's what it does on our example. *)
|
(* Here's what it does on our example. *)
|
||||||
Compute flatten month_boundaries_in_days.
|
Compute flatten month_boundaries_in_days.
|
||||||
|
|
||||||
(* The alert reader may noticed that, yet again, we picked a transformation that
|
(* The alert reader may have noticed that, yet again, we picked a transformation
|
||||||
* our existing simulation relations can't handle directly, at least if we put
|
* that our existing simulation relations can't handle directly, at least if we
|
||||||
* the original system on the left and the compiled version on the right. Now
|
* put the original system on the left and the compiled version on the right.
|
||||||
* we need a single step on the left to be matched by _one or more_ steps on the
|
* Now we need a single step on the left to be matched by _one or more_ steps on
|
||||||
* right. *)
|
* the right. *)
|
||||||
Section simulation_multiple.
|
Section simulation_multiple.
|
||||||
(* At least we can remove that pesky numeric parameter of [R]. *)
|
(* At least we can remove that pesky numeric parameter of [R]. *)
|
||||||
Variable R : valuation * cmd -> valuation * cmd -> Prop.
|
Variable R : valuation * cmd -> valuation * cmd -> Prop.
|
||||||
|
|
Loading…
Reference in a new issue