Font Size: a A A

Research And Design Of TTCN-3/C Compiler

Posted on:2005-02-24Degree:MasterType:Thesis
Country:ChinaCandidate:W J WangFull Text:PDF
GTID:2168360125954657Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the advent of IPv6, testing of IPv6 routers has redrawn attentions of the network community. Traditional test methods are only capable of observing and testing a single port or a pair of ports simultaneously. They are not adequate for testing of modern routers in its real working environment, especially in performance testing. This is the very reason for SC-Netcom Lab (Sichuan Network Communication Key Laboratory) to set up the project of CMPT (Concurrent Multi-Port Testing) for IP routers, which can effectively simulate all possible working conditions for multi-port routers. The work presented in this dissertation is part of test support-tool development.The test control data described in the ISO standardized specification language - TTCN-3 has to be converted into executable code for test systems. The author takes compiling approach instead interpretation as most test systems do in TTCN-3 conversion. The author's comiler involves converting TTCN-3 specifications into C language in order to enable necessary combined compiling with other parts of the test system. In other word, it is a TTCN-3/C compiler.The compiling process can be divided into four phases: lexical analysis, syntax analysis, semantic analysis, and code generation. The C codes can be thought of as the intermediate codes as in assembly codes in programming language compiling. Therefore, no machine code optimizing process has been involved. The compiling process is composed of two passes in the author compiler. In the first pass, lexical analyzing, syntax analyzing and semantic analyzing are processed, while syntax trees exported from the first pass are used to generating C codes in the compiler.This dissertation has been dedicated to techniques relevant to lexical analysis, syntax analysis, semantic analysis, syntax tree generation, symbol table construction, and error handling. The work of code generation is done by another student in TTCN-3 compiler working group. FLEX (a new version of popular LEX) is used to automate and speed up lexical analysis and BISON (a version of YACC) is used in syntax analysis by the same token. One of difficulties encountered in syntax analysis is how to solve rule conflicts in YACC. The authorhas avoided such conflict by reformatting TTCN-3 rules in YACC and other tactics.Finally, error handling issues are discussed, and basic idea of code generation is briefly introduced although no programming work has been done in this respect.
Keywords/Search Tags:compiler, TTCN-3, syntax analysis, semantic analysis
PDF Full Text Request
Related items