




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















y^
E.g., “int x” in C means –2^31 <= x < 2^
Y
Y
receive operands of the proper type » Functions must be invoked with the right number and
type of arguments » Return statements must agree with the return type » In assignments, assigned value must be compatible
with type of variable on LHS » Class members accessed appropriately
Y
Y
during the execution of the program^ y
E.g., C
Y
y^
E.g., Lisp
Strong Typing
Weak Typing
Static Typing Dynamic Typing
y^
Array types y^
Structure types y^
Pointer types
Y
Y
Y
Y
Y
Y
y^
Int_array is the same type as int [ ]
» Problem: Different type expressions may denote the
same type
Y
variables of other types » C pointers: T* (e.g., int *x; )
{$$ = new IntType(id); } | ARRAY LBRACKET type RBRACKET
{$$ = new ArrayType($3); } ;