首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
嵌入式实时系统的正确性不仅取决于计算结果的正确性,更取决于产生结果时间的正确性.然而软件不确定的并发执行带来系统时间行为不可预测问题,使得验证复杂度升高,成本增加,为此实时系统领域提出了许多实时编程语言来提高系统的时间可预测性.LET(logical execution time)模型结合了同步模型ZET(zero e...  相似文献   

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

3.
嵌入式实时程序设计中C/C++代码的优化   总被引:5,自引:0,他引:5  
本文简单介绍了嵌入式实时程序设计的特点和嵌入式系统中语言的选择,着重介绍了以下几种在嵌入式实时程序设计中优化C/C++代码的方法。  相似文献   

4.
嵌入式系统编程中的代码优化   总被引:2,自引:0,他引:2  
从嵌入式系统的特点出发 ,阐述了嵌入式系统编程语言的选择以及代码优化的方法。首先分析了嵌入式系统特点和嵌入式系统编程的要求 ,以及嵌入式实时程序设计中语言的选择。接着结合嵌入式软件开发的实践 ,阐述了嵌入式软件开发中代码优化的方法。最后作出总结 ,提出综合利用各种方法和必要性  相似文献   

5.
In this paper we present the syntax, semantics, and compilation of a new system-level programming language called SystemJ. SystemJ is a multiclock language supporting the Globally Asynchronous Locally Synchronous (GALS) model of computation. The synchronous reactive (SR) model is used for synchronous parts of the modelled system, and those parts, which represent individual clock-domains, are coupled asynchronously each to the other on the top-level of system design. SystemJ is based on Java language, which is used to describe “instantaneous” data transformations. Hence, SystemJ is well suited for both software-based embedded and distributed systems. SystemJ offers effective modelling of (1) data transformations through the power of Java, (2) control and synchronous concurrency through the SR paradigm and (3) asynchronous concurrency through clock domains and rendezvous. The language is based on semantics that is amenable to efficient code generation and partial automatic verification. The SystemJ micro-step semantics provide asynchronous and synchronous extensions over the semantics of other SR languages such as Esterel and provide an ideal platform for efficient software implementation.  相似文献   

6.
Android Java应用程序(APP)运行时需依赖Dalvik虚拟机环境,从而影响APP的性能表现.C/C++程序具有极好的硬件适应能力,但不能直接开发Android APP.针对该问题,利用Dalvik虚拟机支持JNI (Java Native Inter-face)调用的特点,设计了基于Qt的Android APP C/C++开发方法框架体系,给出了框架的详细工作机制和解决方案,系统总结了利用C/C++开发Android APP的主要过程和步骤.最后,以Android版机械CAD导教APP的开发工作为例,验证了方法的有效性和可行性,为直接利用C/C++开发Android APP提供了一种新途径.  相似文献   

7.
随着C++语言标准的不断演进,词法语法解析工具如JavaCC等对于很多扩充的新特性以及复杂的语法结构不能做到完全支持,这可能会导致抽象语法树生成错误且不完整;针对这一问题,提出一个针对抽象语法树生成错误的处理框架;首先,通过对JavaCC的扩充,实现一套可以解析C++语言的词法语法分析器,生成抽象语法树并记录报错行;其次,根据报错行寻找所在函数区间即不支持或不匹配的语法片段;最后,通过注释函数区间的方式来跳过不支持或不匹配的语法片段进行错误处理并迭代生成抽象语法树;实验结果表明,对抽象语法树生成进行错误处理后可以更全面的分析代码,抽象语法树完成率上升37.8%,分析行数提高3.9倍。  相似文献   

8.
文中主要阐述了在国外广泛应用的嵌入式系统面向对象编程语言EC ,比较了它与C 的区别,论述了EC 对嵌入式系统编程的优点。  相似文献   

9.
随着实时嵌入式系统的功能越来越复杂,现有的软硬件分离、软硬件协调等实时系统设计方法已经无法满足其系统实现的要求.本文根据模型驱动开发架构MDA和模型集成开发MIC的核心思想,将时间语义结合服务体/执行流(Servant/Exe-Flow Model,简称SEFM)模型,提出了一种基于模型驱动的实时系统设计方法.首先,本文给出了SEFM模型的元模型表达系统的抽象语义,同时使用XML语言和框图语言来描述SEFM模型的具体语法.结合XML解析技术,根据同一抽象语法的不同具体语法能够相互转化,实现了框图语言的代码生成,最后以实时跟车系统设计方案表明该系统实现方法的可行性和正确性.  相似文献   

10.
近年来,C++语言的重要性显著提升,被用于各种苛刻环境下的嵌入式系统中。这很大程度上是因为它与生俱来的灵活性,它所得到的广泛支持和它在多种多样硬件环境之间的移植潜力。然而没有一门编程语言可以保证最终生成的执行代码运行之后和开发人员的初衷完全一致。MISRAC++:2008专注于在嵌入式应用中改善使用C++语言时的安全特性。本文对MISRAC++:2008作了概括的介绍,供嵌入式系统应用工程师学习参考。  相似文献   

11.
国产异构众核处理器是我国打破国际技术壁垒,在高性能计算领域取得突破的关键环节.围绕国产超算的软件生态环境建设,采用智能源码转换的方法盘活海量多核架构的遗产代码是加速软件研发效率,推动领域发展的重要途径.针对国产运算核心不支持C++编译的现状,基于开源的ANTLR语言翻译工具,提出了一种面向异构众核处理器的智能化C++语...  相似文献   

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

13.
14.
A style of programming that uses higher-order functions has become common in C++, following the introduction of the Standard Template Library (STL) into the standard library. In addition to their utility as arguments to STL algorithms, function parameters are useful as callbacks on GUI events, defining tasks to be executed in a thread, and so forth. C++’s mechanisms for defining functions or function objects are, however, rather verbose, and they often force the function’s definition to be placed far from its use. As a result, C++ frustrates programmers in taking full advantage of its own standard libraries. The effective use of modern C++ libraries calls for a concise mechanism for defining small one-off functions in the language, a need that can be fulfilled with lambda expressions.This paper describes a design and implementation of language support for lambda expressions in C++. C++’s compilation model, where activation records are maintained in a stack, and the lack of automatic object lifetime management make safe lambda functions and closures challenging: if a closure outlives its scope of definition, references stored in a closure dangle. Our design is careful to balance between conciseness of syntax and explicit annotations to guarantee safety. The presented design is included in the draft specification of the forthcoming major revision of the ISO C++ standard, dubbed C++0x. In rewriting typical C++ programs to take advantage of lambda functions, we observed clear benefits, such as reduced code size and improved clarity.  相似文献   

15.
16.
This paper presents an object-oriented architecture, called the Model-View-Shape (MVS) architecture, for constructing an Integrated Visual Programming Environment (IVPE), whose constituent tools deal with (fine-grained) language semantics, as well as a mass of graphics-drawing activities. This architecture enforces a layered and loosely-coupled structure, so that the user-interface part of components may be more independent, maintainable, and reusable than those proposed in the original model-view-controller architecture. An MVS class hierarchy, systematically constructed using C++, can be reused and extended with new semantics to rapidly develop new tools for an existing IVPE, or even an IVPE supporting more than one language. The present editors developed can be used to construct programs by specifying the associated flow information in explicit (visual) or implicit (textual) ways, while the (incremental) flow analysers can help analyse incomplete program fragments to locate and inform the user of possible errors or anomalies during programming. © 1998 John Wiley & Sons, Ltd.  相似文献   

17.
从嵌入式系统程序代码优化的必要性出发,介绍了几种在嵌入式系统程序设计中优化C/C++代码的方法.  相似文献   

18.
C++语言是当前十分流行的、面向对象程序设计语言。通过对C++语言的深入研究以及较多的编程实践,总结归纳了C++语言的知识体系和编程中的几个常见问题,比如构造函数、对象指针、const数据和成员的访问属性等,对这些容易搞混淆的问题逐一进行详尽的分析和说明,并解释了其原因所在。通过阅读该文可为编程者带来有益的帮助,以便编程中碰到同类问题时能够解决。  相似文献   

19.
基于Visual C++6.0的机器人控制系统软件实现   总被引:6,自引:0,他引:6  
三自由度插拔机器人控制系统软件根据开放式设计方法,采用Visual C 语言编制控制程序。负责底层伺服驱动的函数库以标准C给出,可以直接被调用;同时,控制软件内嵌入了机器人研究所自行开发的机器人结构化编程语言——HRL语言,用以实现目标规划,它也是基于Visual C 语言开发的。整个控制软件用以完成数据及状态显示、伺服驱动、机器人运动规划,插拔目标的搜索、定位、运动过程模拟显示等任务。  相似文献   

20.
异常机制是C++崭新而高级的特性,比起传统的返回错误代码的做法,异常机制能够针对各种可能的错误提供更有效的解决方法,而且可以使正常代码和错误处理清晰划分开来。关于如何安全、可靠地使用异常机制,MISCRAC++给出了一些相关的规范。  相似文献   

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

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