Skip to content
Snippets Groups Projects
Commit 5476a4ad authored by erwan's avatar erwan
Browse files

Fix a priority issue

parent c32d3050
No related merge requests found
(* Time-stamp: <modified the 07/03/2019 (at 11:31) by Erwan> *)
(* Time-stamp: <modified the 07/03/2019 (at 14:06) by Erwan> *)
open Algo
......@@ -12,12 +12,13 @@ let list_min l =
[] -> assert false
| x::l -> List.fold_left min x l
(* avoid warning when casting to int *)
let i e v = match e v with I i -> i | _ -> assert false
let new_clock_value nl e =
let cl = List.map (fun n -> i n.lenv "clock") nl in
let min_clock = List.fold_left min (i e "clock") cl in
min_clock + 1 mod m
(min_clock + 1) mod m
let enable_f nl e =
if I (new_clock_value nl e) <> e "clock" then ["incr"] else []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment