Saturday, September 27, 2008

COSA: A New Kind of Programming, Part II

Part I, II, III, IV, V, VI

Abstract

In Part I of this multi-part article, I wrote that the master/slave approach to elementary behavior control in the COSA programming model should be extended to high-level software construction. My thesis is that this control mechanism is so simple and intuitive that it will revolutionize computer programming by moving it out of the exclusive realm of computer nerds into that of the average computer user. Since COSA is inherently parallel, this will, in effect, solve the parallel programming problem. Below, I go over the elementary principles of control used in COSA.

Effector Control

Most of us are familiar with the controls that come with many of our electrical and electronic appliances. Some may be a little bit fancier than others but almost all come equipped with a minimum set of controls: the on/off (start/stop) buttons. To reuse the metaphor of the previous post, we are the masters and the appliances are the slaves. It turns out that motor command neurons in the brain’s basal ganglia use a similar method to control their target muscles: excitatory (start) and inhibitory (stop) signals. The way it works is that the neuron begins firing as soon as it receives an excitatory signal and stops firing when it receives an inhibitory signal. This is what gave me the original idea for COSA effectors. The addition effector shown below will repeat its operation over and over until it receives a stop command.

A single motor command neuron may receive excitatory and inhibitory signals from hundreds or even thousands of afferent synaptic connections. It goes without saying that the basal ganglia are using some kind of error detection mechanism in order to keep all those incoming control signals from conflicting with one another. COSA effectors, too, use a special mechanism that automatically detects command conflicts. It is applied during application development for debugging purposes and it is based on what I call the principle of motor coordination:
No action can be started if it has already started, or stopped if it is already stopped.

In sum, low-level behavior control in COSA is a very simple thing that even children can grasp. In Part III, I will explain how to control the behavior of high-level COSA components by applying the same principles used with elementary objects.

Related articles:

How to Solve the Parallel Programming Crisis
Parallel Computing: Why the Future Is Compositional

2 comments:

James said...

Hi, sorry this is slightly off-topic.

I want to ask if you've put any thought into what these ideas might have on linguistics.

Do you think that the sequential nature of natural languages is inherently algorithmic, or is there possibly a way to parallelize verbal or written communication, perhaps along the lines of polysynthetic languages?

Jamin said...

I would say that these ideas have direct relevance to natural languages, but to me it seems that the way linguistics is currently done is assuming that functional classification of language is the way to go, i.e. algorithmic.

If algorithmic approaches worked, we would have decent speech recognition by now.

Language is a complex system and a sloppy mess of affairs where terms of speech that we recognize eventually emerge, much like evolution.

But trying to classify will always leave holes (remember diagramming sentences in grade school?), as we have seen. So yes, using a bottom-up approach with "cell nets" (say Cellular Neural Networks) will probably yield better results than top-down categorical ones.

But who knows if anyone has attempted this yet.