coherent states

Jecel Assumpcao Jr
Wed, 24 Jun 1998 18:59:55 -0300

David Manifold wrote:
> The state is decentralized.  The way I do this is: each expression is a
> specification for the expressions within it.  The meaning of "state"
> depends on which expression you are in.  So, no, the state is not
> coherent, if coherent means there is any identifiable similarity between
> any arbitrary two parts of the system (such would be violation of
> genericity).  However, the state IS computable, since the meaning of each
> expression is specified by other expressions, and ultimately all
> specifications come together.  The place they come together is likely to
> be a formal implementation of logic and mathematics.

Hmm, I must have missed something here. It sounds like you saying
that expressions have a strict nesting - a tree-like structure. That
can't be right since any Useful system must be able to handle
generic graphs.

> Someone will wonder how one expression can define all the characteristics
> of something in it.  It can't.  That's why every part of an object's
> specification is defined in a *different* expression.  Each constraint in
> a specification needs to be orthogonal, so it's in a different object
> (This is what is meant by "many parents").

Ok - this confirms that graphs are possible. So let's explore
"decentralized".  Can I extend this to "distributed"? That is
where I have problems. Suppose I have a machine running Tunes
and you have another computer running it too. Would each
machine have a full copy of everything in the system (a
fully overlapped state)? Would we each get half of the
state (totally disjoint partition)? This last option isn't
practical unless you have an ideal communication system. We
might each a copy of some common part of the state plus some
local state that is not shared (partial overlap). In any case,
if I edit my copy of the common state then it will be different
from what you are using. You can make other changes which will
then make it impossible for us to merge our edits into a single
coherent state.

> I have in mind a kind of history, where you can set some objects to have
> their changes kept track of.  All this would require is a modification to
> the evaluator to keep a log of its actions instead of destroying the
> expression tree after evaluation is complete.  Then since the log is in
> the same representation as the expression, it is just another "version" of
> the state.  With the proof system, history could be compressed:
> any action proven to be recomputable can be left out of the log.

That sounds good.

> The identity of an object is defined as the combination of its
> specifications, also identical to its type, since what an object is
> specified as determines what operations can be done on it. 

But can't you have several objects of the same type? I
can see that an interesting system can be built where
each object is unique, but from the paragraph below that
doesn't seem to be the case. If so, several objects of
the same type may need separate identities.

> When you
> change an object, it doesn't affect its type, because you may only change
> it within the constraints of its type (you can't set an integer to be 2.4,
> for example).  However, if the object you are changing is a specification
> for some other object, the OTHER object's identity may change, but not the
> specification object itself-- because a specification object is written in
> a language, which is also limited within the constraints placed on it by
> higher-order objects.  So, basically, the security of the system protects
> the identity of objects under editing.

How do objects refer to one another? If you can change the
specification (object) for some object A, what happens to
all other objects that referred to A in some way?

> > You mean like  (car (quote (cdr car cond x))) --> (car '(cdr car cond
> > x))?
> I'm not sure what you're trying to say here.  Is the subject of the
> sentence the translation from 'quote' to (')?  If so, what is being
> delayed?  I thought 'quote' and (') were interchangeable, and both delayed
> evaluation.  (At least, they have the effect of delaying evaluation, by
> placing another layer around the expression.)
> > Or like  x>3 ifTrue: [ x := 10 ] ifFalse: [ x := 2 ] ?
> >
> > You do need something like that somewhere in the system.
> Like what?  Conditionals?  Sorry, I don't understand.

I am really sorry about this particularly obscure comment. I
should have written "or" instead of "-->" above. The two
ways of writing it are equivalent, but some people are only
familiar with (') while the first notation makes it clearer
that 'quote' is just another kind of expression.

Blocks in Smalltalk and Self, written between square brackets,
delay the execution of their code until sent the message 'value'.
If I had written the above as (in Self - Smalltalk would complain)

    x>3 ifTrue: ( x: 10 ) False: ( x: 2 )

then execution would not be delayed and the result would always be
the same (10 or 2, depending on the order of argument evaluation).
BTW, Smalltalk/Self doesn't have conditionals.

> OK, I admit it.  There is a global string.  It's called the IMAGE FILE.
> Like Squeak, initial implementations of Tunes will store all their state
> in a file on the disk.  I don't think this has anything to do with
> reflection, though; the image file is a way to implement persistence.

Exactly - it is persistance. But if the system allows you
to examine this thing in a user friendly way and reflects
any changes you make to this representation back to the
state/string/image file *then* you have reflection (obviously!).
When was the last time to got to muck around in a .EXE file?

> > If I want to add a little something to Tunes, where in
> > this global expression do I put it? This is a question
> > that doesn't make much sense in Smalltalk, Self or even
> > C, but is important in Beta, Scheme or Oberon. The
> > difference: lexical scoping (or not).
> Where do you put it?  Inside expressions that give you the features you
> want.  Putting something somewhere is the same as specifying it, since the
> system is the specification, the specification is a tree, and objects are
> "in" the branches of the tree that specify them... I don't think you can
> get lexical scoping as precise as Tunes, anywhere-- there is complete
> orgthogonality for EVERY feature.  For EACH feature of an object, the
> object is identified in a distinct location in the system tree.  Take away
> the feature means taking the object out of that location.  "Location" =
> "Set of objects with a property".

I can live with that (though "tree" popped up again!) since
in Cecil, multimethods don't live in any objects or live in
several at once, depending on how you look at it. I guess I
was back to identities again, but this time on the namespace
front. If I create a simple tic-tac-toe game in Tunes, how
do you find it to play it?

> Can you explain what you mean by a single coherent state?
> Then we can talk about comparing the network models of Merlin and Tunes :)

There are many computers in the world. If Tunes runs on
more than one of them, there are several options. Each
one can be a totally separate entity with very limited
(or no) communication between them. This is how Squeak,
Self 4.0, Lisp Machines, Windows and so on work.

An alternative is to imagine a global state that is the
sum of pieces stored on each machine. Examples would be
DNS and the WWW. In theory, these would be totally disjoint
partitions (as I defined above) but you need caching to
make it work in practice. This means that this single, global
state is not coherent.

A problem with these systems is that they tie identity
to location, and so are a little rigid. Another global
system that has a different model is the usenet (NNTP).
Each object (message) gets a unique ID when it is created
and it doesn't matter where it ends up being moved. I
would say this is the closest to what I am trying to do
in Merlin.

Other options are no doubt possible, but I can't come
up with any examples. TAOS (now Elate)? Helios? Why do
I keep thinking of OSes for the Transputer ;-) ?

> I hope to avoid traps because I will listen to criticism and try my best
> to meet it.  I am aware that Tunes makes extraordinary claims, but no one
> has convinced me it can't be done.  The only evidence so far is that it
> hasn't been done yet.  I highly suspect that the main reason it hasn't is
> that no one has been patient enough.

A lot of people make extraordinary claims. I was impressed
by how much the description of BeOS sounded like what I had
written about Merlin! The reality was quite different, of
course (I guess "complete break with the past" is in the eye
of the beholder). That crazy professor I mentioned before
said more or less the same things I did. But I knew that
coming from him, the words were utter nonsense while I could
actually do what I proposed. That made me feel like a
politician who has great plans for improving health and
education. What can you possibly say? You'll have to use
the same words all the others have said millions of times

I like to keep track of new OS projects on the internet
Practically none of these have the slightest chance. Even
some that are *very* humble are clearly way beyond the reach
of their authors (at least until they learn a little more).
I really think that Tunes is one of the few exceptions to

-- Jecel