Method and apparatus for generating a translator program for a compiler/interpreter and for testing the resulting translator program
First Claim
1. A translator writing system for developing a translator program that transforms a user'"'"'s source code into object code, comprising:
- means for receiving a program into said translator writing system, said program representing a summary of the pertinent characteristics associated with the user'"'"'s source code; and
developing means responsive to said program for developing said translator program, said developing means including testing means for testing the developed translator program, the testing means including a data base comprising a plurality of statements, the plurality of statements being examples of all correct uses of program statements in said users source code, the testing including an interrogation of said developed translator program using each statement of said plurality of statements thereby producing results,whereby analysis of said results reveals if errors exist within said developed translator program.
1 Assignment
0 Petitions
Accused Products
Abstract
A translator writing system develops a translator program capable of transforming a user'"'"'s source code into object code. The language of the source code is summarized in a unique form, namely, a Backus-Nauer Form (BNF). This BNF form of the source code is utilized by the translator writing system to transform the source code into object code. The BNF form takes into account the attribute specifications associated with the language of the source code and the interaction of the attribute specifications in the grammar of the language of the source code. The translator writing system includes a valid testcase generator for testing the developed translator program utilizing every possible correct program statement in the language of the user'"'"'s source code. The translator writing system further includes an incorrect, invalid testcase generator for testing the developed translator program utilizing every possible incorrect, invalid program statement in the language of the user'"'"'s source code. As a result, the amount of effort required to test the developed translator program has been significantly reduced.
78 Citations
8 Claims
-
1. A translator writing system for developing a translator program that transforms a user'"'"'s source code into object code, comprising:
-
means for receiving a program into said translator writing system, said program representing a summary of the pertinent characteristics associated with the user'"'"'s source code; and developing means responsive to said program for developing said translator program, said developing means including testing means for testing the developed translator program, the testing means including a data base comprising a plurality of statements, the plurality of statements being examples of all correct uses of program statements in said users source code, the testing including an interrogation of said developed translator program using each statement of said plurality of statements thereby producing results, whereby analysis of said results reveals if errors exist within said developed translator program. - View Dependent Claims (2, 3)
-
-
4. A translator writing system for developing a completed translator program that transforms a user'"'"'s source code into object code, comprising:
-
means for introducing a program into said translator writing system, said program being a summary of the pertinent characteristics of the user'"'"'s source code; developing means responsive to said program for developing said completed translator program, said developing measn further including, a correct testcase generator means for testing said translator program utilizing a plurality of correct program statement corresponding to the user'"'"'s source code, and an incorrect testcase generator means for testing said translator program utilizing a plurality of incorrect program statements corresponding to the user'"'"'s source code, the plurality of correct program statements and the plurality of incorrect program statements being examples of all correct and incorrect uses of program statements, respectively, in the user'"'"'s source code.
-
-
5. A method of developing and testing a completed translator program, comprising the steps of:
-
developing a summary program summarizing the pertinent characteristics associated with a user'"'"'s source code, said source code being a language and including a plurality of program statements; entering said summary program into a translator writing system, said translator writing system developing said completed translator program by converting said summary program into said completed translator program; and testing said completed translator program by interrogating said translator program with examples of all correct uses of program statements in the language of said user'"'"'s source code. - View Dependent Claims (6)
-
-
7. A translator writing system for developing a completed translator program that transforms a user'"'"'s source code into object code, comprising:
-
means for receiving a program into said translator writing system, said program representing a summary of the pertinent characteristics of the user'"'"'s source code; and developing means responsive to said program for developing said completed translator program, said developing means including testing means for testing the completely developed translator program, the testing means including a data base comprising a plurality of statements, the plurality of statements being examples of all incorrect uses of program statements of said user'"'"'s source code, the testing including an interrogation of said developed translator program using each stastement of said plurality of statements thereby producing a plurality of error messages, whereby analysis of said error messages as to number and type reveals if all expected ones of said error messages were produced in response to said interogation.
-
-
8. A method of completely developing and testing a translator program, comprising the steps of:
-
developing a summary program summarizing the pertinent characteristics of a user'"'"'s source code, said source code being a language and including a pluraity of program statements; entering said summary program into a translator writing system, said translator writing system completely developing said trnaslator program by converting said summary program into said translator program; and testing said translator program by interrogating said translator program with examples of all incorrect uses of program statements in the language of said user'"'"'s source code thereby producing a plurality of error messages and analyzing said error messages as to number and type.
-
Specification