home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / programm / 3404 < prev    next >
Encoding:
Text File  |  1993-01-04  |  5.4 KB  |  111 lines

  1. Newsgroups: comp.programming
  2. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!linus!linus.mitre.org!boole.mitre.org!crawford
  3. From: crawford@boole.mitre.org (Randy Crawford)
  4. Subject: Re: Programming by Description of Output...
  5. Message-ID: <1993Jan4.050905.8202@linus.mitre.org>
  6. Sender: news@linus.mitre.org (NONUSER)
  7. Nntp-Posting-Host: boole.mitre.org
  8. Organization: The MITRE Corporation, McLean, VA
  9. References: <C01yxr.BGF@phage.cshl.org>
  10. Date: Mon, 4 Jan 1993 05:09:05 GMT
  11. Lines: 98
  12.  
  13. In article <C01yxr.BGF@phage.cshl.org> boutell@isis.cshl.org (Tom Boutell) writes:
  14. >In learning about methods of proving algorithms correct (and the
  15. >various difficulties of doing same), I have come to wonder
  16. >to what degree it is possible to create a language in which
  17. >the programmer specifies not the steps to be accomplished
  18. >but rather the goal to be achieved-in other words, whether it
  19. >is possible, working from a specification of the initial state
  20. >and a specification of the final state, to derive an algorithm
  21. >automatically which permutes the one into the other. I suppose
  22. >this is similar to other generalized AI problem-solving tasks,
  23. >but a notable advantage is that the goal state is well-defined
  24. >(none of the AI problems of needing to operate in non-abstract
  25. >universes come into play, at least not for a decently interesting
  26. >set of cases). 
  27. >
  28. >Are there languages/programming systems that attempt this sort
  29. >of thing? I'm sure it's impossible to guarantee a solution
  30. >to every request that has a possible solution, since this would
  31. >imply the ability to prove that fact, and the statement of the
  32. >problem is likely to be equivalent to second-order predicate
  33. >calculus, in which a proof (by resolution) cannot be guaranteed 
  34. >in finite time. But if the system can recognize solved problems
  35. >as subsets of the problem at hand, it can move more quickly toward
  36. >assembling a solution, or deciding it's overwhelmed. 
  37. >
  38. >An example of what I have in mind:
  39. >
  40. >Initial state:
  41. >Array A[] contains n whole numbers. 
  42. >Final state:
  43. >Array B[] contains n whole numbers such that each element of
  44. >A[] appears in B[] and for all i such that 1<=i<n, B[i]<B[i+1].
  45. >
  46. >How might the problem of calculating B[] (a sorted version of
  47. >A[]) be solved in a general fashion, absent a known
  48. >method of sorting?
  49.  
  50. I see a couple of responses to your query.
  51.  
  52. 1)  John Koza of Stanford has written a recent text on the use of genetic 
  53.     algorithms in developing programs which have clearly defined start and 
  54.     end states.
  55.  
  56.     At AAAI-92 in San Jose, I saw him describe a system he had devised which
  57.     generated Lisp code for use in a Pac-Man game to maneuver yourself 
  58.     properly through the antagonists without being eaten, while also 
  59.     eating all the edibles as well as activating the occasional role-reversal 
  60.     triggers and then pursuing your pursuers.  It seemed to work rather well
  61.     in devising the program on its own with no human intervention, as I 
  62.     recall.  Of course, the Lisp was completely illegible.
  63.  
  64.     In this case, the goal state was an evaluation function which determined
  65.     where changes to the program might be made to improve the next generation
  66.     of the program.  It was an interesting idea.
  67.  
  68.  
  69. 2)  As someone else has pointed out, there's been a lot of work at all levels
  70.     of automatic programming from formal requirement specification languages
  71.     to verifiable implementation PLs to very-high-level PLs which bind the two 
  72.     together into a complete application development system.  
  73.  
  74.     As I see it, the problem with these is the fact that in any novel software
  75.     system, the fraction of the requirements which are known falls somewhere 
  76.     between 70% and 10%.  If the software developer (a domain expert, not a 
  77.     programmer) is to iterate through each version of the system, alternately 
  78.     specifying and then generating a new implementation, an awful lot of CPU 
  79.     horsepower will be necessary to regenerate each new system as the end user
  80.     looks at each incarnation and says, "No.  That's not quite what I had in 
  81.     mind.  Please change everything."
  82.  
  83.     Of course, something like this is in the cards eventually.  But considering
  84.     the mind-boggling complexity necessary to verify even a small bit of code
  85.     now, and the great difficulty in implementing a constraint-style PL to
  86.     perform all the algebraic translations and transformations necessary in
  87.     sych a system, a complete verifiable VHLPL is going to be a long time in 
  88.     coming, and a really useable system much longer yet.
  89.  
  90.     And then there's the ever-present looming spectre of the halting problem
  91.     to contend with.  Every program must necessarily be composed with only 
  92.     first-order predicate logical constructions and be complete in its
  93.     specification.  The VHLPL will have to be able to detect violations of 
  94.     these too.  So much for Lisp closures.
  95.  
  96.     Of course, this doesn't even begin to address the automatic programming 
  97.     of high level algorithmic constructs like "Give me an efficient solution 
  98.     to this problem."  And the system decides to use a dynamic programming
  99.     approach to a travelling salesman model of the problem.  Yeah.  Right.
  100.  
  101.     
  102.     Both are interesting, but not the place for your retirement investments.
  103.  
  104.  
  105.  
  106. -- 
  107.  
  108. | Randy Crawford        crawford@mitre.org        The MITRE Corporation
  109. |                                                 7525 Colshire Dr., MS Z421
  110. | N=1 -> P=NP           703 883-7940              McLean, VA  22102
  111.