📄 9.5.3b.htm
字号:
<html>
<head>
<title>编译原理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/specification.css">
</head>
<BODY>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.5.3_3.htm'" ></td>
<td>
<img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.5.3b_2.htm'" ></img></td>
</tr>
</table>
<br><br>
<font class="title2"><b>9.5.3 结构化程序的数据流分析(续)</b></font>
<br><br>
<table>
<tr>
<td>    </td>
<td class="content">
<font class = "emphasize">二、kill[S]</font>
<p>
<font class = "definition2">kill[S]</font>:kill[S]是决不会到达S结束点的定值,不管它们能否到达S的开始点。这样,它使得检查"由S注销的"定值有意义。为了使定值d在kill[S]中,从S的开始点到结束点的每条路径上,必须有d定值的变量的无二义定值,并且如果d出现在S中,那么d出现的任何路径上,d的后面必须有同样变量的另一定值。
</p>
<font class = "example">例9.19</font>
<table>
<tr>
<td class="content">
<p>
<img border="0" src="images/9_25_1_2.gif"><p>
根据定义写出图9.27(2)(a)中语句S的kill[S]。<p>
解析:d是唯一的定值,不管它是否到达开始点,它肯定到达该语句的结束点,它注销了a在程序中的所有定值D<sub>a</sub>。所以: </p>
<p><b><font color="#FF0000"><font size="4">kill[S]=D<sub>a</sub>-{d}</font></font></b></td>
</tr>
</table>
<hr size=2 width=90% align=center color=red><br>
<font class = "example">例9.20</font>
<table>
<tr>
<td class="content">
<p>
<img border="0" src="images/9_25_2.gif"><p>
图9.27(2)(b)的串联语句的规则有点微妙,由语句S=S<sub>1</sub>;S<sub>2</sub>注销的定值集合是什么?<p>
解析:首先,如果定值d被S<sub>2</sub>注销,那么它肯定到不了S的结束点,即肯定也被S注销;另外,如果d被S<sub>1</sub>注销,只要它不在S<sub>2</sub>中产生,它也不能到达S的结束点。所以:
</p>
<p><font color="#FF0000"><span style="FONT-WEIGHT: 700"><font size="4">kill[S]=kill[S<sub>2</sub>]∪(kill[S<sub>1</sub>]-gen[S<sub>2</sub>])</font></span><b><font size="4">
</font></b></font> </td>
</tr>
</table>
<hr size=2 width=90% align=center color=red><br>
</td>
</tr>
</table>
<br>
<table align=right width=300>
<tr>
<td>
<img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.5.3_3.htm'" ></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.5.3b_2.htm'" ></td>
</tr>
</table>
</BODY>
<html><script language="JavaScript">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -