Re: imperative-to-functional compiler

Alain Ketterlin <alain@dpt-info.u-strasbg.fr>
Tue, 18 Jan 2011 10:22:35 +0100

          From comp.compilers

Related articles
imperative-to-functional compiler n.oje.bar@gmail.com (nojb) (2011-01-17)
Re: imperative-to-functional compiler pat@jantar.org (Patryk Zadarnowski) (2011-01-18)
Re: imperative-to-functional compiler torbenm@diku.dk (2011-01-18)
Re: imperative-to-functional compiler alain@dpt-info.u-strasbg.fr (Alain Ketterlin) (2011-01-18)
Re: imperative-to-functional compiler martin@gkc.org.uk (Martin Ward) (2011-01-18)
| List of all articles for this month |

From: Alain Ketterlin <alain@dpt-info.u-strasbg.fr>
Newsgroups: comp.compilers
Date: Tue, 18 Jan 2011 10:22:35 +0100
Organization: Universites Paris VI/Paris VII - France
References: 11-01-074
Keywords: functional
Posted-Date: 18 Jan 2011 10:25:07 EST

nojb <n.oje.bar@gmail.com> writes:


> Suppose you want to translate an imperative language (e.g. a suitable
> subset of Pascal) into a functional language that does not have
> mutable variables (e.g. ML). Is this possible?


Yes it is.


> What would be the algorithms/theory that would be relevant to handle
> the mutability of the variables on the Pascal side? Is SSA relevant?


Yes, SSA is the way to go, from my point of view. Any program under SSA
form has en equivalent functional program. See "SSA is functional
programming", at


www.cs.princeton.edu/~appel/papers/ssafun.ps


-- Alain.



Post a followup to this message

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