[Coco] phases and organization

Wayne Campbell asa.rand at yahoo.com
Tue Nov 24 16:32:04 EST 2009


I have been thinking about the way I am approaching writing the program. I already knew that identifying and saving the literals was not necessary to reconstructing the source code. The literals are contained in the instructions and can be grabbed on the fly during the second pass.

The primary reason I had for dealing with them is because of the need to correlate procedures to each other. I already knew that this step would actually be part of a later function, but decided to try and grab the data now to save a step later. I have decided that this is not going to save me anything really.

Subroutines occur in I-Code in 2 ways, named subroutines, and subroutines/procedures named in a string variable. In the RUN statement, the integer following the RUN token is a pointer to the VDT. That reference is either a named subroutine, or a pointer to a string. To know what procedure/subroutine is being named in that string variable, I have to be able to connect the string literals used in assignment statements with that string variable.

If the RUN statement is accompanied by a KILL statement, I can find the exact string variable being referenced. Not every RUN <strVar> is accompanied by a KILL <strVar> statement. Likewise, if the KILL statement includes a string literal, I need to be able to connect that literal to that KILL, and then to the RUN it's associated with.

In thinking, I have decided that this is more complicated, and needs to be addressed separately. I'm going to move the literals code to a different procedure, marked for future development as a separate phase of the project. This way, I can get back to work on reconstructing the source code, and work on the literals phase later. I believe that this step alone will speed up the program, but I still need to work on improving the search algorithm.

I'll report when I have some news on the progress I'm making.

Wayne



      



More information about the Coco mailing list