let all_var_terms procs {t_globals = globals; t_arrays = arrays} =
let acc, gp =
List.fold_left
(fun (acc, gp) g ->
Term.Set.add (Elem (g, Glob)) acc, gp
) (Term.Set.empty, []) globals
in
List.fold_left (fun acc a ->
let indexes = Variable.all_arrangements_arity a (procs@gp) in
List.fold_left (fun acc lp ->
Term.Set.add (Access (a, lp)) acc)
acc indexes)
acc arrays