Re: In a Pascal-like language, would being able to declare a subroutine as "purely functional" be of any value?

noitalmost <noitalmost@cox.net>
Tue, 15 Mar 2011 10:09:10 -0400

          From comp.compilers

Related articles
In a Pascal-like language, would being able to declare a subroutine as noitalmost@cox.net (noitalmost) (2011-03-11)
Re: In a Pascal-like language, would being able to declare a subroutin gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-03-11)
Re: In a Pascal-like language, would being able to declare a subroutin bobduff@shell01.TheWorld.com (Robert A Duff) (2011-03-11)
Re: In a Pascal-like language, would being able to declare a subroutin pdjpurchase@googlemail.com (1Z) (2011-03-11)
Re: In a Pascal-like language, would being able to declare a subroutin gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-03-12)
Re: In a Pascal-like language, would being able to declare a subroutin comp.lang.misc@inglorion.net (Robbert Haarman) (2011-03-12)
Re: In a Pascal-like language, would being able to declare a subroutin mcr@wildcard.demon.co.uk (Martin Rodgers) (2011-03-12)
Re: In a Pascal-like language, would being able to declare a subroutin noitalmost@cox.net (noitalmost) (2011-03-15)
Re: In a Pascal-like language, would being able to declare a subroutin wclodius@los-alamos.net (2011-03-15)
Re: In a Pascal-like language, would being able to declare a subroutin mcr@wildcard.demon.co.uk (Martin Rodgers) (2011-03-16)
Re: In a Pascal-like language, would being able to declare a subroutin sinu.nayak2001@gmail.com (Srinivas Nayak) (2011-03-16)
Re: In a Pascal-like language, would being able to declare a subroutin massimo_dentico@hotmail.com (Massimo A. Dentico) (2011-03-18)
Re: In a Pascal-like language, would being able to declare a subroutin gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-03-19)
Re: In a Pascal-like language, would being able to declare a subroutin sinu.nayak2001@gmail.com (Srinivas Nayak) (2011-03-21)
[1 later articles]
| List of all articles for this month |
From: noitalmost <noitalmost@cox.net>
Newsgroups: comp.compilers
Date: Tue, 15 Mar 2011 10:09:10 -0400
Organization: Compilers Central
References: 11-03-032
Keywords: parallel, functional, optimize
Posted-Date: 15 Mar 2011 20:52:13 EDT

On Friday, March 11, 2011 08:38:43 pm glen herrmannsfeldt wrote:
> PURE helps in optimization and parallelization, but it isn't
> so obvious in the case of register allocation.


Parallelizing FOR loops that make a function call. That's what was
vaguely in my memory. Thanks. I now see also that it can help for
other things, such as dead code elimination, as well.




On Saturday, March 12, 2011 12:37:30 pm Martin Rodgers wrote:
> Fast and Effective Procedure Inlining (Waddell, Dybvig)
> http://www.cs.indiana.edu/~dyb/papers/tr484.ps.gz


This was designed for "higher-order languages". Does it apply to a
Pascal-like language? It'll take me quite a while to decipher the
paper. I have a hard time understanding lisp-style algorithms.




> [See
> http://publib.boulder.ibm.com/infocenter/ratdevz/v7r6/index.jsp?topic=/com
> .ibm.ent.pl1.zos.doc/topics/ibma1d111005551.htm -John]


I did a little looking at some of the languages that offer PURE. Ada
and PL/I seem to be like programmer promises to the compiler that the
function is pure. Are Fortran and the gcc extension the same way? Or
do they offer compiler checks, like as happens for const in gcc C++?



Post a followup to this message

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