Recently I'm working on learning the dynamic and static analysis of language. I've read some related question like static and dynamic code analysis but I still have some questions.
Dynamic analysis can happen during compile and runtime period and check the program status. With dynamic analysis, unwanted execution step can be avoided. Static analysis often refers to static type check system and a static analysis must correctly predict the actual program behavior. For static type systems, this means that the assigned type must describe all values that a program may evaluate to at runtime. I'm wondering what happens if a type checker assigns a type to a program that does not describe all values that the program evaluates to. Can anybody give an example of that?