Incremental compiler for source-code development system
First Claim
1. A method of performing an edit-compile-link-run cycle upon source text using a programming development system executing on a computer, comprising the steps of:
- a) generating a module of application source text, said source text being resident in a file system and held in memory in a source text buffer, the module of source text including a plurality of lines;
compiling said module of application source text to create a module of executable application code in said memory,linking said module of application code to create in said memory an executable form of an application program, and executing said executable form of the application program from said memory;
b) editing some of the lines of said module of source text in said memory;
c) incrementally recompiling only lines of said module of application source text which have been changed by said editing to revise said module of executable application code, reusing said application code in said module corresponding to lines which have not been changed and are not dependent upon lines which have been changed;
said step of recompiling including the step of determining which lines of said source code have been changed by said editing or are dependent upon lines which have been changed, and including the step of generating object code for said module of application code for said lines which have been changed or are dependent upon lines which have been changed.
3 Assignments
0 Petitions
Accused Products
Abstract
A computer-aided software development system includes programs to implement edit, compile, link and run sequences, all from memory, at very high speed. The compiler operates on an incremental basis, line-by-line, so if only one line is changed in an edit session, then only that line need be recompiled if no other code is affected. Scanning is done incrementally, and the resulting token list saved in memory to be used again where no changes are made. All of the linking tables are saved in memory so there is no need to generate link tables for increments of code where no changes in links are needed. The parser is able to skip lines or blocks of lines of source code which haven'"'"'t been changed; for this purpose, each line of source text in the editor has a change-tag to indicate whether this line has been changed, and from this change-tag information a clean-lines table is built having a clean-lines indication for each line of source code, indicating how many clean lines follow the present line. All of the source code text modules, the token lists, symbol tables, code tables and related data saved from one compile to another are maintained in virtual memory rather than in files so that speed of operation is enhanced. Also, the object code created is maintained in memory rather than in a file, and executed from this memory image, to reduce delays. A virtual memory management arrangement for the system assures that all of the needed data modules and code is present in real memory by page swapping, but with a minimum of page faults, again to enhance operating speed.
92 Citations
22 Claims
-
1. A method of performing an edit-compile-link-run cycle upon source text using a programming development system executing on a computer, comprising the steps of:
-
a) generating a module of application source text, said source text being resident in a file system and held in memory in a source text buffer, the module of source text including a plurality of lines; compiling said module of application source text to create a module of executable application code in said memory, linking said module of application code to create in said memory an executable form of an application program, and executing said executable form of the application program from said memory; b) editing some of the lines of said module of source text in said memory; c) incrementally recompiling only lines of said module of application source text which have been changed by said editing to revise said module of executable application code, reusing said application code in said module corresponding to lines which have not been changed and are not dependent upon lines which have been changed;
said step of recompiling including the step of determining which lines of said source code have been changed by said editing or are dependent upon lines which have been changed, and including the step of generating object code for said module of application code for said lines which have been changed or are dependent upon lines which have been changed. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method of operating a source code development system on a computer, wherein a module of source text is first created in a step of editing by using an editor, said module being created in a source-text buffer as a plurality of lines including lines to be sequentially executed,
compiling the source text from said buffer to produce a code table, linking said code table to produce a code image of executable object code, and executing said code image to determine if there are errors in said source text, comprising the steps of: -
a) re-editing said module of source text using an editor to change selected lines of said source text, said re-edited source text being stored in said source-text buffer as a plurality of lines; b) incrementally recompiling lines of said module from said source-text buffer which have been changed by said re-editing to produce an updated version of said code table while reusing code from said code table for lines of said module which have not been changed or are not dependent upon lines which have been changed;
said step of recompiling including the step of determining which of said lines of source text in said module have been changed by said re-editing and or are dependent upon lines which have been changed, and including the step of generating object code for said code table for said lines which have been changed or are dependent upon lines which have been changed. - View Dependent Claims (7, 8, 9, 10, 11)
-
-
12. A system for use on a computer in developing source code, wherein a module of source code is created and edited in a source-text buffer as a plurality of lines including lines to be sequentially executed, the source code from said buffer is compiled to produce object code in a code table, said code table is linked to produce a code image of executable object code, and said code image is executed to determine if there are errors in said source code, said system comprising:
-
a) means for re-editing said module of source code and storing said source code in said source-text buffer as a plurality of lines, each line having an associated change-tag; b) means for incrementally recompiling only lines of source code from said source-text buffer which have been changed by said re-editing to produce an updated code table reusing code from said code table corresponding to lines which have not been changed and are not dependent upon lines which have been changed;
said means for incrementally recompiling including means responsive to said change-tags for determining which lines of said source code of said source-text buffer have been changed, and means for generating object code for said code table for said lines which have been changed or are dependent upon lines which have been changed. - View Dependent Claims (13, 14, 15, 16)
-
-
17. A method executing on a computer for incrementally recompiling a module of source text which has been previously compiled from a source-text buffer and linked to create a code image of executable object code, said code image being executed to detect errors in said source text, said module containing a plurality of lines of source text, comprising the steps of:
-
a) editing selected lines of said module of source text, said edited source text being stored in said source-text buffer as a plurality of lines; b) incrementally recompiling each line of said source text which has been changed by said step of editing and each line of said source text which is dependent upon a line which has been changed to update said code image for changed lines in said source text and lines dependent upon changed lines, wherein lines of said source text not changed in said step of editing and not dependent upon changed lines are not recompiled and executable object code in said code image is reused for said lines not changed and not dependent upon changed lines. - View Dependent Claims (18, 19, 20, 21, 22)
-
Specification