[M3devel] C-- (was: general purpose C libraries (C Kernel))

Daniel Alejandro Benavides D. dabenavidesd at yahoo.es
Tue Jul 12 00:13:08 CEST 2011


Hi all:
perhaps somehow unrelated of the topic but anyway, there is a JIT compiler interpreter for for C, a subset and superset of it. It's based also in lcc front end, using BURS an have apparently good timings (I guess there is one of those C-- based on lcc as well to generate C, is that true?), see:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.9879

There was also in DEC-SRC a ML, and Lisp implementations with Modula-2+ RT, there is one technical report (I can't find the reference anymore, later), and there is some material back from 1980s
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.2417

http://mumble.net/~jar/tproject/

There should be copies of those reports for anyone of us I believe (Paul McJones is very helpful there, last time I wrote him he answered fast):
http://www.softwarepreservation.org/projects/LISP/embedded/

In case it matters the probably best thing would be to compile JIT everything in Abadi-Cardelli calculus ZINC based machine, then compile it to M3CG (see first paragraph and previous web pages) to C-- to C and using the mentioned compiler run the code, I suppose M3CG has RT support doesn't it? I have one target of the C generated code, pretty open and compatible:
http://www.ncbi.nlm.nih.gov/IEB/ToolBox/SDKDOCS/CORELIB.HTML

I have seen there at DEC worked hard to have good compiler infrastructure, the Vesta and Vulcan Development Environment bridge are pretty big pieces of work,, from the above the most interesting for a possible Baby Modula-3 compiler/interpreter is:
http://mumble.net/~kelsey/papers/comp-by-prog-trans.ps.gz

Maybe this is enough to build one of such if there is value (maybe it is with dynamic linker/optimizer mlcc and mld, a Modula-3 linker would help this much too, I'm not aware of one in existence, just

http://www.sts.tu-harburg.de/projects/Tycoon/p-quest.html

Which is a very similar so stack representation, compiler, interpreter, debugger, linker)

Thanks in advance

--- El vie, 8/7/11, Hendrik Boom <hendrik at topoi.pooq.com> escribió:

> De: Hendrik Boom <hendrik at topoi.pooq.com>
> Asunto: Re: [M3devel] C-- (was:  general purpose C libraries (C Kernel))
> Para: m3devel at elegosoft.com
> Fecha: viernes, 8 de julio, 2011 15:16
> On Wed, Jul 06, 2011 at 04:53:31PM
> -0400, Hendrik Boom wrote:
> > On Tue, Jul 05, 2011 at 09:53:43PM -0400, Hendrik Boom
> wrote:
> > > On Tue, Jul 05, 2011 at 08:10:15PM +0100, Daniel
> Alejandro Benavides D. wrote:
> > > > C-- comes handy to this limited portability
> tasks, I wonder why people 
> > > > don't use it. Maybe the same reason about
> Modula-3 too.
> > > 
> > > Perhaps because as far as I know the only code
> generator for C-- 
> > > generates 32-bit Intel code.  That doesn't
> provide much in the way of 
> > > portability.
> 
> Looking at the current source code for qc--, there appear
> to be 
> filenames for code genreators for the alpha, sparc, ia64,
> mips, x86.  
> How many of these are in working order I don't
> know.   There seem to be 
> subdirecotries of a test2 directory called ppc, sparc,
> x86.  These are 
> recognisable processor names, so maybe there's hope for
> some of these.  
> I know the x86 works; I'm using it.  Maybe I should
> look into ia64 
> sometime.
> 
> Things might possibly not be as dismal as I thought.
> 
> > > 
> > > There's rumours of other code genrators, but I
> haven't seen them yet.
> > 
> > Here's some info from the C-- site:
> > 
> > Other C-- compilers
> > 
> > : Fermin Reig's cmmc is implemented in Standard ML on
> top of the MLRISC code generator. It emits assembly code for
> the Alpha, Sparc, and X86. It implements an obsolete version
> of C-- and is no longer maintained.
> > 
> > : The Trampoline C-- Compiler by Sergei Egorov, which
> seems to have disappeared from the Web. The Trampoline C--
> compiler implements the obsolete May, 1999 specification and
> compiles to C. The author says: it is slow, requires too
> much memory, and generates slow C code. But, from the other
> hand, it implements almost all of original C-- specification
> (including runtime interface), the generated code is
> readable, portable, and hopefully correct.
> > 
> > : The Oregon C-- compiler was the first prototype
> implementation of C--, also on top of MLRISC. It has been
> honorably retired.
> > 
> > -- http://www.cminusminus.org/code.html
> > 
> > Note that none of these are the rumoured ones I
> mentioned.  But 
> > that same web page mentions a system called OCamlBurg,
> which 
> > seems to be a parser generator that parses trees
> instead of 
> > strings.  It can be used for instruction
> selection in a code 
> > generator.  Maybe it's time I looked into it.
> > 
> > -- hendrik
> > 
> > > 
> > > Well, there is a portable byte-code interpreter
> written in C, but 
> > > that's very specifically not the point of C--.
> > > 
> > > -- hendrik
> 
> -- hendrik
> 
> 



More information about the M3devel mailing list