title: Live Variable analysis to calculate Def and Use set for basic block
body: <p>For the basic block,  calculate use and def set for live variable analysis.
  example of the basic block B1.</p>
  
  <pre><code>input j;
  t1 = j % 2;
  t1 ! = 0 goto L2
  </code></pre>
  
  <p>I have calculated two answers:</p>
  
  <ol>
  <li><code>Def = {j, t1}, Use={}</code></li>
  <li><code>Def = {j, t1}, Use={j}</code></li>
  </ol>
  
  <p>Which of the following is correct? If none, then what would be the correct answer.</p>