Font Size: a A A

Transformation From The General Language Part Of ATLAS To C

Posted on:2005-04-05Degree:MasterType:Thesis
Country:ChinaCandidate:H H ZhangFull Text:PDF
GTID:2168360125950616Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
ATLAS (Abbreviated Test Language for ALL Systems) is a test-oriented general language. It is designed to describe tests which are independent of any specific system, and has been constrained to ensure that it can be implemented on ATE(automatic test equipment). It has been widely used in many fields such as military affairs and industry for its extendibility, usability and equipment independence.The task of the whole ATLAS project is to implement the language ATLAS. The project was divided to three phases to complete. The work in the first phase is to complete the lexical analysis and syntax analysis of ATLAS.The work in the second phase is to do semantic checking as more as possible and transform ATLAS program into C program that will do the same function.The work in the last phase is to optimize the C program that was transformed from ATLAS program to get satisfying result in readability, understandability, time and space efficiency. As a part of the second phase of the whole ATLAS project, this article finished the transformation from the general language part of ATLAS to C language. The main work in this article includes several aspects as following:First, the transformation of the declaration from ATLAS to C. The declaration of ATLAS includes constant declaration, type declaration and variable declaration .They can be transformed into the corresponding constant declaration, type declaration and variable declaration in C language.Second, the transformation of procedure correlative statements from ATLAS to C. There are three statements relative to procedure in ATLAS.They are procedure structure defining statement, procedure calling statement labeled by "PERFORM" and jumping out of a procedure statement "LEAVE procedure ". The procedure structure defining statement defines a series of ATLAS statements which execute a kind of function. PERFORM statement calls a procedure that has been defined to do the necessary task. Using LEAVE procedure statement can jump out of a procedure before it was finished normally. The procedure declaration in ATLAS was transformed into the function declaration whose return type is "void " in the C language. The statement of LEAVE procedure was transformed into the "return" statement which return back from a function in C. The statement of PERFORM was transformed into the function calling in C.Third, the transformation of data processing statements from ATLAS to C. ATLAS data processing statements include CALCULATE statement and COMPARE statement. CALCULATE statement provides the ability to compute ,which can be a single assignment or a series of assignments. COMPARE statement set the flag status words of GO,NOGO,HI,LO etc. by comparing the testing value and the specifying limit value to be used in the later testing procedure. CALCULATE statement was transformed into one assignment or a set of assignments in C. COMPARE statement was simulated using the IF statement of C language in transformation because there is not any compare statement directly corresponding with the compare statement in ATLAS.Forth, the transformation of procedure control statements from ATLAS to C. ATLAS procedure control statements decide the execution sequence of the program ,which include IF statement, WHILE statement, FOR statement, LEAVE IF statement, LEAVE WHILE statement, LEAVE FOR statement and GOTO statement. IF statement, WHILE statement, FOR statement and GOTO statement have basically same usage in C and can be directly transformed. the function of LEAVE IF statement, LEAVE WHILE statement and LEAVE FOR statement is to jump out of the IF statement, WHILE statement and FOR statement respectively. Then the control turns to the first executable statement behind the structure that was jumped out of. Corresponding to the different semantic meaning ,they were transformed to the break statement or goto statement in C language.Fifth, the transformation of the input and output statements from ATLAS to C. The function of input and output statements is to transfer data t...
Keywords/Search Tags:Transformation
PDF Full Text Request
Related items