Commit c6e6e73d authored by Paul's avatar Paul
Browse files

clean admits in pgtable_lemmas.v

parent a22bdb00
Pipeline #60284 passed with stage
in 15 minutes and 32 seconds
...@@ -43,12 +43,14 @@ Global Instance Pte_S1_attr_lo_sig_wf : SigWf Pte_S1_attr_lo_sig. ...@@ -43,12 +43,14 @@ Global Instance Pte_S1_attr_lo_sig_wf : SigWf Pte_S1_attr_lo_sig.
Proof. solve_sig_wf. Qed. Proof. solve_sig_wf. Qed.
Global Instance Pte_S1_attr_lo_tm_value r : Global Instance Pte_S1_attr_lo_tm_value r :
SimplAnd (IsValue (Pte_S1_attr_lo_tm r)) (λ T, T). IsValue (Pte_S1_attr_lo_tm r).
Admitted. Proof. repeat constructor. Qed.
Global Instance Pte_S1_attr_lo_tm_sort r `{!CanSolve (Pte_S1_attr_lo_wf r)} : Global Instance Pte_S1_attr_lo_tm_sort r `{!CanSolve (Pte_S1_attr_lo_wf r)} :
SimplAnd (HasSort (Pte_S1_attr_lo_tm r) Pte_S1_attr_lo_sig) (λ T, T). HasSort (Pte_S1_attr_lo_tm r) Pte_S1_attr_lo_sig.
Admitted. Proof.
unfold HasSort; solve_goal.
Qed.
Record Pte_S1_attr_hi := { Record Pte_S1_attr_hi := {
attr_hi_s1_xn : bool; attr_hi_s1_xn : bool;
...@@ -75,12 +77,14 @@ Global Instance Pte_S1_attr_hi_sig_wf : SigWf Pte_S1_attr_hi_sig. ...@@ -75,12 +77,14 @@ Global Instance Pte_S1_attr_hi_sig_wf : SigWf Pte_S1_attr_hi_sig.
Proof. solve_sig_wf. Qed. Proof. solve_sig_wf. Qed.
Global Instance Pte_S1_attr_hi_tm_value r : Global Instance Pte_S1_attr_hi_tm_value r :
SimplAnd (IsValue (Pte_S1_attr_hi_tm r)) (λ T, T). IsValue (Pte_S1_attr_hi_tm r).
Admitted. Proof. repeat constructor. Qed.
Global Instance Pte_S1_attr_hi_tm_sort r `{!CanSolve (Pte_S1_attr_hi_wf r)} : Global Instance Pte_S1_attr_hi_tm_sort r `{!CanSolve (Pte_S1_attr_hi_wf r)} :
SimplAnd (HasSort (Pte_S1_attr_hi_tm r) Pte_S1_attr_hi_sig) (λ T, T). HasSort (Pte_S1_attr_hi_tm r) Pte_S1_attr_hi_sig.
Admitted. Proof.
unfold HasSort; solve_goal.
Qed.
(* S2 specific *) (* S2 specific *)
...@@ -129,12 +133,14 @@ Global Instance Pte_S2_attr_lo_sig_wf : SigWf Pte_S2_attr_lo_sig. ...@@ -129,12 +133,14 @@ Global Instance Pte_S2_attr_lo_sig_wf : SigWf Pte_S2_attr_lo_sig.
Proof. solve_sig_wf. Qed. Proof. solve_sig_wf. Qed.
Global Instance Pte_S2_attr_lo_tm_value r : Global Instance Pte_S2_attr_lo_tm_value r :
SimplAnd (IsValue (Pte_S2_attr_lo_tm r)) (λ T, T). IsValue (Pte_S2_attr_lo_tm r).
Admitted. Proof. repeat constructor. Qed.
Global Instance Pte_S2_attr_lo_tm_sort r `{!CanSolve (Pte_S2_attr_lo_wf r)} : Global Instance Pte_S2_attr_lo_tm_sort r `{!CanSolve (Pte_S2_attr_lo_wf r)} :
SimplAnd (HasSort (Pte_S2_attr_lo_tm r) Pte_S2_attr_lo_sig) (λ T, T). HasSort (Pte_S2_attr_lo_tm r) Pte_S2_attr_lo_sig.
Admitted. Proof.
unfold HasSort; solve_goal.
Qed.
Record Pte_S2_attr_hi := { Record Pte_S2_attr_hi := {
attr_hi_s2_xn : bool; attr_hi_s2_xn : bool;
...@@ -161,12 +167,14 @@ Global Instance Pte_S2_attr_hi_sig_wf : SigWf Pte_S2_attr_hi_sig. ...@@ -161,12 +167,14 @@ Global Instance Pte_S2_attr_hi_sig_wf : SigWf Pte_S2_attr_hi_sig.
Proof. solve_sig_wf. Qed. Proof. solve_sig_wf. Qed.
Global Instance Pte_S2_attr_hi_tm_value r : Global Instance Pte_S2_attr_hi_tm_value r :
SimplAnd (IsValue (Pte_S2_attr_hi_tm r)) (λ T, T). IsValue (Pte_S2_attr_hi_tm r).
Admitted. Proof. repeat constructor. Qed.
Global Instance Pte_S2_attr_hi_tm_sort r `{!CanSolve (Pte_S2_attr_hi_wf r)} : Global Instance Pte_S2_attr_hi_tm_sort r `{!CanSolve (Pte_S2_attr_hi_wf r)} :
SimplAnd (HasSort (Pte_S2_attr_hi_tm r) Pte_S2_attr_hi_sig) (λ T, T). HasSort (Pte_S2_attr_hi_tm r) Pte_S2_attr_hi_sig.
Admitted. Proof.
unfold HasSort; solve_goal.
Qed.
(* Pte *) (* Pte *)
...@@ -256,34 +264,46 @@ Global Program Instance Pte_bd : BitfieldDesc Pte := {| ...@@ -256,34 +264,46 @@ Global Program Instance Pte_bd : BitfieldDesc Pte := {|
|}. |}.
Global Instance Pte_attr_lo_tm_value r : Global Instance Pte_attr_lo_tm_value r :
SimplAnd (IsValue (sum_elim r Pte_S1_attr_lo_tm Pte_S2_attr_lo_tm)) IsValue (sum_elim r Pte_S1_attr_lo_tm Pte_S2_attr_lo_tm).
(λ T, T). Proof.
Admitted. destruct r; typeclasses eauto.
Qed.
Global Instance Pte_attr_lo_tm_sort r s `{!CanSolve (sum_elim r Pte_S1_attr_lo_wf
Pte_S2_attr_lo_wf)} : Global Instance Pte_attr_lo_tm_sort r s
SimplAnd (HasSort `{!CanSolve (sum_elim r Pte_S1_attr_lo_wf Pte_S2_attr_lo_wf)}
(sum_elim r Pte_S1_attr_lo_tm Pte_S2_attr_lo_tm) `{!CanSolve (match s with
match s with | S1 => ( a, r = inl a)
| S2 => ( a, r = inr a)
end)}:
HasSort (sum_elim r Pte_S1_attr_lo_tm Pte_S2_attr_lo_tm)
(match s with
| S1 => Pte_S1_attr_lo_sig | S1 => Pte_S1_attr_lo_sig
| S2 => Pte_S2_attr_lo_sig | S2 => Pte_S2_attr_lo_sig
end) (λ T, T). end).
Admitted. Proof.
unfold CanSolve in *; case_match; destruct CanSolve1; subst; typeclasses eauto.
Qed.
Global Instance Pte_attr_hi_tm_value r : Global Instance Pte_attr_hi_tm_value r :
SimplAnd (IsValue (sum_elim r Pte_S1_attr_hi_tm Pte_S2_attr_hi_tm)) IsValue (sum_elim r Pte_S1_attr_hi_tm Pte_S2_attr_hi_tm).
(λ T, T). Proof.
Admitted. destruct r; typeclasses eauto.
Qed.
Global Instance Pte_attr_hi_tm_sort r s `{!CanSolve (sum_elim r Pte_S1_attr_hi_wf
Pte_S2_attr_hi_wf)} : Global Instance Pte_attr_hi_tm_sort r s
SimplAnd (HasSort `{!CanSolve (sum_elim r Pte_S1_attr_hi_wf Pte_S2_attr_hi_wf)}
(sum_elim r Pte_S1_attr_hi_tm Pte_S2_attr_hi_tm) `{!CanSolve (match s with
match s with | S1 => ( a, r = inl a)
| S2 => ( a, r = inr a)
end)} :
HasSort (sum_elim r Pte_S1_attr_hi_tm Pte_S2_attr_hi_tm)
(match s with
| S1 => Pte_S1_attr_hi_sig | S1 => Pte_S1_attr_hi_sig
| S2 => Pte_S2_attr_hi_sig | S2 => Pte_S2_attr_hi_sig
end) (λ T, T). end).
Admitted. Proof.
unfold CanSolve in *; case_match; destruct CanSolve1; subst; typeclasses eauto.
Qed.
Global Instance simple_protected_Pte_constraints p `{!IsProtected p} x r `{!CanSolve (Pte_constraints x r)} : Global Instance simple_protected_Pte_constraints p `{!IsProtected p} x r `{!CanSolve (Pte_constraints x r)} :
SimplAndUnsafe true (Pte_constraints p r) (λ T, p = x T). SimplAndUnsafe true (Pte_constraints p r) (λ T, p = x T).
......
...@@ -166,6 +166,14 @@ Proof. ...@@ -166,6 +166,14 @@ Proof.
split; naive_solver. split; naive_solver.
Qed. Qed.
Global Instance simpl_and_is_value t `{!IsValue t} :
SimplAnd (IsValue t) (λ T, T).
Proof. split; naive_solver. Qed.
Global Instance simpl_and_has_sort t `{!HasSort t σ} :
SimplAnd (HasSort t σ) (λ T, T).
Proof. split; naive_solver. Qed.
(* sem eq *) (* sem eq *)
Global Instance simpl_sem_eq_sum_elim_refl N {A B} (x p : A + B) `{!IsProtected p} tA tB : Global Instance simpl_sem_eq_sum_elim_refl N {A B} (x p : A + B) `{!IsProtected p} tA tB :
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment