Re: An expression compiler with run-time interpretation?

Silvius Rus <rus@tamu.edu>
28 Sep 2000 22:17:49 -0400

          From comp.compilers

Related articles
An expression compiler with run-time interpretation? TArcidiacono@bridge.com (Tom) (2000-09-21)
Re: An expression compiler with run-time interpretation? peter_flass@my-deja.com (2000-09-23)
Re: An expression compiler with run-time interpretation? mikael.lyngvig@toolwood.dk (Mikael Lyngvig) (2000-09-23)
Re: An expression compiler with run-time interpretation? nr@labrador.eecs.harvard.edu (2000-09-24)
Re: An expression compiler with run-time interpretation? rus@tamu.edu (Silvius Rus) (2000-09-28)
| List of all articles for this month |
From: Silvius Rus <rus@tamu.edu>
Newsgroups: comp.compilers
Date: 28 Sep 2000 22:17:49 -0400
Organization: Texas A&M University
References: 00-09-146
Keywords: parse

In case you evaluate the same expression many many times you might
consider generating native code at run-time. There are some research
compilers that might help such as DyC (University of Washington) or
tcc (MIT).


Of course you could just print the expression into a file, wrap a
function body around it, call your favourite compiler on it then link
it dynamically to the caller. Even though there are no practical uses
of this idea in this form, the systems mentioned above are its best
implementations (that I know of).


You could look for other results using "Partial Evaluation" as your
search keyword. It is an older issue and people talked a lot about
it.


Good luck,
Silvius


Tom wrote:


> I'm building an application that must be able to read arithmetic
> expressions (such as x = 12 * ((y + z)/ (sqrt(y))) ) from an external
> text file at runtime, "compile" them. The evaluation may have to happen
> multiple times during the
> life of the program, as the variable values may change.


--
Silvius Rus
www.cs.tamu.edu/people/silviusr


Post a followup to this message

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