-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTwophase4_pbt_failing.lean
More file actions
31 lines (26 loc) · 943 Bytes
/
Copy pathTwophase4_pbt_failing.lean
File metadata and controls
31 lines (26 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/-
The tests that are supposed to be failing: We use PBT to find counterexamples.
Copyright (c) 2025 Igor Konnov
Released under MIT license as described in the file LICENSE.
Authors: Igor Konnov, 2025
-/
import Twophase4_pbt
open Plausible
-- noAbortEx
example schedule:
let inv := fun (s: ProtocolState RM) =>
s.tmState ≠ TMState.Aborted
checkInvariant schedule inv
:= by plausible (config := { numInst := 3000, maxSize := 100 })
-- noCommitEx
example schedule:
let inv := fun (s: ProtocolState RM) =>
s.tmState ≠ TMState.Committed
checkInvariant schedule inv
:= by plausible (config := { numInst := 3000, maxSize := 100 })
-- noAbortOnAllPreparedEx
example schedule:
let inv := fun (s: ProtocolState RM) =>
s.tmState = TMState.Aborted → s.tmPrepared ≠ { RM.RM1, RM.RM2, RM.RM3, RM.RM4 }
checkInvariant schedule inv
:= by plausible (config := { numInst := 3000, maxSize := 100 })