MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

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: -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.

Detailed explanation-2: -2.4 Variables 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: -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-4: -Inferences can be deductive, inductive, or abductive. Deductive inferences are the strongest because they can guarantee the truth of their conclusions. Inductive inferences are the most widely used, but they do not guarantee the truth and instead deliver conclusions that are probably true.

There is 1 question to complete.