⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 9.5.3_2.htm

📁 建立《编译原理网络课程》的目的不仅使学生掌握构造编译程序的原理和技术
💻 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.htm'" ></td>
<td>
<img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.5.3_3.htm'" ></img></td>
</tr>
</table>
<br><br>

<font class="title2"><b>9.5.3 结构化程序的数据流分析(续)</b></font>            


<table>
<tr>
<td>&nbsp&nbsp&nbsp&nbsp</td>
<td class="content">
<br>
<font class = "emphasize">一、gen[S]</font>

<p>
<font class = "definition2">gen[S]</font>:如果S中的定值d到达S的结束点,那么d在gen[S]中,而不依赖它是否到达S的开始点。换句话说,d必须出现在S中并经过不走出S的路径到达S的结束点。所以可以说gen[S]是"<font class = "definition2">由S产生的</font>"定值。 
</p>
<font class = "example">例9.15</font>
<table>
<tr>
<td class="content">
<p>
<img border="0" src="images/9_25_1_2.gif"><p>
根据定义写出图9.27(2)(a)中语句S的gen[S]。 
<p>解析:d是唯一的定值,不管它是否到达开始点,它肯定到达该语句的结束点,所以: </p>
<p><b><font size="4" color="#FF0000">gen[S]={d}</font></b></td>
</tr>
</table>
<hr size=2 width=90% align=center color=red><br>
<font class = "example">例9.16</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产生;另外,如果d由S<sub>1</sub>产生,只要它不被S<sub>2</sub>注销,它也将到达S的结束点。所以: </p>
<p><b><font size="4" color="#FF0000">gen[S]= gen[S<sub>2</sub>]∪(gen[S<sub>1</sub>]-kill[S<sub>2</sub>])</font></b></p>
<p> </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.htm'" ></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.5.3_3.htm'" ></td>
</tr>
</table>

</BODY>
<html><script language="JavaScript">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -