🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1063

Iteration in single assignment languages

#1063
From: Iain McClatchie
Date: Tue, 15 Sep 1992 07:29
33 lines
1804 bytes
I don't know and wonder how single assignment languages handle these three
kinds of iteration, especially the last:

1) Loops where you know over what you iterate at compile time.
   for (i = 0; i < 20; i++) ...

2) Loops where you know over what you iterate before you begin the loop.
   for (i = a; i < b; i++) {expressions not involving a,b, or i}

3) Loop where you discover over what you iterate as you iterate
   for (i = 0; abs(z) < 2.; i = i + 1) z = z*z + c;

My examples are coded in something like C, in which an array which is
iterated over by i is allocated by the programmer beforehand, and it is
his responsibility to get the size right.

In a single assignment language, I would think that the values taken on
by z must go into some array z, so that the individual values are
seperately addressable.  Supposing the compiler cannot optimize away the
array, how does it know what size it is?  Better yet, how is this third
loop written in a single assignment language?

For that matter, how is iteration over something like a directed acyclic
graph written in a single assignment language?  Is it necessary to embed
the data structure in an array and then run around it there?

I have a queer feeling that SISAL addresses many of these questions.  Can
someone give me a good suggestion for something from which to learn SISAL?

-Iain McClatchie
iain@mti.sgi.com
415-390-4527
Technical Details
Message-ID: <psathc8@fido.asd.sgi.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!olivea!sgigate!odin!fido!iain

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!olivea!sgigate!odin!fido!iain
From: iain@sgi.com (Iain McClatchie)
Newsgroups: comp.lang.misc
Subject: Iteration in single assignment languages
Keywords: single assignment iteration
Message-ID: <psathc8@fido.asd.sgi.com>
Date: 15 Sep 92 07:29:38 GMT
Sender: news@fido.asd.sgi.com (Usenet News Admin)
Organization: Silicon Graphics
Lines: 33