8
Type Checking
1. What is a type system? List the major functions performed by the type systems.
Ans: A type system is a tractable syntactic framework to categorize different phrases according to their behaviors and the kind of values they compute. It uses logical rules to understand the behavior of a program and associates types with each compound value and then it tries to prove that no type errors can occur by analyzing the flow of these values. A type system attempts to guarantee that only value-specific operations (that can match with the type of value used) are performed on the values. For example, the floating-point numbers in C uses floating-point specific operations to be performed over these numbers such as floating-point addition, ...
Get Express Learning: Principles of Compiler Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.