let rec get_if_term = function
    Not(p) -> Ifnot(get_if_term p)
  | Equal(t1,t2) -> Ifequal(t1,t2)
  | Leq(t1,t2) -> Ifleq(t1,t2)
  | In(t1,t2) -> Ifcontains(t1,t2)
  | Event(Const(i) as e,[]) ->
(*      if (i = Globals.global_start) then
        Iknows(Base(e))
      else*)

      Unknown(Base(e),[])
  | New(xid) -> Ifnew(xid)
  | Event((Var(i) | Const(i)) as e,l) ->
      try (
        match (Globals.type_table#get_type i) with
                Base(Channel)
        | Base(Channel_ota)
        | Base(Channel_dy->
            Iknows(List.hd l)
              | _ ->
            Unknown(Base(e),l))
      with Not_found -> Unknown(Base(e),l)