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

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.
Data abstractions have been proposed as a means to enhance program modularity. The implementation of such new features to an existing language is typically handled by either rewriting large portions of an existing compiler or by using a preprocessor to translate the extensions into the standard language. The first technique is expensive to implement while the latter is usually slow and clumsy to use. In this paper a data abstraction addition to PL 1 is described and a hybrid implementation is given. A minimal set of primitive features are added to the compiler and the other extensions are added via an internal macro processor that expands the new syntax into the existing language.  相似文献   

4.
This report describes the development of a transportable extendable self-compiler for the language SIMPL-T. SIMPL-T is designed as the base language for a family of languages. The structure of the SIMPL-T compiler and its transportable bootstrap are described. In addition, the procedures for generating a compiler for a new machine and for boot-strapping the new compiler on to the new machine are demonstrated.  相似文献   

5.
何群  陈英  周激流 《计算机工程》2005,31(14):99-101,166
提出了一种新的面向对象语言编译器自动测试的方法和过程,并在此基础上设计开发了面向对象编译器自动测试工具(O_OCTT)。测试用例的自动生成是编译器自动测试工具的核心,介绍了C 编译器测试用例自动生成的手段和方法,阐述了。O_OCTT设计与实现过程中的关键技术。  相似文献   

6.
This paper presents a systematic approach to the problem of generating good code with a compiler that is easy to construct. A compiler structure is proposed which relies on interprocedural data flow analysis, global optimization, and an intermediate language schema to simplify the task of writing the code generating portions of a compiler without sacrificing code quality. This structure is contrasted with a more conventional structure to explore the reasons why the new structure solves several problems inherent in the conventional structure. Further advantages which accrue from the new structure are also presented.  相似文献   

7.
Aristotle long ago divided kinds of study into techn and epistm,which we can roughly translate into the modern terms ‘art’and ‘science’. It is certainly the case that computationaldialectologists do well with the Art (techn), in our technicalconstruction and execution of statistical experiments, and wehave two different prominent models to choose from, each onecorresponding to a mode of scientific discovery, either to deductiveor to inductive scientific procedure. But that in itself shouldnot be the whole story. The Science (epistm) of computationaldialectology lies in the creation of arguments from our statisticalresults that are appropriate to the scientific procedure thatmotivates us. It is not so clear that computational dialectologistshave done so well with their Science. What do the results ofthe technical work really mean? In what way are they associatedwith particular choices of linguistic theory? Is it the casethat, after all of our technical hard work, we find only whatwe are looking for? In this paper, I will suggest that an appropriateuse of the technical results of computational dialectology requiresthat practitioners take a more subtle approach to the theorythat motivates the study in the first place, especially to therelationship between perception and production of language.  相似文献   

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.
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.  相似文献   

10.
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.  相似文献   

11.
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.  相似文献   

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

15.
We present a methodology for compiler synthesis based on Mosses-Watt's action semantics. Each action in action semantics notation is assigned specific “analysis functions”, such as a typing function and a binding-time function. When a language is given an action semantics, the typing and binding-time functions for the individual actions compose into typing and binding-time analyses for the language; these are implemented as the type checker and static semantics processor, respectively, in the synthesized compiler. Other analyses can be similarly formalized and implemented. We show a sample language semantics and its synthesized compiler, and we describe the compiler synthesizer that we have developed.  相似文献   

16.
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.  相似文献   

17.
AGDL is a definition language for attribute grammars. It is a specification language usedto generate a compiler automatically. AGDL, whose rules are easy to read, is an applicativelanguage with abstract data types, and it will be used as an important tool language to developcompiler generators by NCI.  相似文献   

18.
Queue computing is an attractive alternative for the compulsive demand of high-performance architectures. Code generation for queue machines has some problems but the solutions have not been studied thoroughly. A new parallel queue computation model, 2-offset P-Code queue computation model, is presented together with a new code generation algorithm. The code generation algorithm takes leveled DAGs as input and produces 2-offset P-Code assembly. We also developed a queue compiler to evaluate the new algorithm and compiled a set of C language benchmark programs for the 2-offset P-Code. The queue compiler generates between 8.55% less instructions and 10.55% more instructions than an actual MIPS32 compiler for the compiled programs.  相似文献   

19.
覃安  符红光 《计算机工程》2006,32(16):83-85,9
计算机代数系统(Computer Algebra System,CAS)是集大整数运算和符号运算于一体的计算平台,这方面的代表软件有Maple和Mathematica。然而,在计算机代数系统的设计中,编译器的设计与实现始终是一个关键和难点。GiNaC是Linux平台上开放源码的符号计算包,该文以它为基础提出了一种新型CAS编译器的设计方法,并在Linux平台上实现。新的CAS编译器兼容Maple编程语言, 对比测试结果显示它的效率并不逊色于Maple。  相似文献   

20.
The task of designing and implementing a compiler can be a difficult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly isolated and specified as term rewrites. This has several advantages. The correctness of the compiler depends solely on a small set of rewrite rules that are written in the language of formal mathematics. In addition, the logical framework guarantees the preservation of scoping, and it automates many frequently-occurring tasks including substitution and rewriting strategies. As we show, compiler development in a logical framework can be easier than in a general-purpose language like ML, in part because of automation, and also because the framework provides extensive support for examination, validation, and debugging of the compiler transformations. The paper is organized around a case study, using the MetaPRL logical framework to compile an ML-like language to Intel x86 assembly. We also present a scoped formalization of x86 assembly in which all registers are immutable.  相似文献   

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

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