Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
profile = default
version = 0.27.0
version = 0.29.0

field-space = tight-decl
break-cases = toplevel
Expand Down
22 changes: 11 additions & 11 deletions analysis/reactive/src/reactive.ml
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ module Scheduler = struct
let nodes_with_levels =
dirty
|> List.filter_map (fun name ->
match Hashtbl.find_opt Registry.nodes name with
| Some info -> Some (info.Registry.level, name, info)
| None -> None)
match Hashtbl.find_opt Registry.nodes name with
| Some info -> Some (info.Registry.level, name, info)
| None -> None)
in

let sorted =
Expand Down Expand Up @@ -875,10 +875,10 @@ let join ~name (left : ('k1, 'v1) t) (right : ('k2, 'v2) t) ~key_of ~f ?merge ()
let output_entries =
!all_affected
|> List.filter_map (fun k3 ->
if Hashtbl.mem seen k3 then None
else (
Hashtbl.replace seen k3 ();
recompute_target k3))
if Hashtbl.mem seen k3 then None
else (
Hashtbl.replace seen k3 ();
recompute_target k3))
in

if output_entries <> [] then (
Expand Down Expand Up @@ -1010,10 +1010,10 @@ let union ~name (left : ('k, 'v) t) (right : ('k, 'v) t) ?merge () : ('k, 'v) t
let output_entries =
!all_affected
|> List.filter_map (fun k ->
if Hashtbl.mem seen k then None
else (
Hashtbl.replace seen k ();
recompute_target k))
if Hashtbl.mem seen k then None
else (
Hashtbl.replace seen k ();
recompute_target k))
in

if output_entries <> [] then (
Expand Down
8 changes: 4 additions & 4 deletions analysis/reactive/src/reactive_file_collection.ml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ let remove_batch t paths =
let entries =
paths
|> List.filter_map (fun path ->
if Hashtbl.mem t.internal.cache path then (
Hashtbl.remove t.internal.cache path;
Some (path, None))
else None)
if Hashtbl.mem t.internal.cache path then (
Hashtbl.remove t.internal.cache path;
Some (path, None))
else None)
in
if entries <> [] then emit t (Reactive.Batch entries);
List.length entries
Expand Down
6 changes: 3 additions & 3 deletions analysis/reactive/test/batch_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ let test_batch_fixpoint () =
incr batch_count;
entries
|> List.iter (fun (_, v_opt) ->
match v_opt with
| Some () -> incr total_added
| None -> ())
match v_opt with
| Some () -> incr total_added
| None -> ())
| Set (_, ()) -> incr total_added
| Remove _ -> ())
fp;
Expand Down
24 changes: 12 additions & 12 deletions analysis/reactive/test/fixpoint_incremental_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ let test_fixpoint_add_base () =
| Batch entries ->
entries
|> List.iter (fun (k, v_opt) ->
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
fp;

emit_init (Set ("c", ()));
Expand Down Expand Up @@ -299,9 +299,9 @@ let test_fixpoint_remove_spurious_root () =
| Batch entries ->
entries
|> List.iter (fun (k, v_opt) ->
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
fp;

(* Step 1: "b" is spuriously marked as a root *)
Expand Down Expand Up @@ -429,9 +429,9 @@ let test_fixpoint_remove_edge_rederivation () =
| Batch entries ->
entries
|> List.iter (fun (k, v_opt) ->
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
fp;

(* Add root *)
Expand Down Expand Up @@ -542,9 +542,9 @@ let test_fixpoint_remove_edge_entry_higher_rank_support () =
| Batch entries ->
entries
|> List.iter (fun (k, v_opt) ->
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
match v_opt with
| Some () -> added := k :: !added
| None -> removed := k :: !removed))
fp;

(* Add root *)
Expand Down
Loading
Loading