home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / programm / 3378 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.programming
  2. Path: sparky!uunet!gatech!rpi!batcomputer!cornell!karr
  3. From: karr@cs.cornell.edu (David Karr)
  4. Subject: Re: Programming by Description of Output...
  5. Message-ID: <1992Dec31.155736.29068@cs.cornell.edu>
  6. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  7. References: <1992Dec30.174004.4168@cs.cornell.edu> <C036t1.KCH@phage.cshl.org> <BEVAN.92Dec31001940@panda.cs.man.ac.uk>
  8. Date: Thu, 31 Dec 1992 15:57:36 GMT
  9. Lines: 28
  10.  
  11. In article <BEVAN.92Dec31001940@panda.cs.man.ac.uk> bevan@cs.man.ac.uk (Stephen J Bevan) writes:
  12. >Getting back to the sorting example: if the arrays are changed to
  13. >lists, then a spec is :-
  14. >
  15. >  sort(List, Sorted_List) :-
  16. >    permutation(List, Sorted_List),
  17. >    ordered(Sorted_List).
  18. >
  19. >Suitable definitions of `permutation' and `ordered' are left as an
  20. >excercise for the reader.
  21.  
  22. My impression is that most of the work of writing this specification
  23. is in the spec of "permutation", a smaller amount is in "ordered", and
  24. the part shown above is trivial in comparison.  So the above example
  25. doesn't make much of an impression on me.
  26.  
  27. >[...]  Someone here did some
  28. >work on automatically transforming Prolog programs (the thesis
  29. >specifically covers generation of various sort routines from the above
  30. >spec).
  31.  
  32. Good, I figured someone would be working on this.  I could be surprised
  33. by the results.
  34.  
  35. -- David Karr (karr@cs.cornell.edu)
  36.  
  37.  
  38.  
  39.