首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
A practical approach to the development of a high-quality, re-usable code generator is described in this paper. This code generator produces code for the Prime 64V mode architecture, but the methodology used is generally applicable to the construction of compilers for most architectures. The code generator accepts a tree-structured intermediate form, linearized and represented as a file of integers. This intermediate form uses high-level operators, minimizing work by compiler front-ends that use it and providing a number of advantages in the code generation process. The output of the code generator is assembly language. This tool was found to considerably extend the capabilities of students in a graduate compiler class and has been used in the construction of Pascal and C compilers.  相似文献   

2.
Software testing is a critical and important stage of the application software development life-cycle. Testing is a verification activity that affects the overall software quality. The verification of critical and dependable computer software such as real-time safety-critical software systems consumes about 50% of the project time. In this work, we consider testing compilers. Since a compiler is a highly usable software, an increased emphasis on reliability requires a careful testing before releasing the compiler. In compiler testing, the compiler implementation is verified to conform to the specified language syntax and semantic available in the standard language documentation. In this work, an algorithm is designed and a tool is developed to automate the generation of test cases to check the language syntax. In addition, we propose a heuristic approach to cover language semantics. Since Java is a relatively new programming language, we concentrate on testing the adherence of new Java compilers to the language syntax and semantics.  相似文献   

3.
4.
5.
In this paper we present the motivation, theory and transformations of our semantics-directed compiler generator. The main novelty of our generator is that it generates compilers and abstract machines. The execution times of the abstract machine programs produced by our generated compiler compare well to those of target programs produced by compilers generated by other semantics-directed generators. The generated specifications of compilers and abstract machines are suitable as a starting point for handwriting compilers and abstract machines. Our generator is fully automated and its core transformations are proved correct. Received May 1997 / Accepted in revised form May 2000  相似文献   

6.
Compilers are widely-used infrastructures in accelerating the software development,and expected to be trustworthy.In the literature,various testing technologies have been proposed to guarantee the quality of compilers.However,there remains an obstacle to comprehensively characterize and understand compiler testing.To overcome this obstacle,we propose a literature analysis framework to gain insights into the compiler testing area.First,we perform an extensive search to construct a dataset related to compiler testing papers.Then,we conduct a bibliometric analysis to analyze the productive authors,the influential papers,and the frequently tested compilers based on our dataset.Finally,we utilize association rules and collaboration networks to mine the authorships and the communities of interests among researchers and keywords.Some valuable results are reported.We find that the USA is the leading country that contains the most influential researchers and institutions.The most active keyword is“random testing”.We also find that most researchers have broad interests within small-scale collaborators in the compiler testing area.  相似文献   

7.
面向嵌入式系统的优化编译器生成器设计   总被引:4,自引:0,他引:4  
构造嵌入式系统是一个硬件软件的协同设计问题 .嵌入式软件的有效开发需要相应编译器的支持 .由于嵌入式系统存储空间有限 ,所以编译器生成的机器代码必须非常紧凑 .我们可以使用编译器的生成器来提高编译器的开发效率 .本文给出了一种编译器生成器的设计原理 ,利用该编译器生成器可以迅速生成面向某种指令系统和机器特征 ,并且能够对输出代码进行自动紧凑的编译器  相似文献   

8.
The program transformation principle called partial evaluation has interesting applications in compilation and compiler generation. Self-applicable partial evaluators may be used for transforming interpreters into corresponding compilers and even for the generation of compiler generators. This is useful because interpreters are significantly easier to write than compilers, but run much slower than compiled code. A major difficulty in writing compilers (and compiler generators) is the thinking in terms of distinct binding times: run time and compile time (and compiler generation time). The paper gives an introduction to partial evaluation and describes a fully automatic though experimental partial evaluator, called mix, able to generate stand-alone compilers as well as a compiler generator. Mix partially evaluates programs written in Mixwell, essentially a first-order subset of statically scoped pure Lisp. For compiler generation purposes it is necessary that the partial evaluator be self-applicable. Even though the potential utility of a self-applicable partial evaluator has been recognized since 1971, a 1984 version of mix appears to be the first successful implementation. The overall structure of mix and the basic ideas behind its way of working are sketched. Finally, some results of using a version of mix are reported.  相似文献   

9.
面向嵌入式系统的优化编译器生成器设计   总被引:3,自引:0,他引:3  
给出了一种编译器生成器的设计原理,利用编译器生成器可以迅速生成面向某种指令系统和机器特征,并且能够对输出代码进行自动紧凑的编译器。  相似文献   

10.
编译器模糊测试,是测试编译器功能性与安全性的常用技术之一.模糊测试器通过产生语法正确的测试用例,对编译器的深层代码展开测试.近来,基于循环神经网络的深度学习模型被引入编译器模糊测试用例生成过程.针对现有方法生成测试用例的语法正确率不足、生成效率低的问题,提出一种基于前馈神经网络的编译器模糊测试用例生成方法,并设计实现了原型工具FAIR.与现有的基于token序列学习的方法不同,FAIR从抽象语法树中提取代码片段,利用基于自注意力的前馈神经网络捕获代码片段之间的语法关联,通过学习程序设计语言的生成式模型,自动生成多样化的测试用例.实验结果表明,FAIR生成测试用例的解析通过率以及生成效率均优于同类型先进方法.该方法显著提升了检测编译器软件缺陷的能力,已成功检测出GCC和LLVM的20处软件缺陷.此外,该方法具有良好的可移植性,简单移植后的FAIR-JS已在JavaScript引擎中检测到两处软件缺陷.  相似文献   

11.
郭德贵  王冠成  吕帅  刘磊 《软件学报》2017,28(5):1221-1232
部分求值技术在程序优化及软件自动生成等方面,有着极为重要的作用.本文将部分求值技术应用到编译器测试中.为此,设计了一个C语言的子集peC语言,给出了该语言的部分求值策略的形式化描述,实现了peC语言的部分求值器,设计了基于部分求值技术的编译器测试框架.通过实验,本文的方法可以检测出大部分之前的其它的方法发现的GCC、LLVM编译器中的错误,此外还发现了其它方法不能发现的错误,表明将部分求值技术应用到编译器测试中是有效的.  相似文献   

12.
Automatic production of one-pass compilers from attribute grammars is considered. An examination of a one-pass grammar for the programming language Euclid shows that the present definition of one-pass grammars is too general: the space behaviour of the produced compilers differs from that found in conventional hand-written compilers. A new class of attribute grammars is defined. The class models naturally the use of space in a hand-written compiler. This implies that the compiler produced automatically on the basis of the grammar uses space in the same way as a practical hand-written recursive descent compiler. Furthermore, a graphical notation is introduced as a design tool for obtaining grammars in the proposed class.  相似文献   

13.
分块内存和多地址生成器(AGU)是DSP普遍采用的体系结构.传统的C语言编译器没有针对分块内存和多AGU结构进行代码优化,导致生成代码无法满足性能需求,影响了C语言编译器在数字信号处理领域的应用.为了解决这个问题,提出基于编译指示,与分块内存和多AGU结构相关的编译优化算法.该算法利用定义引用链和引用定义链中的数据流信息,为地址计算指令和访存指令分配AGU,从而提高生成代码的指令级并行度.实验结果表明此算法能够达到较好的优化效果.  相似文献   

14.
康跃馨  甘元科  王生原 《软件学报》2019,30(7):2003-2017
同步数据流语言(如Lustre、Signal)在航空、高铁、核电等安全关键领域得到广泛应用.例如,适合这些领域实时控制系统建模和开发的Scade工具就是基于一种类Lustre语言.这类语言相关开发工具,特别是编译器的安全性问题也自然受到高度关注.近年来,基于形式化验证实现可信编译器构造成为程序设计语言领域的研究焦点之一,也取得了瞩目的成果,如CompCert项目实现了产品级的可信C编译器.同样,人们也采用这种方法开展了同步数据流语言可信编译器的研发工作.主要关注从事这一工作的两个长线项目,二者均研发面向基于Lustre的同步数据流语言编译器,分别以Vélus和L2C代称.对Vélus和L2C从多个重要的角度进行较为深入的分析与比较.  相似文献   

15.
16.
迭代式优化编译方法能有效地使应用程序的运行充分发挥各种硬件平台的潜力。其中基于机器学习的方法显著提高了优化效率,但它忽视了编译程序的经验总是有限的现实,需要根据一个新程序的具体情况判断自己是否有足够的和适当的经验将其优化。这制约了在更广泛的应用领域内应用该技术。为此,本文提出采用逆K近邻法对新程序作孤立点检测。如果一个程序被判断为孤立点,表明已有经验并不适用,应该从零开始搜索优化空间;否则可直接利用已有经验。初步实验结果表明,本方法能有效判断一系列程序中的孤立点,使编译程序能对它们做恰当的处理,提高优化效率。  相似文献   

17.
Since a compiler phase depends on previous phases for input, it can be difficult to do timely independent unit testing of some phases. This can make integration more difficult and reduce overall quality. A test case generator has been used to circumvent this problem by providing an independent source of phase test inputs. Using a context-free grammar augmented with contextsensitive constructs, a test case generator can generate intermediate language graphs in textual form.  相似文献   

18.
Java编译程序技术与Java性能   总被引:3,自引:1,他引:3  
冀振燕  程虎 《软件学报》2000,11(2):173-178
概述了Java编译程序技术,把Java编译程序分成5类:具有解释技术的编译程序;具有及时(JIT)编译技术的编译程序;具有自适应优化技术的编译程序;本地编译程序和翻译程序.详细描述和分析了它们的体系结构和工作原理.同时也分析了编译程序技术对Java性能的影响.  相似文献   

19.
高慧  刘知青 《软件》2012,33(9):24-26
Prolog(Programming in Logic)程序语言是一种逻辑程序设计语言.它是在逻辑学理论基础上建立起来的并广泛应用在人工智能研究中.这几十年已经出现了各具特色的Prolog编译器,而且各种编译器也都很成功.虽然在现阶段已经出现了各种版本Prolog编译器,但是Prolog编译器的发展空间还是很大.本文先通过现代Prolog编译器的不足,介绍了新Prolog编译器的特点,然后简单叙述了Prolog编译器词法分析和语法分析的过程,最后介绍了UCB策略.  相似文献   

20.
Generation of efficient parallel code is a major goal of a well-designed and developed parallelizing compiler. Another important goal is portability of both compiler system and the resulting output source codes. The various choices of current and future parallel computer architectures as well as the cost of developing a parallelizing compiler make portability a very important design goal. Since the design of parallelizing compilers is considerably move complex than designing conventional compilers, it is very important to achieve both efficiency and portability. To meet this dual goal, we have investigated the application of object oriented design to parallelizing compilers. Our parallelizing compiler design is based on abstractions of intermediate representations of loops and their class definitions. In this paper, we address the problem of loop parallelization and propose a framework where the loop parallelization process is divided into three phases and the optimization of loops is performed via a cyclic application of these three phases. The class of each phase is hierarchically derived from intermediate representations of loops. This facilitates the portability of the resulting parallelizing compilers. Furthermore, one of the phases uses a reservation table of hardware resources in order to obtain optimized parallel programs for given hardware resources. The validation of the proposed framework is given through the application of the object oriented design on an example program which is then parallelized efficiently.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号