[m-rev.] diff: remove version_types module from stdlib
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed May 18 14:24:27 AEST 2011
Branches: main
Delete the empty version_types module from the standard library.
Shift the documentation it previously contained into the version_array module.
library/version_types.m:
Delete this module. It never contained anything other than
documentation and that can be moved elsewhere.
library/version_array.m:
Shift the documentation from the head of version_types.m to the head
of this module.
library/version_array2d.m:
library/version_bitmap.m:
library/version_hash_table.m:
library/version_store.m:
Point to the version_array module instead of the version_types module.
library/library.m:
Don't include the version_types module.
Julien.
Index: library/library.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/library.m,v
retrieving revision 1.129
diff -u -r1.129 library.m
--- library/library.m 9 May 2011 16:45:31 -0000 1.129
+++ library/library.m 18 May 2011 04:03:29 -0000
@@ -140,7 +140,6 @@
:- import_module version_bitmap.
:- import_module version_hash_table.
:- import_module version_store.
-:- import_module version_types.
% The modules intended for Mercury system implementors.
% NOTE: changes to this list may need to be reflected in mdbcomp/prim_data.m.
@@ -322,7 +321,6 @@
mercury_std_library_module("version_bitmap").
mercury_std_library_module("version_hash_table").
mercury_std_library_module("version_store").
-mercury_std_library_module("version_types").
%---------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
Index: library/version_array.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/version_array.m,v
retrieving revision 1.32
diff -u -r1.32 version_array.m
--- library/version_array.m 8 May 2011 16:02:22 -0000 1.32
+++ library/version_array.m 18 May 2011 04:02:02 -0000
@@ -11,8 +11,24 @@
% Author: Ralph Becket <rafe at cs.mu.oz.au>.
% Stability: low.
%
-% (See the header comments in version_types.m for an explanation of version
-% types.)
+% Version types are efficient pure implementations of typically imperative
+% structures, subject to the following caveat: efficient access is only
+% guaranteed for the "latest" version of a given structure. An older version
+% incurs an access cost proportional to the number of its descendants.
+%
+% For example, if A0 is a version array, and A1 is created by updating A0,
+% and A2 is created by updating A1, ..., and An is created by updating An-1,
+% then accesses to An cost O(1) (assuming no further versions of the array
+% have been created from An), but accesses to A0 cost O(n).
+%
+% Most version data structures come with impure, unsafe means to "rewind"
+% to an earlier version, restoring that version's O(1) access times, but
+% leaving later versions undefined (i.e. only do this if you are discarding
+% all later versions of the structure.)
+%
+% The motivation for using version types is that they are ordinary ground
+% structures and do not depend upon uniqueness, while in many circumstances
+% offering similar levels of performance.
%
% This module implements version arrays. A version array provides O(1)
% access and update for the "latest" version of the array. "Older"
Index: library/version_array2d.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/version_array2d.m,v
retrieving revision 1.7
diff -u -r1.7 version_array2d.m
--- library/version_array2d.m 8 May 2011 16:02:22 -0000 1.7
+++ library/version_array2d.m 18 May 2011 04:02:19 -0000
@@ -11,7 +11,7 @@
%
% Two-dimensional rectangular (i.e. not ragged) version arrays.
%
-% See the header comments in version_types.m for more details about version
+% See the header comments in version_array.m for more details about version
% structures.
%
%-----------------------------------------------------------------------------%
Index: library/version_bitmap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/version_bitmap.m,v
retrieving revision 1.10
diff -u -r1.10 version_bitmap.m
--- library/version_bitmap.m 8 May 2011 16:02:22 -0000 1.10
+++ library/version_bitmap.m 18 May 2011 04:02:29 -0000
@@ -9,7 +9,7 @@
% Author: Ralph Becket <rafe at cs.mu.oz.au>.
% Stability: low.
%
-% (See the header comments in version_types.m for an explanation of version
+% (See the header comments in version_array.m for an explanation of version
% types.)
%
% Version bitmaps: an implementation of bitmaps using version arrays.
Index: library/version_hash_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/version_hash_table.m,v
retrieving revision 1.17
diff -u -r1.17 version_hash_table.m
--- library/version_hash_table.m 8 May 2011 16:02:22 -0000 1.17
+++ library/version_hash_table.m 18 May 2011 04:02:44 -0000
@@ -10,14 +10,13 @@
% Main author: rafe, wangp.
% Stability: low.
%
-% (See the header comments in version_types.m for an explanation of version
+% (See the header comments in version_array.m for an explanation of version
% types.)
%
-% Version hash tables. The "latest" version of the hash table
-% provides roughly the same performance as the unique hash table
-% implementation. "Older" versions of the hash table are still
-% accessible, but will incurr a growing performance penalty as
-% more updates are made to the hash table.
+% Version hash tables. The "latest" version of the hash table provides roughly
+% the same performance as the unique hash table implementation. "Older"
+% versions of the hash table are still accessible, but will incurr a growing
+% performance penalty as more updates are made to the hash table.
%
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
Index: library/version_store.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/version_store.m,v
retrieving revision 1.8
diff -u -r1.8 version_store.m
--- library/version_store.m 10 May 2011 07:02:28 -0000 1.8
+++ library/version_store.m 18 May 2011 04:03:56 -0000
@@ -10,7 +10,7 @@
% Author: Ralph Becket <rafe at cs.mu.oz.au>
% Stability: low.
%
-% (See the header comments in version_types.m for an explanation of version
+% (See the header comments in version_array.m for an explanation of version
% types.)
%
% A version_store is similar to, albeit slightly slower than, an ordinary
Index: library/version_types.m
===================================================================
RCS file: library/version_types.m
diff -N library/version_types.m
--- library/version_types.m 28 Feb 2005 03:39:38 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-%-----------------------------------------------------------------------------%
-% Copyright (C) 2004-2005 The University of Melbourne.
-% This file may only be copied under the terms of the GNU Library General
-% Public License - see the file COPYING.LIB in the Mercury distribution.
-% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
-%-----------------------------------------------------------------------------%
-% version_types.m
-% Ralph Becket <rafe at cs.mu.oz.au>
-% Fri Jul 9 15:31:16 EST 2004
-%
-% (This module only provides documentation describing general properties
-% of version types.)
-%
-% Version types are efficient pure implementations of typically imperative
-% structures, subject to the following caveat: efficient access is only
-% guaranteed for the "latest" version of a given structure. An older version
-% incurs an access cost proportional to the number of its descendants.
-%
-% For example, if A0 is a version array, and A1 is created by updating A0,
-% and A2 is created by updating A1, ..., and An is created by updating An-1,
-% then accesses to An cost O(1) (assuming no further versions of the array
-% have been created from An), but accesses to A0 cost O(n).
-%
-% Most of these data structures come with impure, unsafe means to "rewind"
-% to an earlier version, restoring that version's O(1) access times, but
-% leaving later versions undefined (i.e. only do this if you are discarding
-% all later versions of the structure.)
-%
-% The motivation for using version types is that they are ordinary ground
-% structures and do not depend upon uniqueness, while in many circumstances
-% offering similar levels of performance.
-%
-%-----------------------------------------------------------------------------%
-
-:- module version_types.
-
-:- interface.
-
- % This is just to stop the compiler complaining about this module
- % not defining anything.
- %
-:- type prevent_warning_about_empty_interface ---> dummy.
-
-%-----------------------------------------------------------------------------%
-%-----------------------------------------------------------------------------%
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list