Re: Converting languages to a purely functional form

lars@bearnip.com (Lars Duening)
23 Jul 2003 10:36:55 -0400

          From comp.compilers

Related articles
Converting languages to a purely functional form dobes@dobesland.com (Dobes Vandermeer) (2003-07-15)
Re: Converting languages to a purely functional form joachim.durchholz@web.de (Joachim Durchholz) (2003-07-17)
Re: Converting languages to a purely functional form derkgwen@HotPOP.com (Derk Gwen) (2003-07-17)
Re: Converting languages to a purely functional form pat@jantar.org (Patryk Zadarnowski) (2003-07-21)
Re: Converting languages to a purely functional form vidar@hokstad.name (2003-07-21)
Re: Converting languages to a purely functional form lars@bearnip.com (2003-07-23)
Re: Converting languages to a purely functional form rivers@dignus.com (Thomas David Rivers) (2003-07-23)
Re: Converting languages to a purely functional form joachim.durchholz@web.de (Joachim Durchholz) (2003-07-25)
| List of all articles for this month |

From: lars@bearnip.com (Lars Duening)
Newsgroups: comp.compilers
Date: 23 Jul 2003 10:36:55 -0400
Organization: Compilers Central
References: 03-07-098 03-07-157
Keywords: functional
Posted-Date: 23 Jul 2003 10:36:55 EDT

Vidar Hokstad <vidar@hokstad.name> wrote:


> Dobes Vandermeer <dobes@dobesland.com> wrote
> > Purely functional programs are, as far as I can tell, much easier to
> > operate on programmatically than regular procedural ones. Loops,
> > destructive updates, etc. make many kinds of very powerful analyses
> > rather difficult.
> >
> > This makes a pure functional language useful as a kind of intermediate
> > representation.
> |
> > To eliminate destructive updates, you'd have to change every function so
> > that it took in each global/member variable it read, and returned every
> > one that it wrote.
>
> Take a look at
http://www.inf.ethz.ch/research/dissertations/show.php?type=diss&what=11024&lang=en
>
> Marc Brandis' dissertation is focusing on creating an optimizing
> Oberon compiler that use Static Single Assignment as an intermediate
> form.


In this thesis, Marc describes a modification of SSA, dubbed GSA
(Guarded Sequential Assignment), which he considers an improvement over
plain.


The OOC project (http://sourceforge.net/projects/ooc) then used GSA to
build a working Oberon compiler, however for version 2 the maintainer
switched back to using SSA as intermediate representation. An
explanation for the switch can be found in the mailing list archive
(http://sourceforge.net/mailarchive/forum.php?thread_id=1416753&forum_id=4840),
in a nutshell (and as Vidar alluded to) GSA didn't handle multiple-exit
structures very well.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.