代码翻译中PERFORM和GOTO语句复合结构的变换
DOI:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

Supported by the National Natural Science Foundation of China under Grant No.60103006 (国家自然科学基金)


Converting the Compound Control Structure of PERFORM and GOTO Statements in Code Translation
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

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

    Abstract:

    COBOL, a traditional language, has been presented for more than 50 years. There are at least 100 billion lines of legacy codes written in COBOL up to now. An effective way to maintain these legacy codes is to translate them into modern languages, such as Java. While translating, it is a key-step to eliminate ‘OTO’and‘ERFORM’and their compound control structures in COBOL programs. A method which uses ‘witch’and ‘hile’statements is proposed in this paper instead of ‘OTO’and ‘ERFORM’and their compound control structures. It preserves the readability because the target Java program has the similar control structures. The code size of the target program expands only 2 times in average. This method is applied in the ‘C2J translation system’ It is proved sound and effective since 4 million lines of real COBOL program have been translated and its target program has passed the test.

    参考文献
    相似文献
    引证文献
引用本文

武成岗,张兆庆,乔如良,冯晓兵,高琳,石学林,蒋弘山,崔慧敏.代码翻译中PERFORM和GOTO语句复合结构的变换.软件学报,2004,15(4):475-486

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2003-08-26
  • 最后修改日期:2003-11-11
  • 录用日期:
  • 在线发布日期:
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号