首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 687 毫秒
1.
针对传统编译器过于抽象复杂的不足,本文提出MiniC实例语言,采用面向对象技术实现该语言的编译器。MiniC编译器可以演示复杂的程序分析过程,给出编译各阶段的详细分析结果,使编译原理中的抽象内容可视化。实际应用表明,MiniC编译器在促进人们对编译理论的理解和提高系统软件开发能力方面能够发挥重要作用。  相似文献   

2.
褚诚云 《程序员》2009,(5):93-95
概述在前面安全编码实践中我们介绍过GS编译选项和缓存溢出,以及数据保护DEP。首先,缓存溢出的直接后果就是可能导致恶意代码的远程执行,于是编译器提供了GS保护。但是,GS选项有自身的局限,存在若干方法可以绕过GS选项的保护。于是进一步,操作系统提供了数据执行保护,即DEP,以及与之对应的NXCOMPAT编译选项。  相似文献   

3.
知识库管理系统GKBMS是在Micro VAXⅡ上研制成功的一个通用知识信息处理的集成化环境系统。本文介绍其中预编译器的研究与实现。该预编译器由二级优化编译组成,分别采用部分计算技术和静态优化技术,能够支持元、目标级混合程序[8][11]及PROLOG—DBMS耦合程序[10]的优化。应用表明,该预编译器可显著提高知识程序的执行效率。  相似文献   

4.
现代编译器提供的优化选项众多,选择何种参数因子、选择哪些选项组合以及以何种顺序应用这些选项成为复杂的问题,其中优化次序问题是最困难的优化问题.随着传统方法的改进(迭代编译结合启发式优化搜索)以及新技术的出现(机器学习),构建一种相对高效、智能的编译器自动调优框架成为可能.文中通过调查过去数十年的相关研究,总结了前人的研...  相似文献   

5.
可信编译理论及其核心实现技术:研究综述   总被引:1,自引:0,他引:1       下载免费PDF全文
编译器是重要的系统软件之一,高级语言编写的软件都必须经过编译器的编译才能成为可执行程序。编译器的可信性对于整个计算机系统而言具有非常关键的意义,如果编译器不可信,则很难保证系统所运行软件的可信性。可信编译是指编译器在保证编译正确的同时提供相应的机制保证编译对象的可信性,对可信编译理论和技术的研究具有重要理论意义和实用前景。阐述了可信编译器的概念,介绍了编译过程正确性的形式化定义,对可信编译的主要研究进行了概括。在全面分析可信编译研究现状的基础上,从编译器自身可信性和确保编译对象可信性两个方面,对可信编译器设计和实现的相关理论和方法进行了分类和总结。最后,讨论了可信编译有待解决的问题和未来的研究方向。  相似文献   

6.
编译器的安全可信问题日益引起重视,特别是在安全关键系统中,编译器的误编译将会造成重大的损失。消除误编译的传统方法是大量的测试,但是测试难以达到完全覆盖,并不能充分地保证编译器的安全可信。近年来,形式化验证方法被成功用于可信编译器的构造中。一种方法是对编译器本身进行形式化验证,经过严密的证明,可杜绝误编译的发生。然而,这种方法可能"冻结"编译器的设计,阻碍编译器未来可能的优化和完善。翻译确认是另外一种用于可信编译器构造的形式化方法,它避免了对编译器自身的验证,有很好的可重用性,近年来在编译器验证领域得到了广泛研究,已取得令人瞩目的成果。介绍了翻译确认方法的概念及研究进展。  相似文献   

7.
《微型机与应用》2015,(8):12-16
Linux内核庞大并且可定制性非常高,而且目前市场上并没有学习内核的指导软件。针对Linux内核学习难、配置难等问题,对Linux内核模块进行了重新的逻辑划分,提出了"虚目录"的概念,并在此基础上,围绕Linux内核的编译选项设计并开发了一款学习指导软件。该软件为一套内核编译配置的辅助工具,虚目录的划分清晰地展示了内核功能模块的逻辑划分,展开虚目录后,会显示与此虚目录功能配置相关的所有编译配置选项,使用户了解到该目录项的功能是通过哪些编译选项来配置的。编译配置选项之间存在着编译依赖关系,本软件可以从源码的层次(如函数调用、变量引用等)来解释编译依赖关系的具体实现。  相似文献   

8.
一、简介IetelC/C 编译器仅在Ietel的VTuneCD光盘中提供,它是为32位MicrosoftWindows应用程序设计的,是NSCCOS0ftVISU61C+十集成开发环境(IDE)的第一代插件,是第一个提供针对特定处理器进行代码优化的编译器。它可使用VO+十的编译选项,而且产生的目标文件与VC+十提供的工具相兼容。开发者可以在DOVV10PP厂StUd50中使用它来编译VC+十的pr00ects,能产生Intel系列处理器上最优性能的可执行代码。lute}C/c+十编译器借助经过优化的数学库,允许软件充分利用Intel系列处理器的潜能,让软件开发者获得lute]系列处…  相似文献   

9.
对现有编译教学存在的问题进行分析,提出新的编译课程教学方案,引入真实的业界编译器实例GCC,以引导式、实例化的模式开展教学,最后,给出新教学模式的参考评价方法。  相似文献   

10.
反编译研究现状及其进展   总被引:9,自引:1,他引:8  
一、反编译的定义、作用及其结构编译器的概念众所周知,但逆编译器的概念却还是很新奇,它允许将所定义的目标代码映射到高级表示。计算字典为编译和逆编译给出了下面的定义: 编译:转换高级语言成目标代码的程序……逆编译:一种试图…从机器代码转换回到与原程序相似的某种程序的程序。  相似文献   

11.
有很多编译优化都与编译时的视野有关,较宽的视野能给编译器提供更详细的信息,从而能得到更好的优化效果。采用跨文件编译模式使编译器的视野扩大至整个程序将是未来的方向。本文总结了实现这种模式的一般流程以及所遇到的问题和解决方法,分析了三种已提出的跨文件过程间编译模式,最后给出了一个基于GCC3.4的跨文件编译框架的实现方法。  相似文献   

12.
ILDJIT, a new‐generation dynamic compiler and virtual machine designed to support parallel compilation, is introduced here. Our dynamic compiler targets the increasingly popular ECMA‐335 specification. The goal of this project is twofold: on one hand, it aims at exploiting the parallelism exposed by multi‐core architectures to hide the dynamic compilation latencies by pipelining compilation and execution tasks; on the other hand, it provides a flexible, modular and adaptive framework for dynamic code optimization. The ILDJIT organization and the compiler design choices are presented and discussed highlighting how adaptability and extensibility can be achieved. Thanks to the compilation latency masking effect of the pipeline organization, our dynamic compiler is able to mask most of the compilation delay, when the underlying hardware exposes sufficient parallelism. Even when running on a single core, the ILDJIT adaptive optimization framework manages to speedup the computation with respect to other open‐source implementations of ECMA‐335. Copyright © 2010 John Wiley & Sons, Ltd.  相似文献   

13.
Modern compilers present a great and ever increasing number of options which can modify the features and behavior of a compiled program. Many of these options are often wasted due to the required comprehensive knowledge about both the underlying architecture and the internal processes of the compiler. In this context, it is usual, not having a single design goal but a more complex set of objectives. In addition, the dependencies between different goals are difficult to be a priori inferred. This paper proposes a strategy for tuning the compilation of any given application. This is accomplished by using an automatic variation of the compilation options by means of multi-objective optimization and evolutionary computation commanded by the NSGA-II algorithm. This allows finding compilation options that simultaneously optimize different objectives. The advantages of our proposal are illustrated by means of a case study based on the well-known Apache web server. Our strategy has demonstrated an ability to find improvements up to 7.5% and up to 27% in context switches and L2 cache misses, respectively, and also discovers the most important bottlenecks involved in the application performance.  相似文献   

14.
基于域的编译框架   总被引:2,自引:2,他引:2  
传统的基于函数范围的后端编译框架是一种方便的程序划分方法,然而,考虑到编译过程中的资源需求(例如编译时间和内存使用),代码性能以及编译功能,函数的范围大小以及结构并不是最适合进行程序分析和优化的程序划分,在现代编译器为了尽可能地发掘指令级并行机会而寻求更复杂和时空复杂性更高的算法和情况下,这种不适应性变得更加突出,当函数的范围很大时,时空复杂性很高的算法以函数为基本编译单位通常会导致编译时间太长和(或)内存消耗太多,Hank提,出了一种编译框架,使得优化的范围和结构可以得到一定的控制,基于编译时间和优化机会的考虑,本文提出了一种新的基于域的编译框架,同时,允许一些基于域的优化制导属性在不同的优化阶段之间被传递和观察,这个基于域的编译框架已经在目标码为安腾(Itanium)处理器的编译器ORC(Open Research Compiler)中实现,实验结果表明,此框架在控制编译的时空复杂性方面是成功的。  相似文献   

15.
J. S. Briggs 《Software》1984,14(5):491-500
The programming language Ada defines a separate compilation mechanism which must enforce the language rules in the same manner when compiling a program either in several units or as one compilation unit. Two implementations of the Ada program library required by this mechanism are described. Each has an associated compiler manager program which is the user's interface to the library. The first maintains a central map file containing the library structure. The second uses the UNIX tool make to maintain the library and permits more flexibility in the UNIX operating system environment. Higher level tools could use the second manager as a component part.  相似文献   

16.
Tuning compiler optimizations for rapidly evolving hardware makes porting and extending an optimizing compiler for each new platform extremely challenging. Iterative optimization is a popular approach to adapting programs to a new architecture automatically using feedback-directed compilation. However, the large number of evaluations required for each program has prevented iterative compilation from widespread take-up in production compilers. Machine learning has been proposed to tune optimizations across programs systematically but is currently limited to a few transformations, long training phases and critically lacks publicly released, stable tools. Our approach is to develop a modular, extensible, self-tuning optimization infrastructure to automatically learn the best optimizations across multiple programs and architectures based on the correlation between program features, run-time behavior and optimizations. In this paper we describe Milepost GCC, the first publicly-available open-source machine learning-based compiler. It consists of an Interactive Compilation Interface (ICI) and plugins to extract program features and exchange optimization data with the cTuning.org open public repository. It automatically adapts the internal optimization heuristic at function-level granularity to improve execution time, code size and compilation time of a new program on a given architecture. Part of the MILEPOST technology together with low-level ICI-inspired plugin framework is now included in the mainline GCC. We developed machine learning plugins based on probabilistic and transductive approaches to predict good combinations of optimizations. Our preliminary experimental results show that it is possible to automatically reduce the execution time of individual MiBench programs, some by more than a factor of 2, while also improving compilation time and code size. On average we are able to reduce the execution time of the MiBench benchmark suite by 11% for the ARC reconfigurable processor. We also present a realistic multi-objective optimization scenario for Berkeley DB library using Milepost GCC and improve execution time by approximately 17%, while reducing compilation time and code size by 12% and 7% respectively on Intel Xeon processor.  相似文献   

17.
Conclusion An L2B-L2C optimizing compiler has been developed for compiling the procedural subset of the interpreted untyped language APLAN of the algebraic programming system APS into C. Controlled automatic compiling of procedures is regarded as a technological step toward efficient solution of problems in an algebraic programming environment. A distinctive feature of the compiler is that optimization is initiated by the user and relies on hierarchical algebraic specifications. If no specifications are present, the system guarantees compilation consistent with common APLAN semantics. The compiler is formally described on two levels. On the architectural level, we describe the general structure of the compiling process. The main data structures used for optimization are dictionaires of algebraic program components and expression type arrays. The semantic level of multialternative compiling of language constructs is represented in the language of relationships with selection of an appropriate translation alternative. The implementation of the proposed compiler requires a flexible support environment, which allows nonhomogeneous processing of an extended source language, in particular construction of static and dynamic information environments, compilation of the procedural part, and also analysis of the compiling environment, definition of the set of translations of procedural constructs, and selection of the best translation alternative for each particular case. An implementation of the proposed compiler is described in [13]. Translated from Kibernetika i Sistemnyi Analiz, No. 6, pp. 3–16, November–December, 1995.  相似文献   

18.
Adam is a high-level language for parallel processing. It is intended for programming resource scheduling applications, in particular supervisory packages for run-time scheduling of multiprocessing systems. An important design goal was to provide support for implementation of Ada and its run-time environment. Adam has been used to implement Ada task supervision and also as a high-level target language for compilation of Ada tasking. Adam provides facilities corresponding to the Ada sequential constructs (including subprograms, packages, exceptions, generics). In addition, it provides specialized module constructs for implementation of packages that may be shared between parallel processes, and new predefined types for scheduling. The parallel processing constructs of Adam are more primitive than Ada tasking. Strong restrictions are enforced on the ways in which parallel processes can interact. A compiler for Adam has been implemented in MacLisp on DEC PDP-10 computers. Runtime support packages in Adam for scheduling (on a single CPU) and I/O are also provided. The compiler contains a library manipulation facility for separate compilation. The Adam compiler has been used to build an Ada compiler for most of the July 1980 Ada, including task types and rendezvous constructs. This was achieved by implementing the translation of Ada tasking into Adam parallel processing as a preprocessor to the Adam compiler. This present Ada compiler, which has been operational since December 1980, uses a procedure call implementation of tasking. It can be easily modified to other implementations. Compilation of Ada tasking into a high-level target language such as Adam facilitates studying questions of correctness and efficiency of various compilation algorithms, and code optimizations specific to tasking, e.g. elimination of unnecessary threads of control. This paper gives an overview of Adam and examples of its use. Emphasis is placed on the differences from Ada. Experience using Adam to build the experimental Ada system is evaluated. Design of a run-time supervisor in Adam is discussed in detail.  相似文献   

19.
倪友聪  吴瑞  杜欣  叶鹏  李汪彪  肖如良 《软件学报》2019,30(5):1269-1287
演化算法通过搜寻GCC编译器最优编译选项集,对可执行代码的能耗进行改进,以达到编译时优化嵌入式软件能耗的目的.但这类算法未考虑多个编译选项之间可能存在相互影响,导致了其解质量不高且收敛速度慢的问题.针对这一不足,设计了一种基于频繁模式挖掘的遗传算法GA-FP.该算法在演化过程中利用频繁模式挖掘得到出现频度高且能耗改进大的一组编译选项,并以此作为启发式信息,设计了"增添"和"删减"两种变异算子,帮助提高解质量和加快收敛速度.与Tree-EDA算法在5个不同领域的8个典型案例下进行对比实验,结果表明,该GA-FP算法不仅能够更有效地降低软件能耗(平均降低2.5%,最高降低21.1%),而且还能在获得不劣于Tree-EDA能耗优化效果的前提下更快地收敛(平均加快34.5%,最高加快83.3%),最优解中编译选项的相关性分析进一步验证了所设计变异算子的有效性.  相似文献   

20.
Guaranteeing correctness of compilation is a vital precondition for correct software. Code generation can be one of the most error-prone tasks in a compiler. One way to achieve trusted compilation is certifying compilation. A certifying compiler generates for each run a proof that it has performed the compilation run correctly. The proof is checked in a separate theorem prover. If the theorem prover is content with the proof one can be sure that the compiler produced correct code. This paper reports on the construction of a certifying code generation phase for a compiler. It is part of a larger project aimed at guaranteeing the correctness of a complete compiler. We emphasize on demonstrating the feasibility of the certifying compilation approach to code generation and focus on the implementation and practical issues. It turns out that the checking of the certificates is the actual bottleneck of certifying compilation. We present a proof schema to overcome this bottleneck. Hence we show the applicability of the certifying compilation approach for small sized programs processed by a compiler's code generation phase.  相似文献   

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

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

京公网安备 11010802026262号