Thread View: comp.lang.functional
4 messages
4 total messages
Started by USENET News System
Wed, 26 Jun 1991 22:27
"Reverse Diff" Arrays
Author: USENET News System
Date: Wed, 26 Jun 1991 22:27
Date: Wed, 26 Jun 1991 22:27
23 lines
1520 bytes
1520 bytes
Hi, In response to the discussion on graph algorithms, someone (I forget who) posted two messages on "reverse diff" arrays, one of the messages including ML source code which I assume implemented these arrays using references. Could the poster please re-send me the article containing the source code, and any associated references? Would anyone else care to comment on why such a simple technique (at least in hindsight) appears to have received so little attention? Why bother with compile-time analysis to detect "single-threadedness" when a simple run-time organisation for arrays will suffice? _______________________________________________________________________________ E.Ireland@massey.ac.nz Evan Ireland, School of Information Sciences, +64-6-3569099 x8541 Massey University, Palmerston North, New Zealand. -- _______________________________________________________________________________ E.Ireland@massey.ac.nz Evan Ireland, School of Information Sciences, +64-6-3569099 x8541 Massey University, Palmerston North, New Zealand.
Re: "Reverse Diff" Arrays
Author: Richard A. O'Keefe
Date: Thu, 27 Jun 1991 07:31
Date: Thu, 27 Jun 1991 07:31
19 lines
1372 bytes
1372 bytes
In article <591sis-b@massey.ac.nz>, news@massey.ac.nz (USENET News System) writes: > Would anyone else care to comment on why such a simple technique (at > least in hindsight) appears to have received so little attention? Possibly it has been regarded as too well known? The technique was applied to Prolog in a paper in the Uppsala conference (I've never had the proceedings for that) in 83? 84? something like that. There's a small literature on multi-version data structures. > Why > bother with compile-time analysis to detect "single-threadedness" when > a simple run-time organisation for arrays will suffice? Because with reverse diffs you still have to keep the reverse diffs around and maybe garbage collect later; with compile-time analysis you should be able to generate exactly the same code you'd have had in an imperative language. (See Trilogy.) -- I agree with Jim Giles about many of the deficiencies of present UNIX.
Re: "Reverse Diff" Arrays
Author: Stephen Adams
Date: Thu, 27 Jun 1991 09:14
Date: Thu, 27 Jun 1991 09:14
51 lines
2719 bytes
2719 bytes
In article <591sis-b@massey.ac.nz> news@massey.ac.nz (USENET News System) writes:
> ...
> who) posted two messages on "reverse diff" arrays, one of the messages
> including ML source code which I assume implemented these arrays using
> references.
> ...
> Would anyone else care to comment on why such a simple technique (at
> least in hindsight) appears to have received so little attention? Why
> bother with compile-time analysis to detect "single-threadedness" when
> a simple run-time organisation for arrays will suffice?
I find there are many things which seem simple in hindsight.
Here are my opinions on why so many may not have stumbled
across reverse diffs or enthused about them before.
0. As a data stucture tailored to some specific
requirements, they are great.
1. Unless built in I cant get the benefits of reverse
diffs in *pure* functional languages. I would like to
use them in, say, Hope and Miranda, but I cant.
2. Because of (1) my vision is limited by the functional
programming paradigm and I am unlikely to think of a
similar solution (i.e. one that uses mutable data
structures and requires a proof that the abstract data
type is still referentially transparent).
3. Reverse diffs can be really bad if the data structure
is not quite single threaded. If I make a zillion
updates to an array which just happens to have another
copy I will wonder where all my memory is going and why
it takes so long to look up anything in the original
copy. They are not a general solution so they should
not be used by default. And if I am to do analysis to
detect this I might as well go the whole hog and to
thing properly.
4. As always, anything that you do a run time has a cost.
An access to the most recent version of the reverse
diff array still costs 2-3 times a normal array
reference.
5. Reverse diff arrays are a different type to my ordinary
arrays. I have to recode my array library.
--
Stephen Adams S.R.Adams@ecs.soton.ac.uk
Computer Science
University of Southampton
Southampton SO9 5NH, UK
Re: "Reverse Diff" Arrays
Author: David Lester
Date: Fri, 28 Jun 1991 08:01
Date: Fri, 28 Jun 1991 08:01
15 lines
1107 bytes
1107 bytes
In article <SRA.91Jun27101445@pessoa.ecs.soton.ac.uk> sra@ecs.soton.ac.uk (Stephen Adams) writes: > 3. Reverse diffs can be really bad if the data structure > is not quite single threaded. If I make a zillion > updates to an array which just happens to have another > copy I will wonder where all my memory is going and why > it takes so long to look up anything in the original > copy. One might consider this behaviour to be more acceptable than the equivalent case in an imperative paradigm! -- David Lester, Manchester University, UK.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads