Type checking constant, binary, and unary expressions