module General = process shift_event = ( ? event t; event Tick; ! event shifted_t; ) (| t_instant := t default not Tick | zt_instant := t_instant $ init false | shifted_t := when zt_instant when Tick |) where boolean t_instant, zt_instant; end; process upsample = ( ? integer nb_inserted; event input; ! integer counter, zcounter; ) (| counter := (nb_inserted when input) default (zcounter - 1) | zcounter := counter $ init 1 | input ^= when (zcounter = 1) |) ; process DEF_INTERVAL = { boolean INIT_INTERVAL; } ( ? event H1; event H2; ! boolean INTERVAL; ) (| WBI := ((not H2) when BTI) default H1 default BTI | BTI := WBI $ init INIT_INTERVAL | INTERVAL := BTI |) where boolean WBI, BTI; end; end;