What is the difference between static and dynamic analysis, and when would you choose one over the other?