let add_ptr_reference_param x n = 
  oracle "[ByPRef] first step + (%a,%d)" pp_var_type x n;
  if n = 0 && (is_pure_logic x) then 
    (ByPReference.remove x ; ByValue.replace x ())
   else (
     try 
       if not (fst(ByPReference.find x) = n) then 
         (oracle "[ByPRef] remove %a: ko arity -> + ByValue" pp_var_type x;
          ByPReference.remove x ; ByValue.replace x ())
       else (oracle "[ByPRef] (%a,%d) already" pp_var_type x n;()) 
     with Not_found ->
       oracle "[ByPRef] %a not yet"pp_var_type x;
       if ByValue.mem x then 
         (oracle "[ByPRef] not add %a : byValue" pp_var_type x; ()) 
       else 
         (if ByAReference.mem x then 
            (oracle "[ByPRef] %a in byARef : remove -> add in ByValue" 
               pp_var_type x;
             ByAReference.remove x;ByValue.replace x())
          else 
            (oracle "[ByPRef] add (%a,%d)" pp_var_type x n;
             ByPReference.replace x (n,[]))) )