Doing it better 1998-10-18 ### > We may as well do so, and admit to every computer scientist's hubris: we > think We Can Do It Better, and build the ultimate computer system. I'm > particularly interested in doing it from the ground up, starting with a VM > that is essentially a suitable calculus with an escape hatch ("execute > this") and building from there. My idea is that the very barest version > should be a few pages of C (to bootstrap it; thereafter a couple of kb of > virtual/machine code) containing enough of a user interface to allow the > entire system to be built up within itself in an exponentially > accelerating manner. > > I think we should arrange regular but infrequent times to talk about > aspects of the ultimate project, which should by rights be called Project > Omega, but that's terribly clichéd, so let's call it...er...something > else. Suggestions? Project Tau (last letter of the Hebrew alphabet); > Project One (last letter of the binary alphabet); Project Zero (first > ditto, simplicity)...I think we can be more involved. > > Anyway, it'd be nice if we could (slowly) make progress...even if we end > up doing things and throwing them away. (I saw a group called "Programmers > Without Deadlines" which sums up the spirit.) Absolutely. VMs, Process Algebrae, Midas, Slave processors, no more Acorns, Bill Gates, Your jammy year, ... it all points in the same direction. I've been thinking. Funnily enough. If we could make an assembler which simultaneously checked a proof about the code's behaviour (which is trivial compared to creating one), we could make a computer which doesn't crash. I know this is not a new idea. Surely it's a good one, though. It needn't make the thing a bugger to code, either. For example, a Java compiler can easily create a proof about any legal Java program. C would be harder, but I don't really want people to use C. Any interpreted language would be fine. The next question is how to go about it. Briefly, here is a possible scheme: We invent a datatype called a fact. It obeys ML-like pattern matching. We invent a directive ASSERT which returns a fact, after assembling a check that the fact is true. The way in which an ASSERT is assembled could be defined when the fact operators are declared...? _Amazing! I've been working on this last week (Nov 2004)! [Alistair|A]_ A normal instruction is a macro which takes a few operands and destinations, and also takes facts about them. It assembles the instruction and returns facts about the state after executing the instruction. There are also dummy instructions which assemble nothing, but which perform pure reasoning on facts. For example, a=>b and b=>c could be combined to form a=>c. Another example is an instruction which weakens a fact. For example, at the label of a loop, you might want to weaken x=10 to x>0. Explicit induction would not be necessary. Inductive proofs can be checked by unifying the facts at a branch and its target label. For example, to prove that x is always in [1..10] at PRINT x in the following program: x:=10 {x=10} Weaken {0