Method for performing conditionalized N-way merging of source code
AssigneeLucent Technologies Inc.
InventorDaniel Waddington
Life of this patent
Estimating the term…
Abstract
A method combines N versions of a C/C++ program into a single, semantically correct, unified program, while maintaining the semantics of each version within N. The problem of merge conflicts is avoided by conditionalizing changes that potentially conflict, according to a set of preprocessors definitions that uniquely define the version within N. Conditionalization is realized through C/C++ preprocessing directives (e.g., #if, #else, #elif).
Claims12
A method for performing conditionalized N-way merging of source code, comprising:
- collecting differential information for each of N versions of an original source code program, the original source code program having lines of text;
- constructing a merge data structure from the differential information;
- and
- merging the N versions into a merged source code program using the merge data structure, the single, semantically correct, unified program using preprocessing conditionals to capture the differences between the N versions.
A system for performing conditionalized N-way merging of source code, comprising:
- a differential collection component for collecting differential information for each of N versions of an original source code program, the original source code program having lines of text;
- a constructor for constructing a merge data structure from the differential information;
- and
- a merge component for merging the N versions into a single, semantically correct, unified program using the merge data structure, the single, semantically correct, unified program having preprocessing conditionals representing the differences between the N versions.
A computer-readable medium having instructions stored thereon for performing a method for performing conditionalized N-way merging of source code, the method comprising:
- collecting differential information for each of N versions of an original source code program, the original source code program having lines of text;
- constructing a merge data structure from the differential information;
- and
- merging the N versions into a single, semantically correct, unified program using the merge data structure, the single, semantically correct, unified program having preprocessing conditionals representing the differences between the N versions.
Dependencies are inferred from the claim text.