For a statement $S$ in a program, in the context of liveness analysis, the following sets are defined:
$\text{USE}(S)$ : the set of variables used in $S$
$\text{IN}(S)$ : the set of variables that are live at the entry of $S$
$\text{OUT}(S)$ : the set of variables that are live at the exit of $S$
Consider a basic block that consists of two statements, $S_1$ followed by $S_2$. Which one of the following statements is correct?
- $\text{OUT($S_1$)} = \text{IN ($S_2$)}$
- $\text{OUT ($S_1$)} = \text{IN ($S_1$)} \cup \text{ USE ($S_1$)}$
- $\text{OUT ($S_1$)} = \text{IN ($S_2$) }\cup \text{ OUT ($S_2$)}$
- $\text{OUT ($S_1$)} = \text{USE ($S_1$)} \cup \text{IN ($S_2$)}$