[Gd-chatter] r11149 - in trunk: fundev/sources/lib/collection-extensions src/common/collection-extensions
prom at gwydiondylan.org
prom at gwydiondylan.org
Thu Jan 25 17:06:08 CET 2007
Author: prom
Date: Thu Jan 25 17:06:05 2007
New Revision: 11149
Added:
trunk/fundev/sources/lib/collection-extensions/Makegen (contents, props changed)
trunk/fundev/sources/lib/collection-extensions/gd-library.dylan
- copied unchanged from r11148, trunk/fundev/sources/lib/collection-extensions/library.dylan
trunk/fundev/sources/lib/collection-extensions/od-library.dylan
- copied unchanged from r11148, trunk/fundev/sources/lib/collection-extensions/library.dylan
trunk/fundev/sources/lib/collection-extensions/subseq-copy-down.dylan (contents, props changed)
trunk/src/common/collection-extensions/Open-Source-License.txt (contents, props changed)
trunk/src/common/collection-extensions/gd-library.dylan (contents, props changed)
trunk/src/common/collection-extensions/od-library.dylan (contents, props changed)
trunk/src/common/collection-extensions/subseq-copy-down.dylan (contents, props changed)
Removed:
trunk/fundev/sources/lib/collection-extensions/library.dylan
trunk/src/common/collection-extensions/library.dylan
Modified:
trunk/fundev/sources/lib/collection-extensions/collection-utils.dylan (props changed)
trunk/fundev/sources/lib/collection-extensions/gd-collection-extensions.lid
trunk/fundev/sources/lib/collection-extensions/od-collection-extensions.lid
trunk/fundev/sources/lib/collection-extensions/sequence-utils.dylan (props changed)
trunk/fundev/sources/lib/collection-extensions/subseq.dylan
trunk/src/common/collection-extensions/collection-utils.dylan (props changed)
trunk/src/common/collection-extensions/gd-collection-extensions.lid
trunk/src/common/collection-extensions/od-collection-extensions.lid
Log:
Job: minor
Merged the remaining bits of collection-extensions.
The testsuites are only present on the OD side, which will be used for the external.
Added: trunk/fundev/sources/lib/collection-extensions/Makegen
==============================================================================
--- (empty file)
+++ trunk/fundev/sources/lib/collection-extensions/Makegen Thu Jan 25 17:06:05 2007
@@ -0,0 +1,13 @@
+&makegen_include("../common-Makegen");
+
+$D2CFLAGS # added by update-libdirs
+ = $d2c_runtime
+ . ' -L../common-dylan'
+ . ' -L../table-ext'
+ . ' -L../../d2c/runtime/random'
+ . ' -L../../d2c/runtime/threads';
+
+do emit_library_rule(
+ 'gd-collection-extensions', '$(BUILDROOT)/force.timestamp', '', 'compile',
+ 'install'
+);
Modified: trunk/fundev/sources/lib/collection-extensions/gd-collection-extensions.lid
==============================================================================
--- trunk/fundev/sources/lib/collection-extensions/gd-collection-extensions.lid (original)
+++ trunk/fundev/sources/lib/collection-extensions/gd-collection-extensions.lid Thu Jan 25 17:06:05 2007
@@ -1,5 +1,5 @@
Library: collection-extensions
-Files: library
+Files: gd-library
collection-utils
solist
subseq
Modified: trunk/fundev/sources/lib/collection-extensions/od-collection-extensions.lid
==============================================================================
--- trunk/fundev/sources/lib/collection-extensions/od-collection-extensions.lid (original)
+++ trunk/fundev/sources/lib/collection-extensions/od-collection-extensions.lid Thu Jan 25 17:06:05 2007
@@ -1,9 +1,10 @@
library: collection-extensions
Target-Type: dll
-Files: library
+Files: od-library
collection-utils
solist
subseq
+ subseq-copy-down
vecsearch
sde-vector
sequence-diff
Added: trunk/fundev/sources/lib/collection-extensions/subseq-copy-down.dylan
==============================================================================
--- (empty file)
+++ trunk/fundev/sources/lib/collection-extensions/subseq-copy-down.dylan Thu Jan 25 17:06:05 2007
@@ -0,0 +1,22 @@
+module: subseq
+
+/*
+ * XXX: This file is temporary.
+ * It contains things not supported by GD but needed in OD.
+ * -- Ingo Albrecht, Jan 2006
+ */
+
+define sealed copy-down-method aref
+ (c :: <byte-vector-subsequence>, #rest rest) => (result :: <byte>);
+
+define sealed copy-down-method aref-setter
+ (value :: <byte>, c :: <byte-vector-subsequence>, #rest rest)
+ => (result :: <byte>);
+
+define sealed copy-down-method element
+ (seq :: <byte-vector-subsequence>, key :: <integer>, #key default = subseq-no-default)
+ => elt :: <byte>;
+
+define sealed copy-down-method element-setter
+ (value :: <byte>, seq :: <byte-vector-subsequence>, key :: <integer>)
+ => (result :: <byte>);
Modified: trunk/fundev/sources/lib/collection-extensions/subseq.dylan
==============================================================================
--- trunk/fundev/sources/lib/collection-extensions/subseq.dylan (original)
+++ trunk/fundev/sources/lib/collection-extensions/subseq.dylan Thu Jan 25 17:06:05 2007
@@ -327,8 +327,6 @@
end if;
end method;
-define sealed copy-down-method aref
- (c :: <byte-vector-subsequence>, #rest rest) => (result :: <byte>);
define method aref-setter(value, c :: <vector-subsequence>,
#rest rest) => (result :: <object>);
@@ -340,9 +338,6 @@
end if;
end method;
-define sealed copy-down-method aref-setter
- (value :: <byte>, c :: <byte-vector-subsequence>, #rest rest)
- => (result :: <byte>);
define method dimensions(c :: <vector-subsequence>) => (result :: <vector>);
vector(c.end-index - c.start-index);
@@ -363,9 +358,6 @@
end case;
end method element;
-define sealed copy-down-method element
- (seq :: <byte-vector-subsequence>, key :: <integer>, #key default = subseq-no-default)
- => elt :: <byte>;
define method element-setter(value, seq :: <vector-subsequence>,
key :: <integer>) => (result :: <object>);
@@ -376,9 +368,6 @@
end case;
end method element-setter;
-define sealed copy-down-method element-setter
- (value :: <byte>, seq :: <byte-vector-subsequence>, key :: <integer>)
- => (result :: <byte>);
define method subsequence(seq :: <string>,
#key start: first = 0,
Added: trunk/src/common/collection-extensions/Open-Source-License.txt
==============================================================================
--- (empty file)
+++ trunk/src/common/collection-extensions/Open-Source-License.txt Thu Jan 25 17:06:05 2007
@@ -0,0 +1,21 @@
+The contents of this library are subject to the Functional Objects Library
+Public License Version 1.0 (the "License"); you may not use this library
+except in compliance with the License. You may obtain a copy of the License
+at http://www.functionalobjects.com/licenses/library-public-license-1.0.txt
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the License.
+
+Original Code is Copyright (c) 1996-2004 Functional Objects, Inc.
+All rights reserved.
+
+Alternatively, the contents of this library may be used under the
+terms of the GNU Lesser General Public License (the "GLGPL"), in which
+case the provisions of the GLGPL are applicable instead of those above. If
+you wish to allow use of your version of this library only under the
+terms of the GLGPL and not to allow others to use your version of this
+library under the License, indicate your decision by deleting the provisions
+above and replace them with the notice and other provisions required
+by the GLGPL. If you do not delete the provisions above, a recipient
+may use your version of this library under either the License or the GLGPL.
Modified: trunk/src/common/collection-extensions/gd-collection-extensions.lid
==============================================================================
--- trunk/src/common/collection-extensions/gd-collection-extensions.lid (original)
+++ trunk/src/common/collection-extensions/gd-collection-extensions.lid Thu Jan 25 17:06:05 2007
@@ -1,5 +1,5 @@
Library: collection-extensions
-Files: library
+Files: gd-library
collection-utils
solist
subseq
Added: trunk/src/common/collection-extensions/gd-library.dylan
==============================================================================
--- (empty file)
+++ trunk/src/common/collection-extensions/gd-library.dylan Thu Jan 25 17:06:05 2007
@@ -0,0 +1,110 @@
+module: dylan-user
+
+//======================================================================
+//
+// Copyright (c) 1994 Carnegie Mellon University
+// Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers
+// All rights reserved.
+//
+// Use and copying of this software and preparation of derivative
+// works based on this software are permitted, including commercial
+// use, provided that the following conditions are observed:
+//
+// 1. This copyright notice must be retained in full on any copies
+// and on appropriate parts of any derivative works.
+// 2. Documentation (paper or online) accompanying any system that
+// incorporates this software, or any part of it, must acknowledge
+// the contribution of the Gwydion Project at Carnegie Mellon
+// University, and the Gwydion Dylan Maintainers.
+//
+// This software is made available "as is". Neither the authors nor
+// Carnegie Mellon University make any warranty about the software,
+// its performance, or its conformity to any specification.
+//
+// Bug reports should be sent to <gd-bugs at gwydiondylan.org>; questions,
+// comments and suggestions are welcome at <gd-hackers at gwydiondylan.org>.
+// Also, see http://www.gwydiondylan.org/ for updates and documentation.
+//
+//======================================================================
+
+// The library "collection-extensions" contains a variety of small modules
+// which are not in the core language but are expected to be generally useful.
+// These include new collection classes implementing heaps (i.e. priority
+// queues), "self organizing" lists, and subsequences (also known as
+// "slices"), and a routines for efficient search and replace on
+// <byte-string>s. Documentation for these routines may be found in
+// collection-extension.doc.
+
+define library collection-extensions
+ use dylan;
+ use common-dylan, import: { byte-vector };
+ export heap, self-organizing-list, vector-search, subseq, sequence-diff;
+ export sde-vector;
+ export collection-utilities;
+ export sequence-utilities;
+end library collection-extensions;
+
+define module self-organizing-list
+ use dylan;
+ // use extensions, import: {<dictionary>};
+ export <self-organizing-list>;
+end module self-organizing-list;
+
+define module subseq
+ use dylan;
+ use byte-vector;
+ use dylan-extensions, import: { \copy-down-method-definer };
+ export subsequence, <subsequence>, <byte-vector-subsequence>;
+end module subseq;
+
+define module vector-search
+ use dylan;
+ use subseq;
+ export find-first-key, find-last-key;
+end module vector-search;
+
+// <heap> presents all sorts of problems with <deque> G.F. signatures.
+// But we need the module defined so that we can exclude it...
+//
+define module heap
+/*
+ // Since "<heap>" is a subclass of "<sequence>", most methods are simply
+ // added to existing generic functions. The only "new" operation is
+ // "random-iteration-protocol".
+ use dylan;
+ export <heap>, random-iteration-protocol;
+*/
+end module heap;
+
+define module SDE-vector
+ use dylan;
+ export <SDE-vector>;
+end module SDE-vector;
+
+define module sequence-diff
+ use dylan;
+ use SDE-vector;
+ export sequence-diff,
+ <script-entry>, <insert-entry>, <delete-entry>,
+ element-count, source-index, dest-index;
+end module sequence-diff;
+
+define module collection-utilities
+ use dylan;
+ export singleton?, key-exists?;
+end module collection-utilities;
+
+define module sequence-utilities
+ use dylan;
+ export push!, pop!;
+ export pair?, null?, list?;
+ export xpair, tabulate, list*, take, drop, last-pair;
+ export reverse-append, unfold, unfold/tail;
+ export foldl, foldr, pair-foldl, pair-foldr;
+ export reduce-l, reduce-r, heads, tails;
+ export concatenate-map, pair-do, choose-map;
+ export partition, assoc, apair, alist-copy, alist-delete;
+ export satisfies, index, find, find-tail, precedes?;
+ export split-at;
+end module sequence-utilities;
+
Modified: trunk/src/common/collection-extensions/od-collection-extensions.lid
==============================================================================
--- trunk/src/common/collection-extensions/od-collection-extensions.lid (original)
+++ trunk/src/common/collection-extensions/od-collection-extensions.lid Thu Jan 25 17:06:05 2007
@@ -1,9 +1,10 @@
library: collection-extensions
Target-Type: dll
-Files: library
+Files: od-library
collection-utils
solist
subseq
+ subseq-copy-down
vecsearch
sde-vector
sequence-diff
Added: trunk/src/common/collection-extensions/od-library.dylan
==============================================================================
--- (empty file)
+++ trunk/src/common/collection-extensions/od-library.dylan Thu Jan 25 17:06:05 2007
@@ -0,0 +1,110 @@
+module: dylan-user
+
+//======================================================================
+//
+// Copyright (c) 1994 Carnegie Mellon University
+// Copyright (c) 1998, 1999, 2000 Gwydion Dylan Maintainers
+// All rights reserved.
+//
+// Use and copying of this software and preparation of derivative
+// works based on this software are permitted, including commercial
+// use, provided that the following conditions are observed:
+//
+// 1. This copyright notice must be retained in full on any copies
+// and on appropriate parts of any derivative works.
+// 2. Documentation (paper or online) accompanying any system that
+// incorporates this software, or any part of it, must acknowledge
+// the contribution of the Gwydion Project at Carnegie Mellon
+// University, and the Gwydion Dylan Maintainers.
+//
+// This software is made available "as is". Neither the authors nor
+// Carnegie Mellon University make any warranty about the software,
+// its performance, or its conformity to any specification.
+//
+// Bug reports should be sent to <gd-bugs at gwydiondylan.org>; questions,
+// comments and suggestions are welcome at <gd-hackers at gwydiondylan.org>.
+// Also, see http://www.gwydiondylan.org/ for updates and documentation.
+//
+//======================================================================
+
+// The library "collection-extensions" contains a variety of small modules
+// which are not in the core language but are expected to be generally useful.
+// These include new collection classes implementing heaps (i.e. priority
+// queues), "self organizing" lists, and subsequences (also known as
+// "slices"), and a routines for efficient search and replace on
+// <byte-string>s. Documentation for these routines may be found in
+// collection-extension.doc.
+
+define library collection-extensions
+ use dylan;
+ use common-dylan, import: { byte-vector };
+ export heap, self-organizing-list, vector-search, subseq, sequence-diff;
+ export sde-vector;
+ export collection-utilities;
+ export sequence-utilities;
+end library collection-extensions;
+
+define module self-organizing-list
+ use dylan;
+ // use extensions, import: {<dictionary>};
+ export <self-organizing-list>;
+end module self-organizing-list;
+
+define module subseq
+ use dylan;
+ use byte-vector;
+ use dylan-extensions, import: { \copy-down-method-definer };
+ export subsequence, <subsequence>, <byte-vector-subsequence>;
+end module subseq;
+
+define module vector-search
+ use dylan;
+ use subseq;
+ export find-first-key, find-last-key;
+end module vector-search;
+
+// <heap> presents all sorts of problems with <deque> G.F. signatures.
+// But we need the module defined so that we can exclude it...
+//
+define module heap
+/*
+ // Since "<heap>" is a subclass of "<sequence>", most methods are simply
+ // added to existing generic functions. The only "new" operation is
+ // "random-iteration-protocol".
+ use dylan;
+ export <heap>, random-iteration-protocol;
+*/
+end module heap;
+
+define module SDE-vector
+ use dylan;
+ export <SDE-vector>;
+end module SDE-vector;
+
+define module sequence-diff
+ use dylan;
+ use SDE-vector;
+ export sequence-diff,
+ <script-entry>, <insert-entry>, <delete-entry>,
+ element-count, source-index, dest-index;
+end module sequence-diff;
+
+define module collection-utilities
+ use dylan;
+ export singleton?, key-exists?;
+end module collection-utilities;
+
+define module sequence-utilities
+ use dylan;
+ export push!, pop!;
+ export pair?, null?, list?;
+ export xpair, tabulate, list*, take, drop, last-pair;
+ export reverse-append, unfold, unfold/tail;
+ export foldl, foldr, pair-foldl, pair-foldr;
+ export reduce-l, reduce-r, heads, tails;
+ export concatenate-map, pair-do, choose-map;
+ export partition, assoc, apair, alist-copy, alist-delete;
+ export satisfies, index, find, find-tail, precedes?;
+ export split-at;
+end module sequence-utilities;
+
Added: trunk/src/common/collection-extensions/subseq-copy-down.dylan
==============================================================================
--- (empty file)
+++ trunk/src/common/collection-extensions/subseq-copy-down.dylan Thu Jan 25 17:06:05 2007
@@ -0,0 +1,22 @@
+module: subseq
+
+/*
+ * XXX: This file is temporary.
+ * It contains things not supported by GD but needed in OD.
+ * -- Ingo Albrecht, Jan 2006
+ */
+
+define sealed copy-down-method aref
+ (c :: <byte-vector-subsequence>, #rest rest) => (result :: <byte>);
+
+define sealed copy-down-method aref-setter
+ (value :: <byte>, c :: <byte-vector-subsequence>, #rest rest)
+ => (result :: <byte>);
+
+define sealed copy-down-method element
+ (seq :: <byte-vector-subsequence>, key :: <integer>, #key default = subseq-no-default)
+ => elt :: <byte>;
+
+define sealed copy-down-method element-setter
+ (value :: <byte>, seq :: <byte-vector-subsequence>, key :: <integer>)
+ => (result :: <byte>);
More information about the chatter
mailing list