## Revision 6a1a01d2 src/clocks.ml

View differences:

src/clocks.ml
164 164
```let clock_on ck cr l =
```
165 165
``` clock_of_clock_list (List.map (fun ck -> new_ck (Con (ck,cr,l)) true) (clock_list_of_clock ck))
```
166 166

167
```let clock_current ck =
```
168
``` clock_of_clock_list (List.map (fun ck -> match (repr ck).cdesc with Con(ck',_,_) -> ck' | _ -> assert false) (clock_list_of_clock ck))
```
169

167 170
```let clock_of_impnode_clock ck =
```
168 171
```  let ck = repr ck in
```
169 172
```  match ck.cdesc with
```
......
378 381
```    | _                 -> acc
```
379 382
```  in branch ck [];;
```
380 383

384
```let clock_of_root_branch r br =
```
385
``` List.fold_left (fun ck (cr,l) -> new_ck (Con (ck, cr, l)) true) r br
```
386

387
```(* Computes the (longest) common prefix of two branches *)
```
388
```let rec common_prefix br1 br2 =
```
389
``` match br1, br2 with
```
390
``` | []          , _
```
391
``` | _           , []           -> []
```
392
``` | (cr1,l1)::q1, (cr2,l2)::q2 ->
```
393
```   if eq_carrier cr1 cr2 && (l1 = l2)
```
394
```   then (cr1, l1) :: common_prefix q1 q2
```
395
```   else []
```
396

381 397
```(* Tests whether clock branches [br1] nd [br2] are statically disjoint *)
```
382 398
```let rec disjoint_branches br1 br2 =
```
383 399
``` match br1, br2 with
```

Also available in: Unified diff