This work focuses on the compilation of languages constraint logic programming over finite domains (DF) . Rather than taking the usual approach considering the solver as a black box we chose the glass box approach proposed by P. Van Hentenryck. In this approach, the solver handles a single primitive constraint . All complex constraints ( equations, symbolic constraints ... ) are translated into calls to primitive constraints . The solver is simple and homogeneous. In addition , the user can define his own constraints in terms of this primitive. This primitive allows us to define an abstract machine for compiling FD constraints. In addition, managing a single primitive allows us to define global optimizations that benefit to all high-level constraints. All these ideas are detailed and lead to the definition of the clp(FD) language. The performance of clp(FD) shows that this approach is very effective in all cases better than solvers based on a black-box approach . We also study the ability of clp (FD) to solve Boolean constraints because they are a special case of FD. Again clp (FD) compares very well to specialized solvers. Finally, we are interested in the detection of constraint satisfaction to allow the user to specify data-driven calculations (rather than instructions). This work leads quite naturally to the implementation of concurrent languages .