A STRUCTURED APPROACH TO STATIC SEMANTICS CORRECTNESS