Implementation of C++ ID Compiler

C++ IDL 컴파일러 구현

  • Published : 2001.09.01

Abstract

In this paper, OUIG IDL CFE, provided by Sunsoft, is used to take a IDL definitions as inputs and parse those. OmniORB3 is introduced to support functionality of the ORB. Suns CFE produce AST after parsing inputs. Actually, the node of AST Is instances of classes which are derived from CFE classes. As the compiler back end visit the node of the AST using iterator class, UTL_ScopeActiveIterator, it dumps codes of output. During processing, two files are generated. Routines of generating code are invoked by BE_produce.cc and codes are produced while visiting root of AST, idl_global->root(). The dump* functions which dump codes is called according to the type of node. In this paper, Mapping C++ of IDL definition is experimented and results In the same as that of omniidl which is provided by omniORB3. The code of results behavior correctly on omniORB3. In the future, we are interested in optimizing the performance of marshalling code via IDL compiler.

본 논문에서는 IDL 정의를 입력받아 파싱하는 컴파일러의 전반부를 위해 OMG IDL 컴파일러를 사용하였다. 또한 ORB를 위해 omniORB3[1]를 사용했다. OMG IDL CFE는 IDL 정의를 입력받아 어휘 및 구문 분석을 한 후 AST 트리를 생성하며, 생성된 각 노드는 우리가 새로 추가한 BE_* 클래스의 인스턴스로 구성된다. IDL 컴파일러의 후반부는 AST의 각 노드를 반복자인 UTL_ScopeActiveIterator 클래스를 사용하여 반복적으로 각 순회하면서 해당하는 출력을 덤프한다. 이때 두개의 출력 파일을 생성토록 했다. 모든 코드 생성은 BE_produce.cc에서 시작되며, idl_global->root() 노드를 시작으로 하여 각 클래스에 해당 코드를 생성하는 dump* 함수를 호출하여 생성했다. 본 논문은 IDL 정의를 C++언어로 맵핑만을 실험했으며, 이것은 omniORB3에서 제공하는 IDL 컴파일러와 동일한 결과를 생성했으며, omniORB3[1] 환경에서 동작하는 변환된 C++ 코드임을 실험했다. 향후 IDL 컴파일러를 통한 성능 향상을 위해 마샬링 코드의 최적화를 할 수 있도록 하는 코드를 생성하는 문제에 관심을 가지고 있다.

Keywords