|Pattern 20||Computing Static Expression Types|
This pattern explains how to statically compute the type of expressions in languages with explicit type declarations like C.
You’ll be able to extrapolate from this pattern everything you’d need to build a static type analyzer for C, C++, Java, or C#. Every compiler for those languages implements an extended version of this pattern. So do static bug analyzers such as FindBugs and Coverity.
Type computation is an extremely broad topic. To make things more concrete, we’ll focus on the type computation rules for Cymbol itemized here:
The declared type of the variable ...