COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Type checking can be of two types viz: ____ and ____
A
synthesis, inference
B
synthesis, expression
C
syntactic, semantic
D
expressive, symbolic
Explanation: 

Detailed explanation-1: -Type Checking vs. Type Inference. A Type Checker only verifies that the given declarations are consistent with their use. Examples: type checkers for Pascal, C. A Type Inference system generates consistent type declarations from information implicit in the program.

Detailed explanation-2: -The first rule confirms that a variable has a given type if the context maps that variable to that type. The second rule manipulates the context: first, it typechecks the let-binding itself in the original context .

Detailed explanation-3: -Static type checking is performed by a compiler, whereas terminal dynamic type checking is performed when the target program is run. Since a source type system allows us to know statically that type errors will not occur when the target program executes; it eliminates dynamic type checking requirements.

There is 1 question to complete.