×

Comparing and merging structured documents syntactically and semantically

  • US 8,286,132 B2
  • Filed: 09/25/2008
  • Issued: 10/09/2012
  • Est. Priority Date: 09/25/2008
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method of performing a syntactic and semantic three-way merge of structured software documents, the method comprising:

  • receiving a first version of a document coded in a structured programming language containing a first plurality of elements, a second version of the document containing a second plurality of elements, and a third version of the document containing a third plurality of elements, wherein the first version of a document is an original version of the document, the second version of the document is an end-user modified version of the original version and the third version of the documents is a developer modified version of the original version of the document;

    deserializing the first, second, and third versions of the document to generate a first data model, a second data model, and a third data model respectively representing the first, second, and third versions in a first data store, each data model comprising a tree data structure that includes a corresponding node for each element of the plurality of elements contained within the version of the document represented by the data model, each node of each data model containing a context describing the element corresponding to the node;

    generating an identifier for each node of each data model in the first data store that is unique to the node within the data model by applying a set of identifier determination rules to the context describing the element corresponding to the node;

    comparing the identifier for each node in the first data model with the identifier for each node in the second data model to identify each node in the first data model not having matching identifiers with any node in the second data model in the first data store and to link each pair of nodes in the first and second data models that have matching identifiers;

    applying a set of comparison rules to the contexts of each linked pair of nodes in the first and second data models to identify differences between each linked pair of nodes in the first and second data models in the first data storegenerating a copy of the third data model in the first data store, deleting each node in the copy of the third data model having matching identifiers with an node in the first data model not identified as having matching identifiers with any node in the second data model, and modifying each node in the copy of the third data model having matching identifiers with any linked pair of nodes in the first and second data models by applying a set of merge rules based upon the identified differences between the linked pair of nodes; and

    serializing the copy of the third data model to generate a fourth version of the document.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×