Semantic Analysis: Type Checking
44/69
id
E
op
1)
Action:  
E.type := id.type
E
2)
E1
E2
Rule:
Rule:
Operation op is defined over types:
t1 op t2 ® t3
Action:
if (E1.type = t1 or
E1.type is convertable to t1)
and
(E2.type = t2 or
E2.type is convertable to t2)
then
E.type := t3
else
Semantic Error.