let create init_states kf =
    let funspec = Kernel_function.get_spec kf in
    let h = HashBehaviors.create 3 in
    { is_active =
        (fun b ->
           try HashBehaviors.find h b
           with Not_found ->
             let active = is_active_aux init_states b in
             HashBehaviors.add h b active;
             active
        );
      init_states = init_states;
      funspec = funspec;
    }