首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 140 毫秒
1.
COBOL到Java源代码翻译中的数据类型转换*   总被引:1,自引:1,他引:0  
提出了一种功能等价的类型封装和嵌套方法,可以有效地将COBOL数据描述映射到Java类型系统.该方法已在所开发的COBOL2Java翻译系统中进行应用,通过了近400万行的真实银行商用系统的测试.实验结果表明,此方法正确有效,并且提高了生成代码的执行效率和可读性.  相似文献   

2.
随着下一代网格环境的来临,如何将遗产代码迁移到新的平台成为一个亟待解决的问题,该文提出了一种将cobol源代码自动地,功能等价地迁移到Java平台的方法。  相似文献   

3.
代码翻译中PERFORM和GOTO语句复合结构的变换   总被引:2,自引:0,他引:2  
传统语言COBOL从诞生至今已有近50年历史,现存约有1 000亿行代码是用COBOL编写的.维护这些遗产代码的一个有效方法是将其翻译成现代语言,例如Java.其中将COBOL语言中GOTO和PERFORM语句及其复合控制结构消除是翻译过程中的一个关键步骤.提出一种利用switch,while语句来消除GOTO和PERFORM复合控制结构的方法,实现了程序的等价变换.该方法不改变程序的控制结构,保持其可读性,并将代码膨胀率控制到2倍左右.该方法已在所开发的"C2J翻译系统"中进行应用,通过了400万行实际商用程序的测试,结果证明,该方法是正确、有效的.  相似文献   

4.
评估指标在代码合成领域中至关重要.常用的代码评估指标可以分为3种类型:基于匹配、基于语义和基于执行.其中,基于执行的Pass@k指标通过执行测试用例,能够准确判断预测代码的功能准确性.然而,该指标的计算需要大量开销,因此亟需设计一种自动化评估指标,在无需测试用例时仍可评估预测代码的功能准确性.此外,好的评估指标应当具有鲁棒性,即预测代码发生微小改变时,评估指标仍能保持其准确性.为此,提出了一种基于UniXcoder和对比学习的自动化鲁棒指标CodeScore-R,用于评估代码合成的功能准确性. CodeScore-R采用草图化处理、语法等价转换和变异测试等技术手段,有效减轻了标识符、语法结构和运算符对评估结果的干扰.实验结果表明,在Java和Python语言上的代码生成和迁移任务中,CodeScore-R的表现优于其他无需测试用例的评估指标,且更接近Pass@k指标,并具有更强的鲁棒性.  相似文献   

5.
基于MDA的PIM到J2EE平台PSM的转换方法   总被引:7,自引:0,他引:7  
MDA是解决基于不同中间件系统的集成问题。它将不同的系统都结构化成PIM和PSM并针对不同实现技术与平台制订多个映射规则,然后通过这些映射规则及辅助工具将PIM转换成PSM,再将PSM不断求精直至形成最后代码。MDA中的模型转换有4种:PIM到PIM,PIM到PSM,PSM到PSM以及PSM到PIM。其中的PIM到PSM转换是难点。本文提出了一种PIM到J2EE平台的PSM转换的方法:首先将一个用PIM配置图和类图描述的系统根据映射规则转换成J2EE平台下的PSM配置图、类图;然后根据精化规则对PSM模型进一步精化,生成不同的EJB以及构件图,为最后代码的自动生成打下基础。  相似文献   

6.
随着Internet计算技术的迅速发展,将遗产系统迁移到Web平台逐渐成为一种必需.传统的遗产代码通常使用字符终端界面,它与Web图形界面在界面显示和用户交互方面都有着显著的不同.本文实现了一种基于停止等待协议的方法可以将这种字符界面自动化地迁移到Web图形界面.实验表明,此方法可以显著地增加整个转换过程的自动化程度.  相似文献   

7.
二进制翻译是不同体系结构之间软件移植的重要手段。体系结构和硬件环境上的差别,可以通过二进制翻译系统来弥补,在翻译过程中往往使用多条本地指令模拟一条目标指令,翻译代码规模随之显著增加,从而导致被翻译程序的执行效率下降。寄存器作为处理器和内存交换信息的重要存储部件,寄存器的模拟器方式对于程序的性能有着至关重要的影响。为了提高特定平台翻译后代码的执行效率,提出了在动态二进制翻译机制中使用全部寄存器直接映射方法,详细分析了二进制翻译中的上下文切换原理和寄存器访问范围,为异构平台之间寄存器直接映射提供方法指导。利用QEMU模拟器,把x86架构的8个通用寄存器全部的直接映射到MIPS架构的对应寄存器,在此基础上,进行大量的指令翻译规则的简化。实验数据表明,该方法可以有效简化指令翻译,降低代码膨胀率,使得SPEC CINT 2000测试程序在龙芯CPU上翻译后代码运行时间下降了30%-40%。  相似文献   

8.
二进制翻译系统是一种基于软件的跨平台代码迁移系统,它将一种体系结构的二进制代码翻译成另一种体系结构的二进制代码.二进制翻译可以用于解决遗产代码的迁移问题,也可以实现不同硬件平台之间软件的通用.浮点栈的处理已成为以X86为源的二进制翻译的研究中的关键性问题之一,如何处理X86浮点栈问题直接关系到以X86为源的二进制翻译系统的性能.针对X86浮点寄存器栈的特征,提出了一种扩展虚拟栈(extending virtual stack)处理方案.它采用归一的方法,保证了每个基本块中的运算所涉及到的浮点寄存器可以直接映射到目标机器中的浮点寄存器,确保了翻译的效率,并利用翻译时的分析避免了在入口处不必要的判断;同时还给出了在基本块入口处判别一个基本块是否会出现浮点栈上溢和下溢的充分必要条件,为生成更加高效的代码提供了条件.实验表明,它能够在保证正确实现其功能的前提下,获得更好的执行效率.  相似文献   

9.
刘冰 《福建电脑》2010,26(3):64-65
在Java应用开发中,代码的重用得到了越来越多的软件工程师的重视,因为对于某些代码的重用不仅可以提高程序开发的效率,而且还能够将一些比较实用的代码有效地运用到其它的项目中,以节约软件开发的成本、提高软件生产的效率.同时还能够增加代码的可靠性和增强被重用代码与系统函数的其他部分具有较强的一致性。本文就这一问题提出了几个在Java应用开发中能最大化地进行代码重用的解决策略。同时也对代码重用存在的不足进行了深入的分析。  相似文献   

10.
针对企业应用系统开发采用的轻量级Java EE框架的复用与维护问题,在对Hibernate、Spring和Struts三个开源框架分析的基础上,提出了整合三个框架的配置方案。并设计一个基于此方案的快速开发框架。实现的快速开发框架能自动将零散的框架自动集成,并根据数据表及代码模板生成各逻辑层的初始代码,为新项目生成一个稳定的初始开发平台。  相似文献   

11.
At first glance, asking whether Cobol exists might seem like a ploy, a setup for describing how the billions of lines of Cobol in the world are responsible for almost every facet of daily life: from paychecks and utility bills to the entire computer based corporate infrastructure. Yet, although thousands of Cobol programmers are alive and well, keeping the wheels of commerce turning, there is a large contingent in the software world for whom Cobol does not exist. Academia barely teaches it, Java and C programmers ignore it, and many look with disdain both at Cobol and the lowly Cobol programmer toiling away at mundane data processing tasks. The irony is that more than the Java, C, or language-of-the-month programmers, Cobol programmers understand data, and in case you haven't noticed, data is back. Not that data ever went away. It's still the driving force behind most of the applications we write. It's just that the Internet has forced the data issue: how to integrate and move data across platforms, build data warehouses and repositories for data mining and e-commerce, and share data and maintain semantics. These are hard problems; ones that Cobol and Cobol programmers have been wrestling with since the 1960s. Now that we perceive data as being “hot”, Cobol is taking on a new lustre and even getting a second look, especially given the notoriously poor data handling capabilities of “cooler” languages such as C, C++, and Java  相似文献   

12.
Various attacks are designed to gain access to the assets of Java Card Platforms. These attacks use software, hardware or a combination of both. Manufacturers have improved their countermeasures to protect card assets from these attacks. In this paper, we attempt to gain access to assets of a recent Java Card Platform by combining various logical attacks. As we did not have any information about the internal structure of the targeted platform, we had to execute various attacks and analyze the results. Our investigation on the targeted Java Card Platform lead us to introduce two generic methods to gain access to the assets of Java Card Platforms. One of the new methods we present in this paper is based on the misuse of the Java Card API to build a type confusion and get access to the objects (including cryptographic keys) of a Java Card applet. The other method is a new approach to get access to the return address of the methods in Java Cards with Separate Stack countermeasure. We also propose a pattern that the targeted platform uses to store data and code of applets on the card plus the ability to read and write in the data and code area of the applets in different security contexts. These new attacks occur even in the presence of countermeasures such as Separate Stack for kernel and user data, indirect mapping for objects addressing and firewall mechanisms.  相似文献   

13.
Goyla  F.P. 《Software, IEEE》2000,17(2):37-41
Dusty Cobol card decks, difficult-to-maintain programs, and software generally incompatible with current state-of-the-art application frameworks: that's legacy. Or is it? Start with the cleansing effect of Y2K, add the Internet and e-commerce, and throw in component technologies such as Corba, COM, and Enterprise JavaBeans, the standardization effort behind XML, and the resurgent interest in data, and you'll find new meaning and vitality for the term legacy. Estimated at over 100 billion lines of code, most of it Cobol, it drives the world's infrastructure. The end result is a new appreciation of legacy and a search for ways to capitalize on its potential. Cobol programs and data are being viewed in a new positive light with options for interconnection and integration for both code and data  相似文献   

14.
An abstraction-and-reimplementation paradigm is presented in which the source program is first analyzed in order to obtain a programming-language-independent abstract understanding of the computation performed by the program as a whole. The program is then reimplemented in the target language based on this understanding. The key to this approach is the abstract understanding obtained. It allows the translator to benefit from an appreciation of the global features of the source program without being distracted by what are considered irrelevant details. Knowledge-based translation via abstraction and reimplementation is described as one of the goals of the Programmer's Apprentice project. A translator which translates Cobol programs into Hibol (a very-high-level business data processing language) has been constructed. A computer which generates extremely efficient PDP-11 object code for Pascal programs has been designed  相似文献   

15.
叶益林  吴礼发  颜慧颖 《计算机科学》2017,44(6):161-167, 173
原生代码已在Android应用中广泛使用,为恶意攻击者提供了新的攻击途径,其安全问题不容忽视。当前已有Android恶意应用检测方案,主要以Java代码或由Java代码编译得到的Dalvik字节码为分析对象,忽略了对原生代码的分析。针对这一不足,提出了一种基于双层语义的原生库安全性检测方法。首先分析原生方法Java层语义,提取原生方法函数调用路径,分析原生方法与Java层的数据流依赖关系以及原生方法函数调用路径的入口点。对于原生代码语义,定义了数据上传、下载、敏感路径读写、敏感字符串、可疑方法调用5类可疑行为,基于IDA Pro和IDA Python对原生代码内部行为进行自动分析。使用开源机器学习工具Weka,以两层语义作为数据特征,对5336个普通应用和3426个恶意应用进行了分析,最佳检测率达到92.4%,表明所提方法能够有效检测原生库的安全性。  相似文献   

16.
Although recent Internet, Java, and OO trends threaten Cobol's dominance, industry will continue to need the language and its programmers for development as well as maintenance-especially once OO Cobol becomes an official standard. Thus, Cobol training remains a priority. By leveraging their existing knowledge, Cobol programmers can make a smooth transition to object oriented development and Java programming  相似文献   

17.
Virtual execution environments, such as the Java virtual machine, promote platform‐independent software development. However, when it comes to analyzing algorithm complexity and performance bottlenecks, available tools focus on platform‐specific metrics, such as the CPU time consumption on a particular system. Other drawbacks of many prevailing profiling tools are high overhead, significant measurement perturbation, as well as reduced portability of profiling tools, which are often implemented in platform‐dependent native code. This article presents a novel profiling approach, which is entirely based on program transformation techniques, in order to build a profiling data structure that provides calling‐context‐sensitive program execution statistics. We explore the use of platform‐independent profiling metrics in order to make the instrumentation entirely portable and to generate reproducible profiles. We implemented these ideas within a Java‐based profiling tool called JP. A significant novelty is that this tool achieves complete bytecode coverage by statically instrumenting the core runtime libraries and dynamically instrumenting the rest of the code. JP provides a small and flexible API to write customized profiling agents in pure Java, which are periodically activated to process the collected profiling information. Performance measurements point out that, despite the presence of dynamic instrumentation, JP causes significantly less overhead than a prevailing tool for the profiling of Java code. Copyright © 2008 John Wiley & Sons, Ltd.  相似文献   

18.
邹志斌  李允  张晓先 《计算机工程》2014,(1):280-282,286
TTCN-3数据系统的实现在遵照TTCN-3标准的基础上,还需要支持数据兼容等特性。针对该问题,给出一种TTCN-3数据系统到Java的翻译方案。利用Java语言具有的继承、多态等面向对象的特色,借鉴抽象工厂设计模式,通过检视分析翻译生成代码。证明该方案符合TTCN-3标准规定,并清晰地体现数据系统中的数据类型和数据值的功能区分。该方案支持不同数据类型的兼容和数据值之间的比较,并易于扩展。  相似文献   

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

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