Taxonomy of Facets & Composites
Ken Kahn
kenkahn@toontalk.com
Mon, 31 Jul 2000 09:45:35 -0700
I wrote:
> >But let's look at the receive rights. What is different about CLP is that
an
> >individual process is very similar to (I think it is even
indistinguishable
> >from) a collection of processes. An individual process might hold several
> >receiving ends of channels. It might react to individual messages on
those
> >channels or it might wait for some subset. It can at any time receive new
> >channel receive capabilities or pass them along to others. In other words
an
> >individual process behaves the same way a collection of processes do. The
> >parallel composition of 2 CLP processes is of type CLP process. But the
> >parallel composition of 2 actors isn't an actor - it's a composite that
has
> >different semantics.
>
And MarkM wrote:
> I used to believe this, but here's a counter-example, sort-of. "ce"
stands
> for "counter-example". Apologies as well that this is by no means a
minimal
> example. It's just the first one that occurred to me. Excuse my syntax,
> it's been more than 10 years since I wrote any CLP code. In particular, I
> can't quite remember the "?" rules in FCP.
>
> ce(In) :- ce(In?, 0).
>
> ce([spawn(Count, DoubleCE?) | Rest?], Count) :-
> DoubleCount = Count * 2,
> CountPlusOne = Count + 1 |
> ce(DoubleCE, DoubleCount),
> ce(Rest, CountPlusOne).
>
> Each individual "ce" process has a count, and responds to one message --
> "spawn" of two arguments. This first argument should be an unbound
variable
> and will be bound to this ce process's count. The next spawn message to
the
> "same" (ie, successor) process will get the next count, which is one plus
> the current count. The second argument to spawn is treated as the receive
> side of a communications channel to a new ce process that starts with
double
> the count of the current one.
>
> Considering all the processes spawned by an initial ce process as a single
> composite, this composite has an unbounded number of facets. At any
moment
> it has only a finite number of facets, but so what? Any straightforward
> notion of transforming a network of processes into a single process will
> result in a process that only reads a finite and statically determined set
> of variables (has a static set of facets). A CLP process can read from an
> unbounded number of logic variables only by using a data structure to keep
> track of them. However, once we resort to such a data structure, we're
> starting to implement the language in itself, which I would hope is
outside
> the spirit of the aggregation you have in mind.
>
This is an interesting point. But it seems you are agreeing with the
statement that any network of processes can be transformed into a single
process - i.e. that a composition of processes and a single process have the
same semantics. Your counter example illustrates this isn't very practical
since it would be hard to keep everything bottled up in a single process.
But you can preserve semantics by collapsing multiple processes into one or
by splitting one into many. In your ontology the corresponding statement is
much more complex since collections (aggregates) and individuals (objects)
are different semantic entities.
An important point is that the comma at the end of "ce(DoubleCE,
DoubleCount)," produces something of type process (this is a type at the
semantic level not the language-level) from the process created by
"ce(DoubleCE, DoubleCount)" and the process created by "ce(Rest,
CountPlusOne)".
Best,
-ken