The correct option is:
B. Only S1 and S2 are TRUE.
Here's the explanation for each statement:
S1: The front-end includes phases that are independent of the target hardware.
- This statement is true. The front-end of a compiler is responsible for tasks like lexical analysis, syntax analysis, and semantic analysis, which are independent of the target hardware.
S2: The back-end includes phases that are specific to the target hardware.
- This statement is true. The back-end of a compiler is responsible for tasks like code generation and optimization, which are specific to the target hardware platform.
S3: The back-end includes phases that are specific to the programming language used in the source code.
- This statement is not generally true. The phases in the back-end of a compiler are primarily concerned with generating efficient code for the target hardware. While the choice of programming language can influence some aspects of code generation, it's not a phase specific to the programming language itself. Most of the language-specific tasks are handled in the front-end.
So, only statements S1 and S2 are true, making option B the correct choice.