This work is about proving safety properties on programs. Such proof can be done by showing that "forbidden" program states, violating the property, are unreachable. For proving this kind of properties, we propose a semi-automatic verification technique which attempts to combine some of the advantages of model-checking, abstract interpretation and interactive proof. This technique is based on
... [Show full abstract] so-called tree automata completion. Like model-checking, this technique automatically proves safety of finite systems and of some classes of infinite systems having a regular representation. Outside of those classes and like abstract interpretation, tree automata completion permits to safely and finitely over-approximate the behavior of infinite state systems. At last, when the approximations are too coarse, we propose ways to interactively refine them and, when possible, finish the proof. Tree automata completion is based on Term Rewriting Systems which are one of the core technique of automated deduction. We use them to model programs: a program configuration is a term and transitions between configurations are represented by rewrite rules. On those models, proving safety consists in achieving reachability analysis, i.e. proving that "forbidden" terms are unreachable by rewriting initial ones. Sets of reachable terms are represented using tree automata and effectively computed using tree automata completion. This technique has been used for the verification of cryptographic protocols (it is part of one of the AVISPA tools) and for the fast prototyping of static analysis of Java bytecode programs.