home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!phage!boutell
- From: boutell@isis.cshl.org (Tom Boutell)
- Subject: Programming by Description of Output...
- Message-ID: <C01yxr.BGF@phage.cshl.org>
- Sender: news@phage.cshl.org
- Organization: Cold Spring Harbor Labs
- Date: Wed, 30 Dec 1992 03:27:27 GMT
- Lines: 42
-
- In learning about methods of proving algorithms correct (and the
- various difficulties of doing same), I have come to wonder
- to what degree it is possible to create a language in which
- the programmer specifies not the steps to be accomplished
- but rather the goal to be achieved-in other words, whether it
- is possible, working from a specification of the initial state
- and a specification of the final state, to derive an algorithm
- automatically which permutes the one into the other. I suppose
- this is similar to other generalized AI problem-solving tasks,
- but a notable advantage is that the goal state is well-defined
- (none of the AI problems of needing to operate in non-abstract
- universes come into play, at least not for a decently interesting
- set of cases).
-
- Are there languages/programming systems that attempt this sort
- of thing? I'm sure it's impossible to guarantee a solution
- to every request that has a possible solution, since this would
- imply the ability to prove that fact, and the statement of the
- problem is likely to be equivalent to second-order predicate
- calculus, in which a proof (by resolution) cannot be guaranteed
- in finite time. But if the system can recognize solved problems
- as subsets of the problem at hand, it can move more quickly toward
- assembling a solution, or deciding it's overwhelmed.
-
- An example of what I have in mind:
-
- 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?
-
- -T
-
- --
- Tom Boutell, boutell@cshl.org
-
- Clausthaler is the best non - alcoholic beer in the known universe.
-