收藏 分销(赏)

编译原理复习大纲lk.doc

上传人:人****来 文档编号:4714359 上传时间:2024-10-10 格式:DOC 页数:9 大小:453.50KB
下载 相关 举报
编译原理复习大纲lk.doc_第1页
第1页 / 共9页
编译原理复习大纲lk.doc_第2页
第2页 / 共9页
编译原理复习大纲lk.doc_第3页
第3页 / 共9页
编译原理复习大纲lk.doc_第4页
第4页 / 共9页
编译原理复习大纲lk.doc_第5页
第5页 / 共9页
点击查看更多>>
资源描述

1、Delegates, staff: Hello! in the run-up to the Spring Festival, we held one session of four staff representatives Conference 2013-workshop, full back in 2012, careful analysis of the current situation, discuss 2013 development plans. Here, on behalf of my company 2013 work reports to the General Asse

2、mbly, for consideration. Pillar I, 2012 back in 2012, XX power companies adhere to the partys 17 great spirit for guidance, comprehensively implement the scientific concept of development, promoting cost-leadership strategy, standards, focus on implementation, lean management, continuously improve,

3、smooth present safety situation of enterprise management, business management and control scientific and standardized, and the dedication of staff, manage a harmonious and democratic atmosphere of the good situation. Main indicators are as follows:-the battery indicator: power generation totaled 7.8

4、15 billion kWh, beyond the annual budget implementation capacity of 315 million kWh, an increase of 757 million kWh. Sales totaled 7.425 billion kWh, exceeding sales of 330 million kWh the annual Executive budget, an increase of 729 million kWh. -Security measures: unplanned outages 2.5 times. No pe

5、rsonal injury accident occurred, no major accident and above, no major fire accidents without environmental pollution accidents, safety for three consecutive years to maintain stability to good posture. Business financial indicators: total profits of 255 million Yuan, beyond the annual budget of 207

6、 million Yuan, beyond the Datang company index 41.89 million Yuan, an increase of 1.76 million Yuan, FCM assessment at grade four. -Energy: power supply standard coal completing 312.25 g/kWh, down 0.1 g/kWh; integrated auxiliary power consumption ratio in 5.12%, down 0.26%; pollutant emissions perfo

7、rmance greatly reduced compared to last year, carbon 0.09 g/kWh, sulfur dioxide 0.104 g/kWh NOx 0.512 g/kWh; dust removal efficiency of more than 99.8%. -Reliability index: equivalent availability factor in 93.47%, increased 7.95% from a year earlier. Equivalent forced outage rate 0.08%, 0.16% reduc

8、tion over the same period a year earlier. Major achievements: first, we should adhere to the two management system basis, strengthening technological research, strengthen hidden hazards control and intrinsic safety Enterprise construction took new steps. -The two management system for improvement. F

9、ocus on promoting the power of the company management system and the application and implementation of the safety loop five-star management system, improve the safety management system, realize the system of safety control. Further regulate security routines, safety supervision and management networ

10、k role to play to achieve closed-loop. Strengthening the supervision and management of habitual violation of, strengthening the safety supervision of outsourcing contractors. Carried out in spring and autumn of security inspections, flood control and inspection, safety production month, day supervis

11、ion of production safety and the Olympic Games and other1、 理解编译器的概念,掌握编译器的功能,熟练掌握编译器的主要翻译步骤。了解与编译器相关的程序及其功能编译程序的工作过程一般可以划分为 词法分析,语法分析,语义分析,中间代码生成,代码优化 等几个基本阶段,同时还会伴有 表格处理 和 出错处理 .2、 扫描器功能,理论依据,它完成任务是什么?扫描器的任务是从源程序中识别出一个个 单词符号 ,编译程序对源程序或中间代码程序从头到尾扫描一次,找到单词。5. 符号表用法如、符号表中的信息栏中登记了每个名字的有关的性质,它有那些内容?名字、符

12、号种类、类型、地址、扩展属性指针。6.能画出程序框图,了解其功能,能叙述编译的基本结构2、 文法的集中类型和主要特点.如文法有几种类型 各自特点?一个文法组成部分?0型文法:短语结构文法,任何0型文法都是递归和可枚举的。1型文法:上下文有关文法,产生式左边至少有一个非终结符。2型文法:上下文无关文法,产生式左边只能有一个非终结符,右边无限制。3型文法:正则文法,右部可以有一个终结符和一个非终结符,或只有一个终结符。四元组(V非终结符,T终结符,P产生式,S开始符号);3. 何为最左推导?最右推导?最左推导,在A的每次推导过程中,每一步都是对当前句型的最左变量进行替换,每一步所得为左句型,相应的

13、归约称为最右归约;最右推导,在A的每次推导过程中,每一步都是对当前句型的最右变量进行替换,每一步所得为右句型,相应的归约称为最左归约。4、 掌握正则表达式及其生成语言的定义,熟练掌握正则表达式的三种基本运算,会根据语言写出正则表达式,或者反过来写出指定的正则表达式生成的语言的特征。1. 从各选择对象中选择,用元字符表示。比如: a|b;2. 连结,由并置表示。比如: ab;3. 重复或“闭包”,由元字符*表示。比如: a*;例题:给出下面语言的相应文法:L1=an bn | n1 L2=anbm+nam | n1,m0 G1: SAB AaAb | ab BbBa | G1: AaAb |ab

14、 5、 掌握DFA及其可接受的语言的定义,会根据语言画DFA图,或者反过来写出指定的DFA图可接受的语言的特征。例子:为正规式(a|b)*a(a|b) 构造一个等价的确定的有限自动机。a,baab012解答:5、 掌握用代码实现DFA的两种算法,熟练掌握基于转换表的算法。 例子:给定下列自动机:其中:开始状态:0 终止状态:2aaa0bbb12(1)把此自动机转换为确定自动机DFA。 (2)给出此DFA的正则表达式。解答:(1): 有状态矩阵如图: a b0 01 201 01 22 1 2 1 2a b 0 0,1 2 1 2 2 1 2从而可得DFA如图:-02aaba101bbb极小化后

15、:02babb1a(2)此DFA的正则表达式为: (aa*bb)(bab)* 或 a*b(bab)*。6、 掌握正则表达式和DFA图,了解词法分析程序。例题:给定文法GS: SaA|bQ; AaA|bB|b;BbD|aQ ;QaQ|bD|b;DbB|aA ;EaB|bF FbD|aE|b构造相应的最小的DFA 。 解:先构造其NFA: 用子集法将NFA确定化: abSAQAABZQQDZBZQDDZABDABBQD 将S、A、Q、BZ、DZ、D、B重新命名,分别用0、1、2、3、4、5、6表示。因为3、4中含有z,所以它们为终态。ab012113224325416516625 令P0(0,1,

16、2,5,6,3,4)用b进行分割: P1(0,5, 6,1,2,3,4)再用b进行分割: P2(0,5, 6,1,2,3,4)再用a、b 进行分割,仍不变。 再令为A,1,2为B,3,4为C,5,6为D。 最小化为右上图。2、 掌握文法的二义性概念,会识别和消除文法的二义性。例题:设有文法GS: SS(S)S|,该文法是否为二义文法?说明理由。 答:是二义的,因为对于()()可以构造两棵不同的语法树。 S S S ( S ) S S ( S ) S S ( S ) S S ( S ) S 消除下列文法GE的左递归。EE-TTTT/FFF( E )i解答:消除文法GE的左递归后得到:ETEE -

17、TETFTT/FTF( E )i说明下面文法GS是二义性文法:SSaS|SbS|cSd|eS|f例子:fafbf是文法GS的一个句子,并且有两个不同的最右推导。(1)S = SaS = SaSbS = SaSbf= Safbf= fafbf (2)S = SbS = Sbf= SaSbf = Safbf= fafbf因此说明此文法有二义性。考虑文法 GS: S (T) | a+S | a T T,S | S 消除左递归公式:AAa|bAbAAaA| 消除文法的左递归及提取公共左因子。解:消除文法GS的左递归: S(T) | a+S | a TST T,ST| 提取公共左因子: S(T) | a

18、S S+S | TST T,ST| b) 计算First集合和Follow集合的算法;例题:对文法G(S):S a | | (T);T T,S | SS-#S#;)lastvt(T)(=,#=(2) 是算符优先文法,因为任何两个终结符之间至多只有一种优先关系。(3) 给出输入串(a,a)#的算符优先分析过程。步骤 栈当前输入字符剩余输入串动作1#(a,a#( 移进2#(a,a)#(, 归约4#(T,a)#T, 移进5#(T,a)#,) 归约7#(T,T)#,) 归约8#(T)#(=) 移进9#(T)#)# 归约10#T#接受d)LL(1)分析算法;例子:设有文法G(S):SaBc|bABAaA

19、b|bBb| 求各产生式的FIRST集,FOLLOW(A)和FOLLOW(B),以及各产生式的SELECT集。 构造LL(1)分析表,并分析符号串baabbb是否是。解:(1)FIRST(aBc)=a, FIRST(bAB)=b FIRST(aAb)=a, Ab: FIRST(Ab)=b, Bb: FIRST(b) = b, FIRST()= FOLLOW(A)=b,#, FOOLOW(B)=c,#SELECT(SaBc)=a, SELECT(SbAB) =b, SELECT(AaAb)=a, SELECT(Ab)=b, SELECT(Bb)=b, SELECT(B)=c, #因此,所得的LL

20、(1)分析表如表A-4所示。表A-4 LL(1)分析表输入VN输入符号abc#SSaBcSbABAAaAbAbBBbBB(2)分析符号串baabbb成功,baabbb是该文法的句子,如图A-16所示。图A-16 识别串baabbb的过程1、 掌握判断一个上下文无关文法是否为LL(1)文法的充分必要条件,并会对指定的文法进行判断。例题:设将文法G改写成等价的LL(1)文法,并构造预测分析表。 G:SS*aT|aT|*aT; T+aT|+a 解:消除左递归后的文法G: SaTS|*aTSS*aTS|T+aT|+a 提取左公因子得文法G:SaTS|*aTSS*aTS|T+aTTT| Select(S

21、aTS)=aSelect(S*aTS)=*Select(SaTS)Select(S*aTS)=Select(S*aTS)=*Select(S)=Follow(s)=#Select(S*aTS)Select(S)= Select(T+aT)=+Select(TT)=First(T) =+Select(T )=Follow(T)=*,#Select(TT)Select(T)= 所以该文法是LL(1)文法。预测分析表: *+a#S*aTSaTSS*aTST+aTT T (五)语义分析理解三元式,四元式,逆波兰式等中间代码表示方法例题:写出表达式a=b*c+b*d对应的逆波兰式、四元式序列和三元式序列

22、。 答:逆波兰式: abc*bd*+:= 四元式序列:三元式序列: OP ARG1 ARG2(1) (*, b, c, t1) (1) (* b, c )(2) (*, b, d, t2) (2) (* b, d )(3) (+, t1, t2,t3) (3) (+ (1), (2)(4) (:=, t3, /, a)(4) (:= (3), a)2. 掌握四种典型的参数传递机制,会针对指定的程序分析不同参数传递机制的程序运行结果。传值,传地址,传值结果,传名;3. 优化概念.按涉及范围可划分为那几级优化?局部优化,全局优化,循环优化;4.循环优化的方法有那些?公共子表达式删除,复制传播,代码

23、外提,强度削弱和归纳变量删除(七) 目标机器,运行存储管理,基本块和流图,下次引用信息,一个简单的代码生成器,基本块的dag表示法,从dag生成目标代码。对于已知三地址代码,画出其基本块和流图;对于一个基本块,画出其dag表示法。例子:设有基本块如下:T1:=S+RT2:= 3T3:= 12/T2T4:=S/RA:=T1-T4T5:=S+RB:=T5T6:=T5*T3B:=T6(1)画出DAG图;()(2)设A,B是出基本块后的活跃变量,请给出优化后的四元式序列。T1,T5, B3T24SR+/*_T3T4AT6,Bn4n5n1n2n3n6n8n7答:(1) DAG如右图:(6分)(2) 四元

24、式序列:(4分)T1:=S+RT4:=S/RA:=T1-T4B:=T1*4根据县防指办关于开展第二轮防汛安全隐患集中排查工作的紧急通知(*防指发2018*)文件的通知要求,为确保各项防汛措施落实,消除隐患,确保今年安全度汛activities, comprehensive and tamping Safety Foundation . Troubleshooting, management mechanism, give full play to role of technical supervision and realization of troubleshooting, manageme

25、nt, improved process management. This year completed the boiler lower header leakage, boiler pressure, a major risk management, completed 29 of great risks and 3 General problems of governance. Complete chemistry lab construction, thermal control, and complete the boiler scale integrated management,

26、 host shafting vibration of 10 scientific and technological projects, such as. Complete supercritical 630MW on-line simulation system development and application of circulating water MCC standby power transformation, the transformation of desulfurization waste water, the unit water supply system of

27、comprehensive treatment and discharge valve modification of coal mill 5 key technological transformation projects, group health is improved. -Science and technology innovation is further increased. Strengthen the characteristics of supercritical unit major issues, gradually clearing the particularit

28、y of supercritical unit and regularity. Developed motor oil time management, switch action times, statistics, coal-aided measurement software, improves the production level of lean management. Increased investment in science and technology, reporting science and technology projects and 14 technical

29、project total cost percentage of the total annual production output of 0.25%. Large-scale coal-fired power plant flue gas desulfurization, denitrification complete development and application of key technologies project, won the national science and technology progress second prize. 630MW supercriti

30、cal units optimized control strategies and the 630MW development and application of on-line simulation system for supercritical units, supercritical 600MW units of turbine driven boiler feed pump set of comprehensive treatment of defects Datang technology respectively one or two and third. Meanwhile

31、, information technology achievements, the company was named China power information technology benchmarking enterprises. -Repair and maintenance has improved further. Modify the inspection standards and standards on a regular basis, standardizing work procedures, checking and inspection project. De

32、epening the BFS+ system, and implements maintenance information shared. Reorganizing RB logic again, and ensure the success of the RB. Innovating the mechanism of maintenance management, implemented a project manager system. Successful completion of two autonomous maintenance, reliability improved s

33、teadily. Implementing two c-level maintenance, project themselves 48.7% and 42.3%, respectively. Accomplish two circulating pumps repair and overhaul of four Mills, maintenance teams to get exercise. Promote the work of energy saving and consumption reducing, complete the unit energy consumption diagnosis, plant water balance test, 10 energy-saving projects. Second, we should adhere to three on the economic benefits of improving, outreach

展开阅读全文
部分上传会员的收益排行 01、路***(¥15400+),02、曲****(¥15300+),
03、wei****016(¥13200+),04、大***流(¥12600+),
05、Fis****915(¥4200+),06、h****i(¥4100+),
07、Q**(¥3400+),08、自******点(¥2400+),
09、h*****x(¥1400+),10、c****e(¥1100+),
11、be*****ha(¥800+),12、13********8(¥800+)。
相似文档                                   自信AI助手自信AI助手
百度文库年卡

猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服