Skip to content

Commit ecd046d

Browse files
committed
fix(sim): centralize seed definition
1 parent 03554c7 commit ecd046d

16 files changed

+344
-326
lines changed

core/api/api_environment.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class type project = object
2424
Api_types_j.simulation_parameter -> Kappa_facade.t -> unit
2525

2626
method get_simulation : unit -> simulation option
27-
method get_state : unit -> parse_state option Lwt.t
28-
method set_state : parse_state Lwt.t -> unit
27+
method get_parse_state : unit -> parse_state option Lwt.t
28+
method set_parse_state : parse_state Lwt.t -> unit
2929
end
3030

3131
class type environment = object

core/api/api_environment.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class type project = object
2424
Api_types_j.simulation_parameter -> Kappa_facade.t -> unit
2525

2626
method get_simulation : unit -> simulation option
27-
method get_state : unit -> parse_state option Lwt.t
28-
method set_state : parse_state Lwt.t -> unit
27+
method get_parse_state : unit -> parse_state option Lwt.t
28+
method set_parse_state : parse_state Lwt.t -> unit
2929
end
3030

3131
class type environment = object

core/api/api_types.atd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
(* TODO: change in this file nullable to option? https://atd.readthedocs.io/en/latest/atd-language.html#language-overview *)
12
type ('ok,'error) result <ocaml from module="Result_util" t="t"> = abstract
23

34
type message <ocaml from module="Result_util"> = abstract

core/api/environment_memory.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ class project : Api_environment.project =
4444
(new simulation runtime_state simulation_parameter
4545
:> Api_environment.simulation)
4646

47-
method set_state (state : Api_environment.parse_state Lwt.t) =
47+
method set_parse_state (state : Api_environment.parse_state Lwt.t) =
4848
let () = Lwt.cancel _state in
4949
_state <- (state >>= fun x -> Lwt.return (Some x))
5050

51-
method get_state () : Api_environment.parse_state option Lwt.t = _state
51+
method get_parse_state () : Api_environment.parse_state option Lwt.t =
52+
_state
5253
end

0 commit comments

Comments
 (0)