Skip to content

Commit 15fe070

Browse files
committed
Pass MP, MPDMBS tests with address translation (~120secs with pf optimization)
1 parent f9fd1c3 commit 15fe070

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

ArchSemArm/tests/UMPromisingTest.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ Module MP.
288288
Goal elements (regs_extract [(1%fin, R5); (1%fin, R2)] <$> test_results) ≡ₚ
289289
[Ok [0x0%Z;0x2a%Z]; Ok [0x0%Z;0x0%Z]; Ok [0x1%Z; 0x2a%Z]; Ok [0x1%Z; 0x0%Z]].
290290
Proof.
291-
Time vm_compute (elements _).
291+
vm_compute (elements _).
292292
apply NoDup_Permutation; try solve_NoDup; set_solver.
293293
Qed.
294294

@@ -298,7 +298,7 @@ Module MP.
298298
Goal elements (regs_extract [(1%fin, R5); (1%fin, R2)] <$> test_results_pf) ≡ₚ
299299
[Ok [0x0%Z;0x2a%Z]; Ok [0x0%Z;0x0%Z]; Ok [0x1%Z; 0x2a%Z]; Ok [0x1%Z; 0x0%Z]].
300300
Proof.
301-
Time vm_compute (elements _).
301+
vm_compute (elements _).
302302
apply NoDup_Permutation; try solve_NoDup; set_solver.
303303
Qed.
304304
End MP.

ArchSemArm/tests/VMPromisingTest.v

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ Module LDRPT.
422422
Qed.
423423
End LDRPT.
424424

425-
(* Module MP.
425+
Module MP.
426426
(* A classic MP litmus test with address translation
427427
Thread 1: STR X2, [X1, X0]; STR X5, [X4, X3]
428428
Thread 2: LDR X5, [X4, X3]; LDR X2, [X1, X0]
@@ -518,9 +518,9 @@ End LDRPT.
518518
vm_compute (elements _).
519519
apply NoDup_Permutation; try solve_NoDup; set_solver.
520520
Qed.
521-
End MP. *)
521+
End MP.
522522

523-
(* Module MPDMBS.
523+
Module MPDMBS.
524524
(* A classic MP litmus test with address translation
525525
Thread 1: STR X2, [X1, X0]; DMB SY; STR X5, [X4, X3]
526526
Thread 2: LDR X5, [X4, X3]; DMB SY; LDR X2, [X1, X0]
@@ -595,22 +595,31 @@ End MP. *)
595595
(λ tid rm, reg_lookup _PC rm =? terminate_at !!! tid).
596596

597597
Definition initState :=
598-
{| MState.state :=
599-
{| MState.memory := init_mem;
600-
MState.regs := [# init_reg_t1; init_reg_t2];
601-
MState.address_space := PAS_NonSecure |};
602-
MState.termCond := termCond |}.
598+
{|archState.memory := init_mem;
599+
archState.regs := [# init_reg_t1; init_reg_t2];
600+
archState.address_space := PAS_NonSecure |}.
603601

604602
Definition fuel := 8%nat.
605603

606-
Definition test_results :=
607-
VMPromising_cert_c arm_sem fuel n_threads initState.
604+
(* Definition test_results :=
605+
VMPromising_cert_c arm_sem fuel n_threads termCond initState.
608606
609607
(** The test is fenced enough, the 0x1; 0x0 outcome is impossible*)
610608
Goal elements (regs_extract [(1%fin, R5); (1%fin, R2)] <$> test_results) ≡ₚ
611609
[Ok [0x0%Z;0x2a%Z]; Ok [0x0%Z;0x0%Z]; Ok [0x1%Z; 0x2a%Z]].
612610
Proof.
613611
vm_compute (elements _).
614612
apply NoDup_Permutation; try solve_NoDup; set_solver.
613+
Qed. *)
614+
615+
Definition test_results_pf :=
616+
VMPromising_cert_c_pf arm_sem fuel n_threads termCond initState.
617+
618+
(** The test is fenced enough, the 0x1; 0x0 outcome is impossible*)
619+
Goal elements (regs_extract [(1%fin, R5); (1%fin, R2)] <$> test_results_pf) ≡ₚ
620+
[Ok [0x0%Z;0x2a%Z]; Ok [0x0%Z;0x0%Z]; Ok [0x1%Z; 0x2a%Z]].
621+
Proof.
622+
vm_compute (elements _).
623+
apply NoDup_Permutation; try solve_NoDup; set_solver.
615624
Qed.
616-
End MPDMBS. *)
625+
End MPDMBS.

0 commit comments

Comments
 (0)