Re: Using Prolog to Compile Things

Daniel.Diaz@inria.fr (Daniel Diaz)
22 May 1999 03:00:02 -0400

          From comp.compilers

Related articles
Using Prolog to Compile Things nickroberts@callnetuk.com (Nick Roberts) (1999-05-16)
Re: Using Prolog to Compile Things gsg@mimuw.edu.pl (1999-05-20)
Re: Using Prolog to Compile Things fjh@cs.mu.OZ.AU (1999-05-21)
Re: Using Prolog to Compile Things bmd@cs.kuleuven.ac.be (1999-05-21)
Re: Using Prolog to Compile Things anton@mips.complang.tuwien.ac.at (1999-05-22)
Re: Using Prolog to Compile Things gkt37@dial.pipex.com (JT) (1999-05-22)
Re: Using Prolog to Compile Things Daniel.Diaz@inria.fr (1999-05-22)
Re: Using Prolog to Compile Things bmd@cs.kuleuven.ac.be (1999-05-27)
Re: Using Prolog to Compile Things bromage@cs.mu.OZ.AU (1999-05-27)
Re: Using Prolog to Compile Things hunk@alpha1.csd.uwm.edu (1999-06-02)
Re: Using Prolog to Compile Things nickroberts@callnetuk.com (Nick Roberts) (1999-06-06)
Re: Using Prolog to Compile Things guerby@acm.org (Laurent Guerby) (1999-06-12)
| List of all articles for this month |
From: Daniel.Diaz@inria.fr (Daniel Diaz)
Newsgroups: comp.compilers
Date: 22 May 1999 03:00:02 -0400
Organization: INRIA Rocquencourt
References: 99-05-069
Keywords: prolog

Nick Roberts <nickroberts@callnetuk.com> writes:
|> Has anyone on this ng experience or knowledge of the use of Prolog to
|> implement a native-code compiler for a typical high-level imperative
|> language? I am toying with the idea of using Prolog for the lexer, the
|> parser, the intermediate (library) code generator, and the end-code
|> generator (and even, in effect, for linking!), i.e. the 'whole shebang'.
|> I'm even toying with the idea of having (most) of the IDE written in Prolog,
|> and thus tightly integrating the compiler and IDE.


You can use GNU Prolog (http://pauillac.inria.fr/~diaz/gnu-prolog) to
both write your compiler(s) and to look at the Prolog compiler. Indeed
GNU Prolog produces stand alone native executables (useful to obtain a
command-line compiler) and its Prolog compiler is written in GNU
Prolog (bootstrapped). Another interesting point is that GNU Prolog
includes a powerful constraint solver over finite domains. Constraint
programming can help you when trying to optimize the code
(e.g. register allocation,...).


There is also a project at INRIA working on compilation using Prolog
in a part of the compilation scheme. You can ask
Christine.Eisenbeis@inria.fr.


--
===============================================
                                  Daniel Diaz
University of Paris 1 INRIA Rocquencourt
      75013 Paris 78153 Le Chesnay Cedex
          FRANCE FRANCE
                email: Daniel.Diaz@inria.fr


Post a followup to this message

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