@@ -1020,18 +1020,14 @@ mod program_three {
10201020 ) ) ;
10211021 }
10221022
1023- { // Proof 2: If thread 0 does a store to address pte1_vaddr, it must result in a pagefault
1024- assume( exists|s6, step, rlbl| // Assuming we do a store ...
1025- next_step( c, s5, s6, step, rlbl) &&
1026- ( rlbl matches RLbl :: MemOp { thread_id, vaddr, op: MemOp :: Store { new_value, result } }
1027- && thread_id == 0 && vaddr == pte1_vaddr) ) ;
1028- let ( s6, step, rlbl) = choose|s6: State , step: Step , rlbl: RLbl |
1029- next_step( c, s5, s6, step, rlbl) &&
1030- ( rlbl matches RLbl :: MemOp { thread_id, vaddr, op: MemOp :: Store { new_value, result } }
1031- && thread_id == 0 && vaddr == pte1_vaddr) ;
1032- assert( rlbl is MemOp ) ;
1033- assert( rlbl->op->Store_result is Pagefault ) ; // ... then it must cause a page fault
1034- }
1023+ // Proof 2: If thread 0 does a store to address pte1_vaddr, it must result in a pagefault
1024+ assert( forall|s6, step, rlbl|
1025+ // If we do a store ...
1026+ next_step( c, s5, s6, step, rlbl) &&
1027+ ( rlbl matches RLbl :: MemOp { thread_id, vaddr, op: MemOp :: Store { new_value, result } }
1028+ && thread_id == 0 && vaddr == pte1_vaddr)
1029+ // ... then it must cause a page fault
1030+ ==> rlbl->op->Store_result is Pagefault ) ;
10351031 }
10361032}
10371033
@@ -1108,18 +1104,14 @@ mod program_four {
11081104 ) ) ;
11091105 }
11101106
1111- { // Proof 2: Any write to pte1_vaddr is successful
1112- assume( exists|s6, step, rlbl| // Assuming we do a store ...
1113- next_step( c, s5, s6, step, rlbl) &&
1114- ( rlbl matches RLbl :: MemOp { thread_id, vaddr, op: MemOp :: Store { new_value, result } }
1115- && thread_id == 0 && vaddr == pte1_vaddr) ) ;
1116- let ( s6, step, rlbl) = choose|s6: State , step: Step , rlbl: RLbl |
1117- next_step( c, s5, s6, step, rlbl) &&
1118- ( rlbl matches RLbl :: MemOp { thread_id, vaddr, op: MemOp :: Store { new_value, result } }
1119- && thread_id == 0 && vaddr == pte1_vaddr) ;
1120- assert( rlbl is MemOp ) ;
1121- assert( rlbl->op->Store_result is Ok ) ; // ... then its result must be Ok
1122- }
1107+ // Proof 2: Any write to pte1_vaddr is successful.
1108+ assert( forall|s6, step, rlbl|
1109+ // If we do a store ...
1110+ next_step( c, s5, s6, step, rlbl) &&
1111+ ( rlbl matches RLbl :: MemOp { thread_id, vaddr, op: MemOp :: Store { new_value, result } }
1112+ && thread_id == 0 && vaddr == pte1_vaddr)
1113+ // ... then it must be successful
1114+ ==> rlbl->op->Store_result is Ok ) ;
11231115 }
11241116}
11251117
0 commit comments