Re: Translating OO program to procedural program

"oliverhunt@gmail.com" <oliverhunt@gmail.com>
11 Oct 2006 23:17:42 -0400

          From comp.compilers

Related articles
Translating OO program to procedural program samhng@gmail.com (=?iso-8859-1?B?bW9vcJk=?=) (2006-10-10)
Re: Translating OO program to procedural program pjb@informatimago.com (Pascal Bourguignon) (2006-10-11)
Re: Translating OO program to procedural program oliverhunt@gmail.com (oliverhunt@gmail.com) (2006-10-11)
Re: Translating OO program to procedural program napi@axiomsol.com (napi) (2006-10-11)
Re: Translating OO program to procedural program mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2006-10-11)
Re: Translating OO program to procedural program torbenm@app-6.diku.dk (2006-10-11)
Re: Translating OO program to procedural program englere_geo@yahoo.com (Eric) (2006-10-11)
Re: Translating OO program to procedural program DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-10-11)
Re: Translating OO program to procedural program int2k@gmx.net (Wolfram Fenske) (2006-10-11)
[3 later articles]
| List of all articles for this month |

From: "oliverhunt@gmail.com" <oliverhunt@gmail.com>
Newsgroups: comp.compilers
Date: 11 Oct 2006 23:17:42 -0400
Organization: Compilers Central
References: 06-10-039
Keywords: OOP, comment
Posted-Date: 11 Oct 2006 23:17:42 EDT

moop wrote:
> I am working on a project translates OO programs to procedural
> programs, such as translating C++ to C and the like. I hope this
> effort can be spreaded out to other langs, so I am working on to
> abstract the common issues of doing so. I know there is a pinoneer
> attempt is C Front which produce C++ programs via a C compiler, I want
> to have a look on that, but still cannot find it now, anyone can
> suggest this to me?


What you're trying to do is a very well understood task, as all object
oriented languages must be compiled to non OO code (well, excluding
interpreted languages, and those compilers targeting OOVMs -- though
in that case the vm is taking over the task of converting to non-oo
structures).


Anyway, I have answered a similar question before in this thread,
going over the basic of how single inheritance works in a vtable based
OO language. I can't remember when i posted (John, you may know), but
i have a copy in my poorly updated and unread blog --
http://thepageofdoom.blogspot.com/2006_03_01_thepageofdoom_archive.html


--Oliver
[It's http://compilers.iecc.com/comparch/article/06-03-083. Google is
your friend; I've designed the archives to be very thoroughly indexed.
  -John]


Post a followup to this message

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