Skip to content

Commit

Permalink
Opsem for attestation instructions and skeleton for WP of EStoreId (#24)
Browse files Browse the repository at this point in the history
* First draft of opsem of attestation instructions

* Continue EInit: modify sweep

* WIP: opsem of EInit

* Some more thoughts on EInit

* Finish opsem (needs cleanup)

* WIP fixing opsem...

* Finish opsem, lemmas missing

* Prove atomicity of opsem

* Fix proofs

* Comment out WP proofs of einstrs

* Update comments

* Opsem simplification

* Fix opsem IsUnique

* Fix opsem TEE

* Fix compilation

* Hash function as machines parameters WIP

* Change fresh_eid

* Fix measure function

* Update TIndex and ENum to be Nat, simplify ETable: TIndex -> EId only

* WIP WP rule for EStoreId

* WIP state interp

* Cleanup

* memG,regG,enclaveG -> ceriseG + fix compilation up-to fundamental + fix wp estoreid

* einit: Uncomment writing seal/unseal pair to b'

* einit: no W perm for code cap, no X perm for data cap

* Cleanup: remove spurious comments

* Rename EId -> EIdentity

* Fix build

* Fix the rule EStoreId

---------

Co-authored-by: June Rousseau <[email protected]>
  • Loading branch information
decrn and JuneRousseau authored Dec 20, 2024
1 parent c90774e commit eea2296
Show file tree
Hide file tree
Showing 106 changed files with 754 additions and 398 deletions.
2 changes: 1 addition & 1 deletion tests/proofmode_focus_block.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Definition i1 `{MP: MachineParameters} := encodeInstrsW [ Mov r_t2 1; Mov r_t2 0
Definition i2 `{MP: MachineParameters} := encodeInstrsW [ Mov r_t3 1; Mov r_t3 0 ].
Definition l2 `{MP: MachineParameters} := i1 ++ i2.

Lemma foo {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} `{MP: MachineParameters} p b e a :
Lemma foo {Σ:gFunctors} {ceriseg:ceriseG Σ} `{MP: MachineParameters} p b e a :
{{{ ⌜ExecPCPerm p ∧ SubBounds b e a (a ^+ length (l1 ++ l2))%a⌝
∗ codefrag a (l1 ++ l2)
∗ PC ↦ᵣ WCap (p,b,e,(a ^+ length l1)%a) }}}
Expand Down
312 changes: 259 additions & 53 deletions theories/cap_lang.v

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion theories/examples/adder.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ From cap_machine Require Import rules logrel macros fundamental.
From cap_machine.proofmode Require Import tactics_helpers.

Section adder.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/arch_sealing.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Import uPred. (* exist_persistent *)

(* Architectural variant of the sealing/unsealing functionality in the dynamic_sealing file. *)
Section sealing.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters} .

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/assert.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ From cap_machine Require Import logrel addr_reg_sample fundamental rules proofmo
(* Maintains a flag storing whether an assert has failed. *)

Section Assert.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/buffer.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From cap_machine Require Import proofmode.
Open Scope Z_scope.

Section buffer.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
`{MP: MachineParameters}.

Definition buffer_code (off: Z) : list LWord :=
Expand Down
2 changes: 1 addition & 1 deletion theories/examples/call.v
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ From cap_machine Require Import logrel macros rules.
From cap_machine.proofmode Require Import tactics_helpers proofmode.

Section call.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/callback.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ From cap_machine Require Import rules logrel macros call.
From cap_machine.proofmode Require Import tactics_helpers.

Section callback.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/counter/counter.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ From cap_machine Require Import rules logrel macros fundamental.
From cap_machine.proofmode Require Import tactics_helpers.

Section counter.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/counter/counter_preamble.v
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.proofmode Require Import tactics_helpers.
From stdpp Require Import countable.

Section counter_example_preamble.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/counter_binary/counter_binary.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ From cap_machine.proofmode Require Import tactics_helpers.


Section counter.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ} {cfg : cfgSG Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/counter_binary/counter_binary_preamble.v
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.examples.counter_binary Require Import counter_binary counter_b
From stdpp Require Import countable.

Section counter_example_preamble.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ} {cfg : cfgSG Σ}
`{MP: MachineParameters}.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.examples.counter_binary Require Import counter_binary.
From stdpp Require Import countable.

Section counter_example_preamble.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ} {cfg : cfgSG Σ}
`{MP: MachineParameters}.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.examples.counter_binary Require Import counter_binary counter_b
From stdpp Require Import countable.

Section counter_example_preamble.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ} {cfg : cfgSG Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/dynamic_sealing.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From cap_machine.proofmode Require Import tactics_helpers solve_pure proofmode c

Section sealing.

Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}
{seals:sealStoreG Σ}
Expand Down
2 changes: 1 addition & 1 deletion theories/examples/enclaves/trusted_compute.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From cap_machine Require Import macros_new.
Open Scope Z_scope.

Section trusted_compute_example.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg : sealStoreG Σ} `{MP: MachineParameters}.
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg : sealStoreG Σ} `{MP: MachineParameters}.

(* Data part, following the directly the main code *)
Definition trusted_compute_data (linking_table_cap : LWord) : list LWord :=
Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval/interval.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Notation "a ↪ₐ w" := (mapsto (L:=Addr) (V:=Word) a DfracDiscarded w) (at lev

Section interval.

Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
{nainv: logrel_na_invs Σ} (* `{intg: intervalG Σ} *)
`{MP: MachineParameters}
{mono : sealLLG Σ}.
Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval/interval_client.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From cap_machine.examples.interval Require Import interval interval_closure.
From cap_machine Require Import contiguous tactics_helpers solve_pure proofmode map_simpl.

Section interval_client.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg: sealStoreG Σ}
{nainv: logrel_na_invs Σ} {sealG: sealLLG Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval/interval_client_adequacy.v
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ Proof.
Qed.

Section int_client_adequacy.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg:sealStoreG Σ}
{nainv: logrel_na_invs Σ} {sealLLG: keylist.sealLLG Σ}
`{memlayout: memory_layout}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval/interval_client_closure.v
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.proofmode Require Import
contiguous tactics_helpers solve_pure proofmode map_simpl.

Section interval_client.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg : sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg : sealStoreG Σ}
{nainv: logrel_na_invs Σ} {sealG: sealLLG Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval/interval_closure.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From cap_machine.examples Require Import dynamic_sealing keylist malloc.
From cap_machine.examples.interval Require Import interval.

Section interval_closure.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ} {sealG: sealLLG Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval_arch/interval_arch.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Notation "a ↪ₐ w" := (mapsto (L:=Addr) (V:=Word) a DfracDiscarded w) (at lev

Section interval.

Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
{nainv: logrel_na_invs Σ} (* `{intg: intervalG Σ} *)
`{MP: MachineParameters}.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Proof.
Qed.

Section int_client_adequacy.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg:sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{memlayout: memory_layout}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval_arch/interval_client_arch.v
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.examples Require Import arch_sealing malloc.
From cap_machine.examples.interval_arch Require Import interval_arch interval_closure_arch.

Section interval_client.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.examples Require Import arch_sealing malloc.
From cap_machine.examples.interval_arch Require Import interval_arch interval_closure_arch interval_client_arch.

Section interval_client.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg : sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg : sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/interval_arch/interval_closure_arch.v
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ From cap_machine.examples Require Import arch_sealing malloc.
From cap_machine.examples.interval_arch Require Import interval_arch.

Section interval_closure.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/isunique_example.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ From cap_machine Require Import proofmode.
Open Scope Z_scope.

Section reclaim_buffer_example.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
`{MP: MachineParameters}.

Definition reclaim_buffer_code : list LWord :=
Expand Down
2 changes: 1 addition & 1 deletion theories/examples/keylist.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Definition prefR (al al' : addrwordLO) := al `prefix_of` al'.
Class sealLLG Σ := CCounterG { ccounter_inG :: inG Σ (authUR (monotoneUR prefR)) }.

Section list.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}
{mono : sealLLG Σ}.
Expand Down
2 changes: 1 addition & 1 deletion theories/examples/lse.v
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ From cap_machine Require Import rules logrel macros fundamental call callback.
From cap_machine.proofmode Require Import tactics_helpers.

Section roe.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/lse_adequacy.v
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Next Obligation.
Qed.

Section roe_adequacy.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{memlayout: memory_layout}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/macros.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ From cap_machine.proofmode Require Import tactics_helpers map_simpl solve_pure.
From cap_machine Require Export iris_extra addr_reg_sample contiguous malloc assert.

Section macros.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/macros_binary.v
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Ltac iEpilogue_s :=
iSimpl in "Hj".

Section macros.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ} {cfg : cfgSG Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/macros_new.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ From cap_machine Require Export iris_extra addr_reg_sample contiguous malloc sal
From cap_machine.proofmode Require Import classes tactics_helpers solve_pure proofmode map_simpl.

Section macros.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {seals:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {seals:sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/malloc.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ From cap_machine Require Import logrel addr_reg_sample fundamental rules proofmo
studies. *)

Section SimpleMalloc.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/malloc_binary.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ From cap_machine Require Import iris_extra logrel_binary fundamental_binary.
From cap_machine.rules Require Import rules_base.

Section SimpleMalloc.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
{nainv: logrel_na_invs Σ} {cfg : cfgSG Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/minimal_counter.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ From cap_machine Require Import proofmode.
Open Scope Z_scope.

Section counter.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg:sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/ocpl_lowval_like.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ From cap_machine.proofmode Require Import tactics_helpers.
*)

Section rules.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealg:sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealg:sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
2 changes: 1 addition & 1 deletion theories/examples/salloc.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ From cap_machine Require Import logrel addr_reg_sample fundamental rules proofmo
studies. *)

Section SimpleSalloc.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ} {sealsg: sealStoreG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ} {sealsg: sealStoreG Σ}
{nainv: logrel_na_invs Σ}
`{MP: MachineParameters}.

Expand Down
6 changes: 3 additions & 3 deletions theories/exercises/cerise_modularity.v
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ From cap_machine.proofmode Require Import
Open Scope Z_scope.

Section increment_macro.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
`{MP: MachineParameters}.

(** The increment macro is a macro that takes a register r (r ≠ r_env), which
Expand Down Expand Up @@ -159,7 +159,7 @@ Section increment_macro.
End increment_macro.

Section rclear_macro.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
`{MP: MachineParameters}.

(** In this section, we will use a pre-defined macro in Cerise, `rclear`.
Expand Down Expand Up @@ -205,7 +205,7 @@ Section rclear_macro.
End rclear_macro.

Section linking_table.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
`{MP: MachineParameters}.

(* Demo with incr_macro for the setup *)
Expand Down
6 changes: 3 additions & 3 deletions theories/exercises/cerise_modularity_solutions.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ From cap_machine.proofmode Require Import proofmode tactics_helpers register_tac
Open Scope Z_scope.

Section increment_macro.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
`{MP: MachineParameters}.

(** The increment macro is a macro that takes a register r (r ≠ r_env), which
Expand Down Expand Up @@ -184,7 +184,7 @@ Section increment_macro.
End increment_macro.

Section rclear_macro.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
`{MP: MachineParameters}.

(** In this section, we will use a pre-defined macro in Cerise, `rclear`.
Expand Down Expand Up @@ -330,7 +330,7 @@ Section rclear_macro.
End rclear_macro.

Section linking_table.
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
`{MP: MachineParameters}.

(* Demo with incr_macro for the setup *)
Expand Down
2 changes: 1 addition & 1 deletion theories/exercises/cerise_tutorial.v
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Section base_program.
are the registers and the memory. Moreover, we need the machine parameters
in the context, which abstract the encoding and the decoding function
(for instance, to encode the instructions). *)
Context {Σ:gFunctors} {memg:memG Σ} {regg:regG Σ}
Context {Σ:gFunctors} {ceriseg:ceriseG Σ}
`{MP: MachineParameters}.

(** The program is a list of instructions. As the machine has a Von Neumann
Expand Down
Loading

0 comments on commit eea2296

Please sign in to comment.