Path: utzoo!utgpu!watmath!clyde!ima!compilers-sender From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.compilers Subject: Re: Why Can't We Build a C Compiler? Message-ID: <3099@ima.ima.isc.com> Date: 20 Dec 88 12:15:34 GMT Sender: compilers-sender@ima.ima.isc.com Reply-To: Nick Rothwell Lines: 35 Approved: compilers@ima.UUCP >"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 !mcvax!ukc!lfcs!nick -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { decvax | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request