Related articles |
---|
Functional IR nob@fibertel.com.ar (2002-03-09) |
Re: Functional IR whopkins@alpha2.csd.uwm.edu (2002-03-17) |
From: | whopkins@alpha2.csd.uwm.edu (Mark) |
Newsgroups: | comp.compilers |
Date: | 17 Mar 2002 22:57:50 -0500 |
Organization: | University of Wisconsin - Milwaukee, Computing Services Division |
References: | 02-03-010 |
Keywords: | functional |
Posted-Date: | 17 Mar 2002 22:57:50 EST |
>From nob@fibertel.com.ar (=?ISO-8859-1?Q?Nicol=E1s_Ojeda_B=E4r?=):
>My question is the following: would it be feasible/practical
>to use a functional language as intermediate code ? And is it possible
>to translate my ast into ir without going through ssa ?
Yes, if the "functional" language is extended with the inclusion of
infinitary expressions, e.g.,
let i = 0, y = 1 in
i < n?
let i = i + 1, y = y*x in
i < n?
let i = i + 1, y = y*x in
i < n? (...): y:
y:
y
This gives you a direct purely syntatic representation of a control
flow structure via an infinitary expression.
All optimizations, transformations and even the method of assertions,
itself, are deriveable from the basic properties of (infinitary) lambda
expressions via this representation. Some of this is discussed in
www.csd.uwm.edu/~whopkins/functional/index.html
The C-BC interpreter was implemented using an infinitary functional
back end. The latest release, along with extensive implementation
notes is currently located at:
www.csd.uwm.edu/~whopkins/cbc/index.html
Return to the
comp.compilers page.
Search the
comp.compilers archives again.