首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
We present a technique for implementing visual language compilers through standard compiler generation platforms. The technique exploits eXtended Positional Grammars (XPGs, for short) for modeling the visual languages in a natural way, and uses a set of mapping rules to translate an XPG specification into a translation schema. This lets us generate visual language parsers through standard compiler–compiler techniques and tools like YACC. The generated parser accepts exactly the same set of visual sentences derivable through the application of XPG productions. The technique represents an important achievement, since it enables us to perform visual language compiler construction through standard compiler–compilers rather than specific compiler generation tools. This makes our approach particularly appealing, since compiler–compilers are widely used and rely on a well-founded theory. Moreover, the approach provides the basis for the unification of traditional textual language technologies and visual language compiler technologies.  相似文献   

2.
尚书  甘元科  石刚  王生原  董渊 《软件学报》2017,28(5):1233-1246
同步数据流语言(如Lustre)近年来在航空、高铁、核电等安全攸关领域得到广泛应用.这些领域对相关开发工具本身的安全性有着相当高的要求.为尽力解决好”误编译”问题,近期人们借助reliable-by-construction辅助定理证明器实现常规命令式语言编译器的构造和验证取得了很大的成功,如CompCert C编译器.L2C是基于这种方法开发的可信编译器,它以扩展的Lustre语言为源语言,以Clight (CompCert中的C语言子集)为目标语言.就我们所知,L2C是同类工作中唯一面向实际工业应用的同步数据流语言编译器.本文重点介绍L2C编译器的核心翻译步骤及其设计与实现过程中考虑的主要问题和相关经验.  相似文献   

3.
This paper addresses the issue of compiler correctness. The approach taken is to systematically construct a correct compiler for a language from a formal semantic definition of the language. For this purpose, an operational semantics of a language is chosen as the basis for the approach. That is, the compiler for a language is derived from an interpreter of the language. The derivation process uses the notion of mixed computation proposed by Ershov. Briefly stated, one begins interpreting and when a primitive state changing instruction is about to be executed, the instruction is emitted as code instead. The correctness of all compilers produced by the method is guaranteed by proving the derivation rules correct. This proof is a one-time task for each specification language. The specification language studied in this paper is the Vienna Definition Language (VDL). The object code generated by the compiler is in an intermediate language close to an assembly language. Therefore, the translation from the intermediate language into the assembly language should be straightforward.  相似文献   

4.
Formal notations for the specification of the syntax and the dynamic semantics of languages exist and are of great benefit to the compiler writer. However, formal notations for the static semantics of languages have tended to be tools of the language designer and of little practical significance to the compiler writer. This paper describes how a particular notation was used to assist in the implementation of a Cobol compiler and of an interpreter for a simulation language.  相似文献   

5.
该文提出了一种用于微处理器体系结构级测试程序自动生成的约束描述语言,并设计实现了该语言的编译器,详细介绍了语言特性以及为了生成合法体系结构级测试程序,编译器所做的特殊处理。最后给出了利用该语言对DLX微处理器进行验证的实验和结果。  相似文献   

6.
采用面向对象技术设计可视化程序设计语言的编译系统,通过对复杂的可视化图片语法进行分析,将各语法现象以语法单元类的形式进行抽象分类,提出了编译器-编译器的设计策略,给出了从可视化图片设计语言到伪指令代码的解决方法.主要研究在面向对象的编辑环境中如何实现满足硬件设备控制器的稳定、高效的编译系统.通过将可视化程序语言分析器(VPLPG)和小型的类C编译(LCC)器配合使用最终实现可视化程序设计语言的编译系统.  相似文献   

7.
魏兰  李文锋 《计算机工程》2007,33(13):104-106
采用面向对象技术设计可视化程序设计语言的编译系统,通过对复杂的可视化图片语法进行分析,将各语法现象以语法单元类的形式进行抽象分类,提出了编译器-编译器的设计策略,给出了从可视化图片设计语言到伪指令代码的解决方法。主要研究在面向对象的编辑环境中如何实现满足硬件设备控制器的稳定、高效的编译系统。通过将可视化程序语言分析器(VPLPG)和小型的类C编译(LCC)器配合使用最终实现可视化程序设计语言的编译系统。  相似文献   

8.
A demonstrably correct compiler   总被引:2,自引:0,他引:2  
As critical applications grow in size and complexity, high level languages, rather than better-trusted assembly languages, will be used in their development. This adds potential for extra errors to creep in, especially in the now necessary compiler. To avoid these new errors, it is necessary to have a formal specification of the high level language, and a formal development of its compiler. We outline what we believe is a practical route for achieving a demonstrably correct compiler, and describe a prototype compiler we have built by this route for a small, but non-trivial, language.  相似文献   

9.
10.
A system based on the notion of a flow graph is used to specify formally and to implement a compiler for a lazy functional language. The compiler takes a simple functional language as input and generates C. The generated C program can then be compiled, and loaded with an extensive run-time system to provide the facility to experiment with different analysis techniques. The compiler provides a single, unified, efficient, formal framework for all the analysis and synthesis phases, including the generation of C. Many of the standard techniques, such as strictness and boxing analyses, have been included.  相似文献   

11.
Compiling code for the Icon programming language presents several challenges, particularly in dealing with types and goal-directed expression evaluation. In order to produce optimized code, it is necessary for the compiler to know much more about operations than is necessary for the compilation of most programming languages. This paper describes the organization of the Icon compiler and the way it acquires and maintains information about operations. The Icon compiler generates C code, which makes it portable to a wide variety of platforms and also allows the use of existing C compilers for performing routine optimizations on the final code. A specially designed implementation language, which is a superset of C, is used for writing Icon's run-time system. This language allows the inclusion of information about the abstract semantics of Icon operations and their type-checking and conversion requirements. A translator converts code written in the run-time language to C code to provide an object library for linking with the code produced by the Icon compiler. The translation process also automatically produces a database that contains the information the Icon compiler needs to generate and optimize code. This approach allows easy extension of Icon's computational repertoire, alternate computational extensions, and cross compilation.  相似文献   

12.
同步语言Lustre所描述的反应系统通常应用在航空航天、国防建设等领域,对系统的正确性和安全性都要求很高。如果系统在运行时出现了正确性问题,很可能会导致系统崩溃,产生非常严重的后果。系统中的任何一个词法错误或者语法错误都应该受到重视,而且应该被及时纠正。因此,对Lustre语言进行正确的编译是十分重要的。传统的Lustre语言的编译器都采用OCaml语言描述,无法保证所有人员都能够很容易地理解和使用,而且,需要耗费开发人员大量的时间和精力。基于上述问题,提出了一种新型的Lustre语言编译器。新型的Lustre语言编译器前端主要采用C++语言进行描述,并对生成的抽象语法树的结构进行重新定义,简化了编译的过程。该编译前端会对一个经典的Lustre语言模型进行检测,通过对检测的结果进行分析,验证了该编译前端的可行性。  相似文献   

13.
VLIW机器在单个机器周期中同时发射并执行多个的并行操作,从而获得较高的指令级并行度,这些操作之间的依赖分析和调度工作则被完全交给相应的编译器执行,因此VLIW的并行性能能否充分发挥取决于VLIW体系结构相关编译器的质量。GNU开发的GCC是被最广泛使用的编译系统之一,它具有多语言、多平台支持的能力和开放的结构,能够运用各种成熟的常规编译优化技术生成高效的代码。文章分析了VLIW及GCC的结构特点,提出了一种基于GCC的VLIW编译系统设计方案,利用GCC进行RTL中间代码一级的体系结构无关优化和少量体系结构相关优化,在汇编代码一级针对VLIW结构进行体系结构相关的优化,从而充分利用GCC的成熟编译技术快速开发高效的VLIW多语言编译系统。  相似文献   

14.
This paper is the case study of a compiler for a very large language implemented for a minicomputer. Although the language is special purpose and perhaps not of general interest, the techniques used and the performance obtained make the compiler itself somewhat interesting.  相似文献   

15.
16.
语言机制是提供抽象的核心手段,但并不能容易地扩展,给软件的编写和维护带来困难,我们定义了一个可扩展的编译体系结构-X体系结构,目标是支持用户扩展语言机制,编码领域抽象和优化技巧。它提供了一个可扩展的语言-X语言,允许用户程序访问程序的多个视图(如AST,类图,类型,上下文等),并用该语言定义语言扩展,逐步提高该语言的抽象能力,得到高效的定制编译系统,本文中展示了新的语言扩展-程序枚举的实现过程,表  相似文献   

17.
We have previously developed a verified algorithm for compiling programs written in an occam-like language into delay-insensitive circuits. In this paper we show how to retarget our compiler for clocked circuits. Since verifying a hardware compiler is a huge effort, it is significant that we are able to retarget our compiler proof without recreating that effort.The chief contribution of this paper is the methodology used for retargeting our compiler which is based upon a new model for systems with both synchronous and asynchronous behaviour. The retargeting proof utilizes both theorems proved algebraically by hand and theorems proved automatically by state exploration. The technique of protocol conversion is used extensively in modularizing the proof of the clocked implementation.  相似文献   

18.
The programming language LISP is usually implemented via an interpreter, and a compiler is added later as a LISP program. However, all such production compilers known to the authors produce explicit instructions for the given computer being used. This paper describes the development of a portable LISP compiler in the sense that only Standard LISP functions are used in its definition and the output is a sequence of abstract machine codes, easily mapped to instruction sequences on current computers. The resulting code is quite efficient, demonstrating once again the maxim that most compiler optimization is largely machine independent.  相似文献   

19.
M. Richards 《Software》1971,1(2):135-146
Methods of achieving program portability are discussed, with particular reference to the mobility of compilers. The method of transferring the BCPL compiler is then described including the specification of OCODE which is the language used as an interface between the machine independent and machine dependent parts of the compiler.  相似文献   

20.
In a classic paper1 Wirth describes a language which combines the readability of ALGOL 60 with the flexibility and degree of control of a conventional assembly language. This paper gives an outline of a similar language for a small 16-bit computer—the Honeywell DDP-516. Implementing the compiler in its own language by recoding an ALGOL version of the compiler has shown that the language is suitable for large systems. With the compiler written in a high-level language, many enhancements have been possible even though these were not envisaged in the original coding This use of the language clearly demonstrated that a high-level assembly language can be a very effective tool for a small machine as well as for computers like the 360 series.  相似文献   

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

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