home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!karr
- From: karr@cs.cornell.edu (David Karr)
- Subject: Re: Programming by Description of Output...
- Message-ID: <1992Dec30.174004.4168@cs.cornell.edu>
- Organization: Cornell Univ. CS Dept, Ithaca NY 14853
- References: <C01yxr.BGF@phage.cshl.org>
- Date: Wed, 30 Dec 1992 17:40:04 GMT
- Lines: 27
-
- In article <C01yxr.BGF@phage.cshl.org> boutell@isis.cshl.org (Tom Boutell) writes:
- >Initial state:
- >Array A[] contains n whole numbers.
- >Final state:
- >Array B[] contains n whole numbers such that each element of
- >A[] appears in B[] and for all i such that 1<=i<n, B[i]<B[i+1].
- >
- >How might the problem of calculating B[] (a sorted version of
- >A[]) be solved in a general fashion, absent a known
- >method of sorting?
-
- This sounds like automatic programming, which is an old idea.
- Frederick P. Brooks mentioned it in an article a couple of years ago,
- entitled (I think) "No Silver Bullet."
-
- How much easier is it to specify a program by predicates on its input
- and output rather than by an algorithm? I contend it's not as easy
- as one might hope. For example, is the following legal I/O for your
- specification:
-
- A[] (input): 3 2 1 3 2 1 3 2 1
- B[] (output): 1 2 3 3 3 3 3 3 3
-
- Each element of A[] appears in B[], but not with the same count of
- repetitions. Is this what you intended?
-
- -- David Karr (karr@cs.cornell.edu)
-