Computer Engineering and Applications ›› 2009, Vol. 45 ›› Issue (30): 65-68.DOI: 10.3778/j.issn.1002-8331.2009.30.020

• 研发、设计、测试 • Previous Articles     Next Articles

Translation scheme from type system of TTCN-3 to C++

JIANG Fan,WANG Jian-xue,ZHANG Lei,CHEN Jun-cheng   

  1. Department of Computer Science & Technology,University of Science and Technology of China,Hefei 230027,China
  • Received:2008-08-26 Revised:2008-11-10 Online:2009-10-21 Published:2009-10-21
  • Contact: JIANG Fan

TTCN-3语言类型系统到C++语言的翻译方案

蒋 凡,王建学,章 磊,陈军成   

  1. 中国科学技术大学 计算机科学与技术系,合肥 230027
  • 通讯作者: 蒋 凡

Abstract: It is an important performance issue how to reduce the translated code quantity in a programming language translation.Based on the comprehensive consideration of the definition and use of value and template in TTCN-3 language,a new translation scheme from the type system of TTCN-3 to C++ is presented.Compared with the existing scheme,the proportion of the original TTCN-3 code quantity to the translated C++ code quantity decreases from 1∶20 to 1∶5.Meanwhile,the new scheme reduces the preservation of type information copies and improves the memory utilization,or rather the performance of the compiler and the executor.In addition,since the translated C++ codes are basically consistent with the original TTCN-3 codes,this will improve readability,or maintainability of the code.

Key words: Testing and Test Control Notation version 3(TTCN-3), translation, supported database of type, type information

摘要: 在程序语言翻译技术中,如何有效地减少翻译后的代码数量是一个值得研究的性能问题。综合考虑TTCN-3语言中值和模板的定义和使用,提出一种新的TTCN-3语言到C++语言翻译方案。与现有的翻译方案相比,翻译后的C++代码与原TTCN-3代码比例由1∶20降低到1∶5左右。与此同时,新方案减少了类型信息副本的保存,提高内存的利用效率,更确切地说,提高了TTCN-3语言编译器和执行器的性能。此外,因为翻译后的C++代码与原TTCN-3代码基本一致,这使得代码的可读性得到改善,进而提高代码的可维护性。

关键词: TTCN-3语言, 翻译, 类型支持库, 类型信息

CLC Number: