首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 406 毫秒
1.
随着安全关键系统对计算性能要求的日趋提高,能够提供更强计算能力而又减少电子设备的体积、重量和功耗的多核处理器将在安全关键领域得到广泛应用.同步语言能够表达确定性并发行为且具有精确时间语义等特性,适用于安全关键软件的建模和验证.目前,同步语言SIGNAL编译器主要支持串行代码生成,较少关注多线程代码生成.提出一种同步语言SIGNAL多线程代码生成工具.首先将SIGNAL程序转换为经过时钟演算的S-CGA中间程序;之后将S-CGA中间程序转换为时钟数据依赖图以分析依赖关系;然后对时钟数据依赖图进行拓扑排序划分,并针对划分结果提出优化算法和基于流水线方式的任务划分方法;最后将划分结果转换为虚拟多线程结构并进一步生成可执行多线程C/Java代码.通过在多核处理器上的实验,验证了所提方法的有效性.  相似文献   

2.
龚雪容  生拥宏  沈亚楠 《计算机应用》2006,26(10):2473-2475
着重论述了串行程序并行化过程中的数据收集部分代码的自动生成。提出利用等价类的方法获取数据的最后写关系,并建立包括计算划分、循环迭代和数据最后写关系的不等式限制系统,最后利用FME消元法对不等式限制系统进行消元处理,最终实现数据收集代码的自动生成。  相似文献   

3.
分析了代码依赖可视化在智能化软件开发中的作用,在总结代码依赖特点和信息可视化系统一般流程的基础上,提出了代码依赖可视化系统的设计.该系统使用力导向节点连接图和层次边聚合图作为可视化形式,基于对两种可视化形式布局特点的深入分析,分别针对力导向节点连接图和层次边聚合图创造了过滤子节点和聚合叶节点的交互设计.在使用多种软件技术实现了代码依赖可视化原型系统dpViz之后,将系统试用于企业软件开发中,实验结果表明该可视化原型系统可有效增进代码分析效率.  相似文献   

4.
杨鹤标  陈力 《计算机工程》2011,37(23):72-74
为解决智能学习系统查询语言的转化问题,提出一种自然语言向SQL代码转化的方法。利用所建立的字典扫描单词和理解语义,采用改进后的单词提取技术扫描自然语言串,以生成语义依赖树,并将其语义关系划分为若干独立的集合块,通过对该集合块遍历生成与自然语言等价的SQL代码。实验结果表明,该转化方法简单有效。  相似文献   

5.
若自动生成的并行化代码中包含过多的冗余代码,将导致代码膨胀,同时增加不必要的时间开销。该文通过对计算划分不等式和依赖关系不等式进行傅立叶消元,消除并行化代码中的冗余通信部分,实现通信优化。测试结果表明,与通信优化前的代码相比,消除后的并行代码量减少了10%~30%,处理器数目相同的情况下加速比平均达到1.12。  相似文献   

6.
代码注释可以帮助开发人员理解代码的功能和实现方法。代码注释生成模型可以自动识别代码中的关键信息,并生成相关注释,提高代码的可读性和可维护性。现有的代码注释生成模型通常只使用抽象语法树结构信息来表示代码,导致模型生成注释质量不高。提出一种融合多结构信息的代码注释生成模型,该模型在代码抽象语法树的基础上,增加了数据流图结构信息来表示代码。模型使用Transformer的编码器对抽象语法树序列进行编码,捕获代码全局信息。使用图神经网络对数据流图进行特征提取,提供变量之间的计算依赖关系等信息。然后使用跨模态注意力机制融合抽象语法树和数据流2种特征,经过Transformer的解码器生成相应的注释。实验结果表明,与6种主流模型相比,所提出的模型在Java和Python数据集上的BLEU、METEOR和ROUGE-L指标得分均有提高,生成的注释也具有良好的可读性。  相似文献   

7.
并行循环分为DOALL和DOACROSS。DOACROSS循环携带数据依赖,在并行执行时需要通信支持,对于可以精确分析依赖关系的DOACROSS循环可通过流水并行方式提高性能。该文针对流水并行代码的自动生成进行讨论,包括数据依赖关系图和流水关系图的建立、流水并行判别准则和流水代码的自动生成等。实验证明流水并行后能获得较好的加速比。  相似文献   

8.
赵博  赵荣彩  徐金龙  高伟 《计算机科学》2015,42(1):50-53,58
为了充分发挥高性能计算机的计算能力,缓解程序员设计和编写并行程序的压力,扩充可用软件集合,设计并实现了利用交互界面深入挖掘程序中的可向量化语句,优化生成代码中的向量化语句,提高生成代码的执行效率.该方法对充分发挥高性能计算机的计算能力,增强系统可用性和扩展应用范围具有重要的意义,同时能够提供有效的辅助手段和工具支持.渐进式智能回溯向量化代码调优架构通过对用户提交的串行程序进行程序分析和变换,采用串行程序分析、数据依赖分析、向量化分析等技术手段,根据分析结果对程序进行变换和优化,自动生成最终的向量化代码.该方法通过分析串行程序中潜在的并行性,将其自动变换为等价的向量化代码形式,大大简化了程序员的工作.  相似文献   

9.
付善庆  李征  赵瑞莲  郭俊霞 《软件学报》2022,33(11):3930-3943
在软件工程领域,代码补全是集成开发环境(integrated development environment,IDE)中最有用的技术之一,提高了软件开发效率,成为了加速现代软件开发的重要技术.通过代码补全技术进行类名、方法名、关键字等预测,在一定程度上提高了代码规范,降低了编程人员的工作强度.近年来,人工智能技术的发展促进了代码补全技术的发展.总体来说,智能代码补全技术利用源代码训练深度学习网络,从语料库学习代码特征,根据待补全位置的上下文代码特征进行推荐和预测.现有的代码特征表征方式大多基于程序语法,没有反映出程序的语义信息.同时,目前使用到的网络结构在面对长代码序列时,解决长距离依赖问题的能力依旧不足.因此,提出了基于程序控制依赖关系和语法信息结合共同表征代码的方法,并将代码补全问题作为一个基于时间卷积网络(time convolution network,TCN)的抽象语法树(abstract grammar tree,AST)节点预测问题,使得网络模型可以更好地学习程序的语法和语义信息,并且可以捕获更长范围的依赖关系.实验结果表明,该方法比现有方法的准确率提高了约2.8%.  相似文献   

10.
代码克隆检测是软件工程中的基础研究,在软件分析和维护方面有着广泛应用。目前对于有文本差异的高级别(即学术界定义的级别3和级别4)克隆检测,现有方法存在检出率(回收率)不高的问题。基于程序依赖图PDG的检测方法是高级别克隆检测的一类重要方法,但这类方法依赖子图同构的精确图匹配算法,算法时间复杂度高且回收率较低。为此,提出了一种新的高级别代码克隆检测方法,使用基于 Weisfeiler-Lehman图核的非精确图匹配算法进行代码克隆检测。实验结果表明,与已有的代码克隆检测方法相比, 该方法可以检出更多的高级别克隆且计算时间较短。  相似文献   

11.
The decomposition slice graph and concept lattice are two program representations used to abstract the details of code into a higher-level view of the program. The decomposition slice graph partitions the program into computations performed on different variables and shows the dependence relation between computations, holding when a computation needs another computation as a building block. The concept lattice groups program entities which share common attributes and organizes such groupings into a hierarchy of concepts, which are related through generalizations/specializations. This paper investigates the relationship existing between these two program representations. The main result of this paper is a novel program representation, called concept lattice of decomposition slices, which is shown to be an extension of the decomposition slice graph, and is obtained by means of concept analysis, with additional nodes associated with weak interferences between computations, i.e., shared statements which are not decomposition slices. The concept lattice of decomposition slices can be used to support software maintenance by providing relevant information about the computations performed by a program and the related dependences/interferences, as well as by representing a natural data structure on which to conduct impact analysis. Preliminary results on small to medium size code support the applicability of this method at the intraprocedural level or when investigating the dependences among small groups of procedures.  相似文献   

12.
C反编译控制流分析——非结构化代码的处理   总被引:1,自引:0,他引:1  
本文分析了程序代码中四种基本的非结构化形式及在反编译控制流分析时,对这四种非结构化形式的处理。保证反编译出来的高级程序可读性好,保持原程序的结构。本文还介绍了对主要非结构化形式的结构化变换及break和Continue的C语言特性的恢复。用GoTo语句处理一些非结构化的情况。  相似文献   

13.
一种有效的编译优化代码移动算法   总被引:1,自引:0,他引:1  
代码移动方法是编译程序全局优化的一个关键技术,本文将介绍一种新的代码移动算法,用此算法就可实现公共子表达式的删除和循环不变运算的移动,而且此算法无需检测循环控制结构,只要通过数据流分析就可实现代码移动,因此这种方法十分有效。  相似文献   

14.
Abstract

The run code is easy to generate on-line from a video signal but the chain code is often more useful. A simple, fast algorithm is presented for constructing chain code from run code. The algorithm defines the order of preference of the next move for a “bug,” given its most recent move. The task for this bug is to travel right around the outermost edge elements of the object whose silhouette appears in the binary image. It is assumed that there is only one such object which may contain holes, although these are not coded by this simple algorithm. The algorithm generates a 4-value code whereas it is more usual to use an 8-value chain code which can be created by a simple method described by Freeman in his definitive work on the chain code.  相似文献   

15.
Abstract

Developing parallel codes for computing the nonlinear flow in multiaquifer porous systems is an important task both for improving model efficiency and for performing large real-life simulations. Multiaquifer systems consist of sandy and clayey alternating layers. In this paper, highly compressible multiaquifer systems are considered, where some hydraulic parameters depend on the potential head, thus the flow inside some layers is governed by nonlinear equations. An effective procedure for solving these equations is developed, relying upon The partition of the solution procedure into layer-wise steps. By assigning to each processor the computation of the flow inside a suitable set of layers, the iterative solution procedure can be efficiently implemented on a parallel super-computer. Using such a domain decomposition strategy, a satisfactory degree of parallelization is achieved when computing the flow in a realistic nonlinear multiaquifer system, employing a CRAY T3D massively parallel computer. Performing test simulations on real-life multiaquifer systems, the recorded speed-ups are as large as 1.89, 3.34. 5.37, with 2, 4, 8 processors, respectively. The importance of load balance and information exchange in casting the parallel performances of the code is also analyzed.  相似文献   

16.
随着软件生态系统和开源社区的发展,代码常在多个软件系统中复制、传播和演化,给软件系统带来了软件质量的不确定性和风险,因此,高效地查找软件系统代码可能的来源是当前研究的热点之一。提出一种基于代码克隆检测的代码来源分析方法,将目标软件代码以方法为单位切割为代码片段,转换为词袋后,在大规模代码资源库中进行并行化代码克隆检测,从而实现方法粒度的代码来源分析。基于该方法,设计并实现了一个代码来源分析工具。该工具能自动分析被测软件项目代码与代码资源库中多个项目以及版本之间的可能来源。实验结果表明,该系统能够有效地找出目标项目在大规模代码库中的代码来源信息,辅助软件维护人员理解和维护代码。  相似文献   

17.
Data dependence and its application to parallel processing   总被引:8,自引:0,他引:8  
Data dependence testing is required to detect parallelism in programs. In this paper data dependence concepts and data dependence direction vectors are reviewed. Data dependence computation in parallel and vector constructs as well as serialdo loops is covered. Several transformations that require data dependence are given as examples, such as vectorization (translating serial code into vector code), concurrentization (translating serial code into concurrent code for multiprocessors), scalarization (translating vector or concurrent code into serial code for a scalar uniprocessor), loop interchanging and loop fusion. The details of data dependence testing including several data dependence decision algorithms are given.  相似文献   

18.
傅立国  姚远  丁锐 《计算机应用》2014,34(4):1014-1018
不规则计算在大规模并行应用中广泛存在。在面向分布存储结构的自动并行化过程中,较难在编译时为不规则循环生成并行代码。并行代码中的通信代码对程序运行结果的正确性以及加速效果有着严重的影响。通过分析程序的数组重分布图,使用部分冗余的通信方式来维持不规则数组访问的生产者消费者关系,可以在编译时为一类常见的不规则循环自动生成有效的通信代码。该方法使用计算分解和数组引用的访问表达式求解不规则数组在各处理器的本地定义集作为通信的数据集,分析针对此类不规则循环划分的通信策略,继而生成相应的通信代码。实验测试的结果取得了预期的加速效果,验证了方法的有效性。  相似文献   

19.
The computation of program slices on Web applications may be useful during debugging, when the amount of code to be inspected can be reduced, and during understanding, since the search for a given functionality can be better focused. The system dependence graph is an appropriate data structure for slice computation, in that it explicitly represents all dependences that have to be taken into account in slice determination.Construction of the system dependence graph for Web applications is complicated by the presence of dynamically generated code. In fact, a Web application builds the HTML code to be transmitted to the browser at run time. Knowledge of such code is essential for slicing. In this paper an algorithm for the static approximation of the dynamically generated HTML code is proposed. The concatenations of constant strings and variables are propagated according to special purpose flow equations, allowing the estimation of the generated code and the refinement of the system dependence graph.  相似文献   

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

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