Advanced Compilers & Programming Language Theory
Q97 / 100

What is the principal types property in type inference?

Correct! Well done.

Incorrect.

The correct answer is B) A type system has the principal types property if every typeable expression has a most general type that is an instance of every other type the expression can be given

B

Correct Answer

A type system has the principal types property if every typeable expression has a most general type that is an instance of every other type the expression can be given

Explanation

Hindley-Milner has principal types: the inferred type is the most general — any other valid type is a substitution instance of it. System F lacks principal types (type inference is undecidable). Principal types ensure type inference is well-defined.

Progress
97/100