Skip to content

Commit

Permalink
adding magic comment switches to CHERI
Browse files Browse the repository at this point in the history
  • Loading branch information
kmemarian committed Jul 28, 2023
1 parent 91355bf commit 82af1c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions coq/CheriMemory/CoqSwitches.v
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ Inductive cerb_switch : Set :=
| SW_strict_pointer_relationals : cerb_switch
| SW_PNVI : SW_PNVI_values -> cerb_switch
| SW_CHERI : cerb_switch
| SW_inner_arg_temps
| SW_permissive_printf
| SW_zero_initialised
| SW_revocation: SW_revocation_values -> cerb_switch.
| SW_inner_arg_temps : cerb_switch
| SW_permissive_printf : cerb_switch
| SW_zero_initialised : cerb_switch
| SW_revocation: SW_revocation_values -> cerb_switch
| SW_at_magic_comments : cerb_switch
| SW_warn_mismatched_magic_comments : cerb_switch.

Lemma SW_pointer_arith_values_dec: forall x y:SW_pointer_arith_values, {x = y} + {x <> y}.
Proof. decide equality. Qed.
Expand Down
2 changes: 2 additions & 0 deletions memory/cheri-coq/impl_mem.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ module CerbSwitchesProxy = struct
| SW_zero_initialised -> SW_zero_initialised
| SW_revocation `INSTANT -> SW_revocation INSTANT
| SW_revocation `CORNUCOPIA -> SW_revocation CORNUCOPIA
| SW_at_magic_comments -> SW_at_magic_comments
| SW_warn_mismatched_magic_comments -> SW_warn_mismatched_magic_comments

let toCoq_switches (cs: cerb_switch list): CoqSwitches.cerb_switches_t =
let open ListSet in
Expand Down

0 comments on commit 82af1c1

Please sign in to comment.