Newsgroups: comp.lang.misc,comp.ai
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!uw-beaver!nntp.cs.ubc.ca!newsxfer.itd.umich.edu!jobone!news2.acs.oakland.edu!news.tacom.army.mil!news.webspan.net!ix.netcom.com!enews.sgi.com!news.sgi.com!howland.erols.net!news.mathworks.com!uunet!in3.uu.net!hearst.acc.Virginia.EDU!murdoch!elvis.med.Virginia.EDU!sdm7g
From: sdm7g@elvis.med.Virginia.EDU (Steven D. Majewski)
Subject: Re: Data driven control flow, and Python
X-Nntp-Posting-Host: elvis.med.virginia.edu
Message-ID: <E1Aqs9.5Bn@murdoch.acc.Virginia.EDU>
Followup-To: comp.lang.misc
Sender: usenet@murdoch.acc.Virginia.EDU
Bcc: sdm7g@Virginia.EDU
Organization: University of Virginia
References: <56vni0INNjn5@maine.cis.ohio-state.edu>
Date: Sat, 23 Nov 1996 00:02:33 GMT
Lines: 96
Xref: glinda.oz.cs.cmu.edu comp.lang.misc:27277 comp.ai:42362

In article <56vni0INNjn5@maine.cis.ohio-state.edu>,
mark carroll <carroll@maine.cis.ohio-state.edu> wrote:
>
>I am writing a program in which several complicated tree structures
>are generated. Tree nodes can generate branches with new sub-nodes,
>and functions can look at nodes, paste assessment data to them, and
>constraint checkers can look at the assessment data and kill subtrees
>accordingly.
>
>I started writing the program in C++. However, I found the memory
>management for this particular task sufficiently hairy [ ... ]

Right -- automatic memory management gives you one ( or more ) less
thing to worry about, so you can concentrate on the higher level 
problems. 

>
>Even so, a lot of the code I'm writing in Modula-3 now seems to be
>along the lines of: check if enough data is present for X to act, and
>if so invoke it and alter other data according to the results. I don't
>know any general purpose data driven programming languages, but it
>seems to me that my program might benefit from rich data-driven
>control structures. Does anyone know of any languages or books that
>might help me?
>

You might look in the AI literature -- I think the term is "blackboard
systems" : 
   A set of agent processes share a common message pool.
   They each look for certain activation patterns, which may cause
	them to add or delete messages.
   These new messages may cause further activations. 
The main difference between various system is the rules and protocols
for activating daemons/agents and managing the shared message pool. 
  The origin of this sort of architecture is Selfridge's "Pandemonium",
(1950's) which I assume was itself modeled on theories of visual 
perception ( "What the Frog's Eye Tells the Frog's Brain", etc. ),
and continues down to Minsky's "Society of Mind". 

[ CC-ing this to comp.ai -- maybe someone there can give you a more
  specific reference, or is more up to date on the state-of-the-art
  for those types of systems and programming tools. You might also
  start with the comp.lang.lisp and comp.ai FAQ's ]

>On a different note, I'm wondering if it might be worth my while
>learning Python someday? I am trying to learn an armoury of
>general-purpose powerful programming languages, which between them
>provide a rich and interesting selection of features. Things like
>Modula-3 and Common LISP are definitely on my list, and I'm not yet
>proficient in any scripting languages.

I'm a big fan of Python! 

I'ld note, however, that Python uses a reference counting memory 
management scheme, with doesn't handle circular references. ( I don't
know if that is a concern, your did describe your structures as 
"trees", but you also said "complicated", so maybe you mean to use
"tree" loosely. )

[ Someone on comp.lang.python reported some success with rebuilding
  it with a conservative garbage collector. ]

I'ld also note that Python is a little bit more than just a "scripting
language" -- I think it covers a wider range of applications, even
though it's also good for those quickie, one-time scripts. 
In particular, it's a good "glue" language: NASA is wrapping up some
of their legacy Fortran orbital calculation code in Python wrappers,
for example, to make it easier to do rapid prototype OO-GUI code 
without having to modify those thousands ( millions ? ) of lines 
of Fortran. 

Another interesting language to look at is Icon. 
( There is a comp.lang.icon for more info, and a web site at
arizona.edu ) 
It supports backtracking with coroutines and coexpressions,
and has some interesting control structures based on Success 
( yielding a value ) or Failure, rather that True or False. 


If you're trying to fill out your language armory with a variety
of tools, your should also look at functional languages like 
ML and Haskell. ( I'm assuming that if Common Lisp is on your
list, that so is Scheme. ) 

And, if we're talking about pedagogy, I'ld include a couple of
languages which aren't used much nowaday's ( or at least, *I* 
don't use them much anymore. ) -- they are both a bit out of
fashion for different reasons: FORTH and SNOBOL.
 

---|  Steven D. Majewski   (804-982-0831)  <sdm7g@Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---
         By doing just a little every day, you can gradually 
                let the task completely overwhelm you.
