Algebraic methods in logic and in computer science