A linear-time scheme for version reconstruction
Open Access
- 1 May 1994
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 16 (3) , 775-797
Abstract
An efficient scheme to store and reconstruct versions of sequential files is presented. The reconstruction scheme involves building a data structure representing a complete version, and then successively modifying this data structure by applying a sequence of specially formatted differential files to it. Each application of a differential file produces a representation of an intermediate version, with the final data structure representing the requested version. The scheme uses a linked list to represent an intermediate version, instead of a sequential array, as is used traditionally. A new format for differential files specifying changes to this linked list data structure is presented. The specification of each change points directly to where the change is to take place, thereby obviating a search. Algorithms are presented for using such a new format differential file to transform the representation of a version, and for reconstructing a requested version. Algorithms are also presented for generating the new format differential files, both for the case of a forward differential specifying how to transform the representation of an old version to the representation of a new version, and for the case of a reverse differential specifying how to transform the representation of a new version to the representation of an old version. The new version reconstruction scheme takes time linear in the sum of the size of the initial complete version and the sizes of the file differences involved in reconstructing the requested version. In contrast, the classical scheme for reconstructing versions takes time proportional to the sum of the sizes of the sequence of versions involved in the reconstruction, and therefore has a worst-case time that is quadratic in the sum of the size of the initial complete version and the sizes of the file differences. The time cost of the new differential file generation scheme is comparable to the time cost of the classical differential file generation scheme.Keywords
This publication has 11 references indexed in Scilit:
- Toward a unified framework for version modeling in engineering databasesACM Computing Surveys, 1990
- Version support for engineering database systemsIEEE Transactions on Software Engineering, 1988
- Design Version ManagementIEEE Design & Test of Computers, 1987
- Modeling concepts for VLSI CAD objectsACM Transactions on Database Systems, 1985
- Rcs — a system for version controlSoftware: Practice and Experience, 1985
- Computational Geometry1985
- The string-to-string correction problem with block movesACM Transactions on Computer Systems, 1984
- Database Support for Versions and Alternatives of Large Design FilesIEEE Transactions on Software Engineering, 1984
- A technique for isolating differences between filesCommunications of the ACM, 1978
- The source code control systemIEEE Transactions on Software Engineering, 1975