?? 9.13.7.htm
字號:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<title>9.7的解答</title>
</head>
<body background="../images/background.gif">
<p>解:對本題程序劃分基本塊并構(gòu)造其程序流圖,結(jié)果顯示在圖9.7(1)中,流圖中以深度為主次序為:B<sub>1</sub>, B<sub>2</sub>,
B<sub>3</sub>, B<sub>5</sub>, B<sub>7</sub>, B<sub>4</sub>, B<sub>6</sub>。</p>
<p align = "center"><img src="images/e9.7a.gif" width="529" height="358"></p>
<p align="left">(1)各基本塊的到達-定值集IN[B]:</p>
<p align="left"> 從圖9.7(1)的程序流圖直接求GEN[B]和KILL[B],顯示在表9.7(1)中。到達-定值集的計算結(jié)果顯示在表9.7(2)中。</p>
<p align="left">表9.7(1)</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="55%" id="AutoNumber1">
<tr>
<td width="20%" align="center">基本塊</td>
<td width="20%" align="center">GEN[B]</td>
<td width="20%" align="center">位向量</td>
<td width="20%" align="center">KILL[B]</td>
<td width="20%" align="center">位向量</td>
</tr>
<tr>
<td width="20%" align="center">B<sub>1</sub></td>
<td width="20%" align="center">{ d<sub>1</sub> }</td>
<td width="20%" align="center">1000000000</td>
<td width="20%" align="center">{ d<sub>5</sub> }</td>
<td width="20%" align="center">0000100000</td>
</tr>
<tr>
<td width="20%" align="center">B<sub>2</sub></td>
<td width="20%" align="center">{ d<sub>2</sub> }</td>
<td width="20%" align="center">0100000000</td>
<td width="20%" align="center">{ d<sub>9</sub> }</td>
<td width="20%" align="center">0000000010</td>
</tr>
<tr>
<td width="20%" align="center">B<sub>3</sub></td>
<td width="20%" align="center">{ <sub> </sub> }</td>
<td width="20%" align="center">0000000000</td>
<td width="20%" align="center">{ }</td>
<td width="20%" align="center">0000000000</td>
</tr>
<tr>
<td width="20%" align="center">B<sub>5</sub></td>
<td width="20%" align="center">{ d<sub>7</sub> }</td>
<td width="20%" align="center">0000001000</td>
<td width="20%" align="center">{ }</td>
<td width="20%" align="center">0000000000</td>
</tr>
<tr>
<td width="20%" align="center">B<sub>7</sub></td>
<td width="20%" align="center">{ d<sub>9</sub> }</td>
<td width="20%" align="center">0000000010</td>
<td width="20%" align="center">{ d<sub>2</sub> }</td>
<td width="20%" align="center">0100000000</td>
</tr>
<tr>
<td width="20%" align="center">B<sub>4</sub></td>
<td width="20%" align="center">{ }</td>
<td width="20%" align="center">0000000000</td>
<td width="20%" align="center">{ <sub> </sub> }</td>
<td width="20%" align="center">0000000000</td>
</tr>
<tr>
<td width="20%" align="center">B<sub>6</sub></td>
<td width="20%" align="center">{ d<sub>5</sub> }</td>
<td width="20%" align="center">0000100000</td>
<td width="20%" align="center">{ d<sub>1</sub> }</td>
<td width="20%" align="center">1000000000</td>
</tr>
</table>
<p>表9.7(2)</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="88%" id="AutoNumber2" height="150">
<tr>
<td width="7%" rowspan="2" height="33" align="center">基本塊</td>
<td width="24%" colspan="2" height="16" align="center">初值</td>
<td width="23%" colspan="2" height="16" align="center">第一次迭代</td>
<td width="24%" colspan="2" height="16" align="center">第二次迭代</td>
<td width="24%" colspan="2" height="16" align="center">第三次迭代</td>
</tr>
<tr>
<td width="11%" height="16" align="center">IN[B]</td>
<td width="11%" height="16" align="center">OUT[B]</td>
<td width="11%" height="16" align="center">IN[B]</td>
<td width="12%" height="16" align="center">OUT[B]</td>
<td width="12%" height="16" align="center">IN[B]</td>
<td width="12%" height="16" align="center">OUT[B]</td>
<td width="12%" height="16" align="center">IN[B]</td>
<td width="12%" height="16" align="center">OUT[B]</td>
</tr>
<tr>
<td width="7%" height="14" align="center">B<sub>1</sub></td>
<td width="11%" height="14" align="center">0000000000</td>
<td width="11%" height="14" align="center">1000000000</td>
<td width="11%" height="14" align="center">0000000000</td>
<td width="12%" height="14" align="center">1000000000</td>
<td width="12%" height="14" align="center">0000000000</td>
<td width="12%" height="14" align="center">1000000000</td>
<td width="12%" height="14" align="center">0000000000</td>
<td width="12%" height="14" align="center">1000000000</td>
</tr>
<tr>
<td width="7%" height="16" align="center">B<sub>2</sub></td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">0100000000</td>
<td width="11%" height="16" align="center">1000100000</td>
<td width="12%" height="16" align="center">1100100000</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101000</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1101101000</td>
</tr>
<tr>
<td width="7%" height="16" align="center">B<sub>3</sub></td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">1100100010</td>
<td width="12%" height="16" align="center">1100100010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
</tr>
<tr>
<td width="7%" height="16" align="center">B<sub>5</sub></td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">0000001000</td>
<td width="11%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
</tr>
<tr>
<td width="7%" height="16" align="center">B<sub>7</sub></td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">0000000010</td>
<td width="11%" height="16" align="center">1000101010</td>
<td width="12%" height="16" align="center">1000101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1000101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1000101010</td>
</tr>
<tr>
<td width="7%" height="16" align="center">B<sub>4</sub></td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">1100100010</td>
<td width="12%" height="16" align="center">1100100010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
</tr>
<tr>
<td width="7%" height="16" align="center">B<sub>6</sub></td>
<td width="11%" height="16" align="center">0000000000</td>
<td width="11%" height="16" align="center">0000100000</td>
<td width="11%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">0100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">0100101010</td>
<td width="12%" height="16" align="center">1100101010</td>
<td width="12%" height="16" align="center">0100101010</td>
</tr>
</table>
<p>(2)各基本塊中各變量的ud鏈:</p>
<p>
I在B<sub>3</sub>中引用點d<sub>3</sub>的ud鏈是{ d<sub>2</sub>, d<sub>9</sub> };<br>
I在B<sub>5</sub>中引用點d<sub>7</sub>的ud鏈是{ d<sub>2</sub>, d<sub>9</sub> };<br>
I在B<sub>7</sub>中引用點d<sub>9</sub>的ud鏈是{ d<sub>2</sub>, d<sub>9</sub> };<br>
N在B<sub>3</sub>中引用點d<sub>3</sub>的ud鏈是{ d<sub>1</sub>, d<sub>5</sub> };<br>
N在B<sub>5</sub>中引用點d<sub>7</sub>的ud鏈是{ d<sub>1</sub>, d<sub>5</sub> };<br>
N在B<sub>4</sub>中引用點d<sub>4</sub>的ud鏈是{ d<sub>1</sub>, d<sub>5</sub> };<br>
N在B<sub>8</sub>中引用點d<sub>5</sub>的ud鏈是{ d<sub>1</sub>, d<sub>5</sub> };<br>
N在B<sub>5</sub>中引用點d<sub>8</sub>的ud鏈是{ d<sub>7</sub> };<br>
</p>
<p>(3)各基本塊出口的活躍變量集V_OUT[B]:</p>
<p>使用下面的聯(lián)立方程:<br>
V_IN[B] = USE[B] <font face="宋體">∪ ( V_OUT[B] - DEF[B] )<br>
V_OUT[B] = ∪ V_IN[S]<br>
<font size="2">
S∈S[B]</font></font></p>
<p> 根據(jù)圖9.7(1)的程序流圖,求出USE[B]和DEF[B]顯示在表9.7(3)中。已知各基本塊的深度為主次序的逆序為B<sub>6</sub>, B<sub>4</sub>,
B<sub>7</sub>, B<sub>5</sub>, B<sub>3</sub>, B<sub>2</sub>, B<sub>1</sub>。各次迭代結(jié)果顯示在表9.7(4)中。</p>
<p>表9.7(3)</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="75%" id="AutoNumber3">
<tr>
<td width="12%" align="center">基本塊</td>
<td width="44%" align="center">DEF[B]</td>
<td width="44%" align="center">USE[B]</td>
</tr>
<tr>
<td width="12%" align="center">B<sub>1</sub></td>
<td width="44%" align="center">{ N }</td>
<td width="44%" align="center"><font face="宋體">Φ</font></td>
</tr>
<tr>
<td width="12%" align="center">B<sub>2</sub></td>
<td width="44%" align="center">{ I }</td>
<td width="44%" align="center"><font face="宋體">Φ</font></td>
</tr>
<tr>
<td width="12%" align="center">B<sub>3</sub></td>
<td width="44%" align="center"><font face="宋體">Φ</font></td>
<td width="44%" align="center">{ I, N }</td>
</tr>
<tr>
<td width="12%" align="center">B<sub>5</sub></td>
<td width="44%" align="center">{ J }</td>
<td width="44%" align="center">{ I, N }</td>
</tr>
<tr>
<td width="12%" align="center">B<sub>7</sub></td>
<td width="44%" align="center"><font face="宋體">Φ</font></td>
<td width="44%" align="center">{ I }</td>
</tr>
<tr>
<td width="12%" align="center">B<sub>4</sub></td>
<td width="44%" align="center"><font face="宋體">Φ</font></td>
<td width="44%" align="center">{ N }</td>
</tr>
<tr>
<td width="12%" align="center">B<sub>6</sub></td>
<td width="44%" align="center"><font face="宋體">Φ</font></td>
<td width="44%" align="center">{ N }</td>
</tr>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -