let rec fold f a e =
try
(match d_interp a with
| Sym.Const(_), [] -> e
| Sym.Sub(_,_,_), [x] -> fold f x e
| Sym.Conc(_,_), [x; y] -> fold f x (fold f y e)
| _ -> assert false)
with
Not_found -> f a e