On the Design of Generic Static Analyzers for Imperative Languages