On 2007-06-24 at 15:46BST "Lindsay Marshall" wrote: > > 1) If you don't know how computers work, you don't know how > > compilers work. (Obviously!) > > How is that obvious? I can certainly conceive of knowing > how compilers work without knowing how a computer works - > there are processes involved that can be explained by > analogy without referring to actual computers.
I don't follow. An analogical explanation on its own doesn't lead to knowing how something works, and the presence of processes that can be explained that way doesn't cover the whole thing. Once you know enough about how computers work (together with some parsing theory and computation theory), you can write compilers, but writing a compiler without knowing how computers work (at some level of abstraction) looks impossible to me -- and if you can't write one, you don't really know how they work. The crucual thing in all of this is that parenthetical remark. The logical series in my previous message doesn't really prove that no one understands how computers work, just that the inference steps aren't valid -- if you can understand how a target machine "works" at the level of a register transfer model, you know enough to write a compiler back-end for it without needing to know anything about integrated circuits. If you know the abstract machine of a compiler back-end, you can write a code generator for it without understanding the register transfer model of any real target machine. If you understand the abstraction represented by the parse trees required by such a code generator, you can write a parser to turn a programming language into that, again without knowing how the abstract machine works. And if you have a full understanding of the abstraction represented by a (properly designed) programming language, you can write a large class of programme in it without understanding how its compiler works. (and the programmes would work just as well if the underlying machine were replaced with one based on optics rather than electronics. Unfortunately properly designed languages are as common as hens' teeth). But it is true that no one knows how computers work, because they're (very nearly) deterministic machines built on quantum mechanical indeterminism, and reconciling that is an unsolved problem. -- Jón Fairbairn [EMAIL PROTECTED] 31 Chalmers Road [EMAIL PROTECTED] Cambridge CB1 3SZ +44 1223 570179 (after 14:00 only, please!) ---------------------------------------------------------------------- PPIG Discuss List (discuss@ppig.org) Discuss admin: http://limitlessmail.net/mailman/listinfo/discuss Announce admin: http://limitlessmail.net/mailman/listinfo/announce PPIG Discuss archive: http://www.mail-archive.com/discuss%40ppig.org/