Philosophical musings: interpreting models

Alaric Williams alaric@alaric-williams.com
Thu, 9 Sep 1999 11:11:36 +0100 (BST)


On Thu, 9 Sep 1999, Jim Little wrote:

> I agree that portable software will always be partly the responsibility
> of the programmer.  The programmer has to think about what he codes and
> use the most general solution he can.  But I think what you're saying
> about library design applies equally well to language design. 
> Furthermore, I think high-level languages are preferable to high-level
> libraries.  The reason is that a compiler can't understand the semantics
> of a library, but it CAN understand the semantics of a new keyword.  The
> more a compiler understands, the more flexibility it has in producing
> code, and that translates to optomization and portability.

What, though, about designing a very simple language of atomic constructs
that can be easily theorised about etc. then defining a high level
powerful standard library in terms of that, BUT make sure that smarter
compiles can treat the standard library as special code generation cases
(this is hard in Scheme because IIRC you can theoretically assign your own
function to the symbol + and mess everything up :-)? Then you can:

1) Bootstrap a system on new architecture by just writing the simple
compiler and using standard source-code libraries

2) Later port the backend of a complex optimising compiler that deals with
most, of not all, of the standard library as fundamental syntactic
constructions, and implementing the rest in terms of special syntactic
constructs designed to allow hardware implementation of certain operations
internal to the remaining library functions

3) To prove properties, either try to prove the correctness of your
optimising compiler in terms of it being identical to the standard library
based on the axioms of your basic language, or prove/assume the
correctness of the simple compiler and use the standard library.

AVW

---==========================[ http://www.alaric-williams.com/ ]============---

	Almost three thousand years ago, I was on the comittee
	who designed Christianity... but it took us nine hundred
	years to get it past the risk assessment subcomittee :-(

---=========[ alaric@alaric-williams.com ]==================================---