Project

General

Profile

Revision 6fdfb60b src/clocks.ml

View differences:

src/clocks.ml
161 161
 | Ctuple cl -> cl
162 162
 | _         -> [ck]
163 163

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

  
164 167
let clock_of_impnode_clock ck =
165 168
  let ck = repr ck in
166 169
  match ck.cdesc with
......
354 357
(* Returns the clock root of a clock *)
355 358
let rec root ck =
356 359
  match (repr ck).cdesc with
357
  | Con (ck',_,_) | Clink ck' | Ccarrying (_,ck') ->
358
      root ck'
360
  | Ctuple (ck'::_)
361
  | Con (ck',_,_) | Clink ck' | Ccarrying (_,ck') -> root ck'
359 362
  | Pck_up _ | Pck_down _ | Pck_phase _ | Pck_const _ | Cvar _ | Cunivar _ -> ck
360
  | Carrow _ | Ctuple _ -> failwith "Internal error pclock_parent"
363
  | Carrow _ | Ctuple _ -> failwith "Internal error root"
361 364

  
362 365
(* Returns the branch of clock [ck] in its clock tree *)
363 366
let rec branch ck =
......
365 368
    match (repr ck).cdesc with
366 369
    | Ccarrying (_, ck) -> branch ck acc
367 370
    | Con (ck, cr, l)   -> branch ck ((cr, l) :: acc)
368
    | Ctuple _
371
    | Ctuple (ck::_)    -> branch ck acc
369 372
    | Carrow _          -> assert false
370 373
    | _                 -> acc
371 374
  in branch ck [];;

Also available in: Unified diff