Re: Why Can't We Build a C Compiler?

Nick Rothwell <nick@lfcs.ed.ac.uk>
Tue, 20 Dec 88 12:15:34 GMT

          From comp.compilers

Related articles
Why Can't We Build a C Compiler? acw!guthery@uunet.uu.net (1988-12-18)
Re: Why Can't We Build a C Compiler? pardo@june.cs.washington.edu (1988-12-19)
Re: Why Can't We Build a C Compiler? peterd@june.cs.washington.edu (1988-12-21)
Re: Why Can't We Build a C Compiler? henry@zoo.toronto.edu (1988-12-21)
Re: Why Can't We Build a C Compiler? nick@lfcs.ed.ac.uk (Nick Rothwell) (1988-12-20)
Re: Why Can't We Build a C Compiler? seanf@sco.uucp (1988-12-23)
Re: Why Can't We Build a C Compiler? daveb@lethe.uucp (1988-12-26)
Re: Why Can't We Build a C Compiler? olender@rachmaninov.CS.ColoState.EDU (1988-12-28)
Re: Why Can't We Build a C Compiler? frode@m2cs.naggum.se (Frode Odegard) (1988-12-29)
Re: Why Can't We Build a C Compiler? unido!gmdzi!jc@uunet.uu.net (1989-01-05)
Why can't we build a C compiler? think!compass!worley@EDDIE.MIT.EDU (1988-12-19)
[5 later articles]
| List of all articles for this month |
From: Nick Rothwell <nick@lfcs.ed.ac.uk>
Date: Tue, 20 Dec 88 12:15:34 GMT

>"C is not a `very high level' language, nor a `big' one ...". Its syntax
>and semantics are well-defined.


I don't think this is the case, although I'm probably out of touch
with C standards. I thought there were problems with aliasing and so
on which weren't properly resolved. And I won't even mention the
hornet's nest that's opened when you start to think of all the
interactions with the macro preprocessor.


John's comment:
>[This point is well taken. I would think that with all of the theory
>available to compiler writers, compilers would be prime targets for software
>engineering techniques such as formal verification, of parts at least. Beats
>me why not. -John]


This is the approach we've taken with the ML project. Standard ML is,
to my knowledge, the only language to have a complete formal semantics
(which is *not* huge - 97 pages). Does Ada have one? How big is it?
The semantics serves as a reference for building compilers - there
are, I believe, 3 compilers respecting the semantics. I'm not going
to claim that they're all bug-free or absolutely conformant yet - ML
is a language very different from conventional languages like C or
PASCAL, and the implementation techniques are still very new - but the
task of compiler development is possible with small teams of compiler
writers (by small, I mean 1 or 2 persons).


Nick.
--
Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh.
nick@lfcs.ed.ac.uk <Atlantic Ocean>!mcvax!ukc!lfcs!nick
--


Post a followup to this message

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