Skip to content

Commit 0b6a046

Browse files
committed
rm STM_spec.AddGC functor
1 parent 0380d02 commit 0b6a046

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

lib/STM_spec.ml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -105,51 +105,3 @@ sig
105105
model's result.
106106
Note: [s] is in this case the model's state prior to command execution. *)
107107
end
108-
109-
module AddGC(Spec : Spec) : Spec = struct
110-
type cmd =
111-
| GC_minor
112-
| UserCmd of Spec.cmd
113-
114-
type state = Spec.state
115-
type sut = Spec.sut
116-
117-
let init_state = Spec.init_state
118-
let init_sut () = Spec.init_sut ()
119-
let cleanup sut = Spec.cleanup sut
120-
121-
let show_cmd c = match c with
122-
| GC_minor -> "<GC.minor>"
123-
| UserCmd c -> Spec.show_cmd c
124-
125-
let gen_cmd s =
126-
(Gen.frequency
127-
[(1,Gen.return GC_minor);
128-
(5,Gen.map (fun c -> UserCmd c) (Spec.arb_cmd s).gen)])
129-
130-
let shrink_cmd s c = match c with
131-
| GC_minor -> Iter.empty
132-
| UserCmd c ->
133-
match (Spec.arb_cmd s).shrink with
134-
| None -> Iter.empty (* no shrinker provided *)
135-
| Some shk -> Iter.map (fun c' -> UserCmd c') (shk c)
136-
137-
let arb_cmd s = make ~print:show_cmd ~shrink:(shrink_cmd s) (gen_cmd s)
138-
139-
let next_state c s = match c with
140-
| GC_minor -> s
141-
| UserCmd c -> Spec.next_state c s
142-
143-
let precond c s = match c with
144-
| GC_minor -> true
145-
| UserCmd c -> Spec.precond c s
146-
147-
let run c s = match c with
148-
| GC_minor -> (Gc.minor (); Res (unit, ()))
149-
| UserCmd c -> Spec.run c s
150-
151-
let postcond c s r = match c,r with
152-
| GC_minor, Res ((Unit,_),_) -> true
153-
| UserCmd c, r -> Spec.postcond c s r
154-
| _,_ -> false
155-
end

lib/STM_spec.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,3 @@ sig
120120
model's result. A [postcond] function should be a pure.
121121
Note: [s] is in this case the model's state prior to command execution. *)
122122
end
123-
124-
module AddGC : functor (Spec : Spec) -> Spec

0 commit comments

Comments
 (0)