File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ module Gen = struct
77 let int = small_int
88end
99
10+ module Frequencies_dom1 = struct
11+ let get = 2
12+ end
13+
1014let arb_cmd_dom0 _ =
1115 let open QCheck in
1216 make ~print: show_cmd
@@ -24,5 +28,3 @@ let arb_cmd_dom0 _ =
2428 (1 , pure Incr );
2529 (1 , pure Decr );
2630 ])
27-
28- let arb_cmd_dom1 = arb_cmd_dom0
Original file line number Diff line number Diff line change @@ -116,7 +116,22 @@ module Spec =
116116 (1 , ((pure (fun n -> Fetch_and_add n)) < *> int ));
117117 (1 , (pure Incr ));
118118 (1 , (pure Decr ))])
119- let arb_cmd_dom1 = arb_cmd_dom0
119+ let arb_cmd_dom1 _ =
120+ let open QCheck in
121+ make ~print: show_cmd
122+ (let open Gen in
123+ frequency
124+ [(1 , ((pure (fun v -> Make v)) < *> small_signed_int));
125+ (2 , (pure Get ));
126+ (1 , ((pure (fun v_1 -> Set v_1)) < *> int ));
127+ (1 , ((pure (fun v_2 -> Exchange v_2)) < *> int ));
128+ (1 ,
129+ (((pure (fun seen v_3 -> Compare_and_set (seen, v_3))) < *>
130+ int )
131+ < *> int ));
132+ (1 , ((pure (fun n -> Fetch_and_add n)) < *> int ));
133+ (1 , (pure Incr ));
134+ (1 , (pure Decr ))])
120135 let next_state cmd__002_ state__003_ =
121136 match cmd__002_ with
122137 | Make v ->
You can’t perform that action at this time.
0 commit comments