Patent Document ID: 8327343
Application ID: 11254268

Base Claim:
1. A method for optimizing a source code, the source code comprising a first source code file and a second source code file, the method comprising: identifying, using a computing device, dependencies between a first source code file and a second source code file; determining, using the computing device, one or more incomplete type dependencies from the dependencies, the one or more incomplete type dependencies comprising data of incomplete types used in the first source code file that are defined in the second source code file such that the first source code file is dependent on the second source code file, and has a requirement that the second source code file is included with the first source code file for compilation of the first source code file; constructing an intermediate data representation including the one or more incomplete type dependencies, wherein constructing the intermediate data representation comprises constructing one or more relationship records of the dependencies, a relationship record comprising relationships between two or more source code files; providing a user of the source code with information for the one or more incomplete type dependencies, the information including forward declarations suggested to be added in the first source code file such that the user is provided with information to make a selection from a set of instructions to modify the first source code file, the forward declarations including code that indicate an existence of incomplete type data in the first source code file that is undefined in the first source code file; in response to receiving the selection from the user and based on the intermediate data representation, editing, using the computing device, the first source code file in the source code by adding the forward declarations to remove the one or more incomplete type dependencies from the first source code file, wherein the first source code file is no longer dependent on the second source code file based on the one or more incomplete type dependencies; and based on removing the one or more incomplete type dependencies from the first source code file, modifying the first source code file using the intermediate data representation such that the inclusion of the second source code file is not required for compilation of the first source code file.

---

Claim 8:
8. The method of claim 1 , wherein modifying the first source code file comprises modifying based on pre-defined criteria that include a presence of data of an incomplete type being aliased to another type, a declaration statement of a data type involving multiple variables, and a type definition of an object requiring a type qualifier.