Skip to content

Commit 1b4f33b

Browse files
authored
Merge pull request #215 from jmid/rename-base-modules
Rename base modules
2 parents b9e806b + 14aca56 commit 1b4f33b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+100
-100
lines changed

doc/example/lin_tests_dsl.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct
77
let init () = Hashtbl.create ~random:false 42
88
let cleanup _ = ()
99

10-
open Lin_base
10+
open Lin
1111
let a,b = char_printable,nat_small
1212
let api =
1313
[ val_ "Hashtbl.add" Hashtbl.add (t @-> a @-> b @-> returning unit);

doc/example/stm_tests.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
open QCheck
2-
open STM_base
2+
open STM
33

44
(** parallel STM tests of Hashtbl *)
55

doc/paper-examples/lin_tests_dsl.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ struct
88
let init () = Hashtbl.create ~random:false 42
99
let cleanup _ = ()
1010

11-
open Lin_base
11+
open Lin
1212
let a,b = char_printable,nat_small
1313
let api =
1414
[ val_ "Hashtbl.clear" Hashtbl.clear (t @-> returning unit);

doc/paper-examples/stm_tests.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
open QCheck
2-
open STM_base
2+
open STM
33

44
(** parallel STM tests of Hashtbl *)
55

lib/STM_base.ml renamed to lib/STM.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type res =
6363
let show_res (Res ((_,show), v)) = show v
6464

6565
(** The specification of a state machine. *)
66-
module type STM_spec =
66+
module type Spec =
6767
sig
6868
type cmd
6969
(** The type of commands *)
@@ -109,9 +109,9 @@ sig
109109
end
110110

111111

112-
module STM_internal =
112+
module Internal =
113113
struct
114-
module Make(Spec : STM_spec) = struct
114+
module Make(Spec : Spec) = struct
115115

116116
let rec gen_cmds arb s fuel =
117117
Gen.(if fuel = 0

lib/STM_base.mli renamed to lib/STM.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ val show_res : res -> string
7676

7777

7878
(** The specification of a state machine. *)
79-
module type STM_spec =
79+
module type Spec =
8080
sig
8181
type cmd
8282
(** The type of commands *)
@@ -127,13 +127,13 @@ sig
127127
end
128128

129129

130-
module STM_internal : sig
130+
module Internal : sig
131131
open QCheck
132132
(** Internal helper module to build STM tests. *)
133133

134134

135135
(** Derives a test framework from a state machine specification. *)
136-
module Make (Spec : STM_spec) :
136+
module Make (Spec : Spec) :
137137
sig
138138
(** {3 The resulting test framework derived from a state machine specification} *)
139139

lib/STM_domain.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
open STM_base
1+
open STM
22

3-
module Make (Spec: STM_spec) = struct
3+
module Make (Spec: Spec) = struct
44

55
open Util
66
open QCheck
7-
open STM_internal.Make(Spec)
7+
open Internal.Make(Spec)
88

99
let check_obs = check_obs
1010
let arb_cmds_par = arb_cmds_par

lib/STM_domain.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(** Module for building parallel STM tests over [Domain]s *)
22

3-
module Make : functor (Spec : STM_base.STM_spec) ->
3+
module Make : functor (Spec : STM.Spec) ->
44
sig
5-
val check_obs : (Spec.cmd * STM_base.res) list -> (Spec.cmd * STM_base.res) list -> (Spec.cmd * STM_base.res) list -> Spec.state -> bool
5+
val check_obs : (Spec.cmd * STM.res) list -> (Spec.cmd * STM.res) list -> (Spec.cmd * STM.res) list -> Spec.state -> bool
66
(** [check_obs pref cs1 cs2 s] tests whether the observations from the sequential prefix [pref]
77
and the parallel traces [cs1] [cs2] agree with the model started in state [s]. *)
88

@@ -15,7 +15,7 @@ module Make : functor (Spec : STM_base.STM_spec) ->
1515
val shrink_triple : (Spec.state -> Spec.cmd QCheck.arbitrary) -> (Spec.state -> Spec.cmd QCheck.arbitrary) -> (Spec.state -> Spec.cmd QCheck.arbitrary) -> (Spec.cmd list * Spec.cmd list * Spec.cmd list) QCheck.Shrink.t
1616
(** [shrink_triple arb0 arb1 arb2] is a [Shrinker.t] for programs (triple of list of [cmd]s) that is specialized for each part of the program. *)
1717

18-
val interp_sut_res : Spec.sut -> Spec.cmd list -> (Spec.cmd * STM_base.res) list
18+
val interp_sut_res : Spec.sut -> Spec.cmd list -> (Spec.cmd * STM.res) list
1919
(** [interp_sut_res sut cs] interprets the commands [cs] over the system [sut]
2020
and returns the list of corresponding [cmd] and result pairs. *)
2121

lib/STM_sequential.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
open STM_base
1+
open STM
22

3-
module Make (Spec: STM_spec) = struct
3+
module Make (Spec: Spec) = struct
44

55
open QCheck
6-
open STM_internal.Make(Spec)
6+
open Internal.Make(Spec)
77

88
(* re-export some functions *)
99
let cmds_ok = cmds_ok

lib/STM_sequential.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(** Module for building sequential STM tests *)
22

3-
module Make : functor (Spec : STM_base.STM_spec) ->
3+
module Make : functor (Spec : STM.Spec) ->
44
sig
55
val cmds_ok : Spec.state -> Spec.cmd list -> bool
66
(** A precondition checker (stops early, thanks to short-circuit Boolean evaluation).

0 commit comments

Comments
 (0)