HLL

Francois-Rene Rideau rideau@clipper.ens.fr
Tue, 21 Feb 95 23:55:55 MET


Dear joyous tunespeople,
  it seems that everybody is waiting for me to complete the full HLL
specifications before any further work is done.

  So here is a rough draft that tries to fill the gaps in the WWW page
I think the HLL WWW pages settle well the requirements for the language,
and its basic semantics. Here is how I see things should get implemented,
and what kind of syntax I propose:

* the language is completely context-dependant (the only such language
I know is FORTH, but it's too low-level for our HLL purpose here);
that is, any program dynamically defines its context, and proper context
may allow to further pars any kind of language specialization.
If you allow reuse of contexts, this means just *any* existing language
is a sublanguage of ours.

* there is an underlying semantics (call it OO) in which we have objects
well defined in a well-defined context, which completely describes the
object, without semantical possibility to short-circuit its services:
if I define an object that is the number 1 in the theory of integers,
I cannot access it as a pointer, or modify its value from behind, or
whatever. A constant object is indeed constant, etc.

* the language just maps the context dependent-stuff and creates
objects in which the context is explicit to the system.
Actually, this is done by allowing dynamic language reflection.

* standard basic contexts are provided:
- a standard LLL, a minimalistic FORTH variant (with different
dictionary and buffering semantics) would be used to write the entire
HLL upon, as natural extensions to it.
- a dynamic annotation system: allows you to dynamically add new
attributes
- a closer/specializer that irreversibly specializes an object without 

- various mathematical abstractions, including lambda-calculus,
true integers, etc.
- various objects for standard computing: system integes, lists,
arrays, hash-tables, trees, balanced trees, etc.

- context-modifying objects to accept C syntax, LISP syntax, or
whatever syntax for the previous objects.


* thus, here is a standard program assuming initial context only contains
other standard contexts:

#open "ANS FORTH CORE" {
  : foo  dup + 1 - ;
}

#open "ANSI C" {
  int rghzt (void* a) { return foo(*(char*)a }
  #see that rghzt is safe when a is a valid char*
  #open "POSIX.1" {
    /* mangle with TCP/IP sockets */
  }
}

#open "COMMON LISP" {
  (prin1 (rghzt "aer"))
}

#open "natural language" {
  Hello, old chap ! Tell me, what's the square root of 1024 ?
}


we see that anything can be done using the HLL. Tha's most important.
The full HLL semantics *requires* garbage collecting, dynamic
*active* annotations (see HLL page).
But then, the specializer object can be used to scale down objects
to semantics w/ more efficient implementations, so we lose nothing.

Well, that's one.
now, what will be
1) the standard syntax we use
2) the standard programming style we use
3) the standard policy to resolve user-configurable annotations
4) the standard policy to avoid the system crumbling under mutually or self
   contradictory user-added annotations

that's for my next message...