home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!csus.edu!netcom.com!nagle
- From: nagle@netcom.com (John Nagle)
- Subject: Re: Programming by Description of Output...
- Message-ID: <1993Jan1.043329.27160@netcom.com>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <1992Dec30.174004.4168@cs.cornell.edu> <C036t1.KCH@phage.cshl.org> <BEVAN.92Dec31001940@panda.cs.man.ac.uk> <1992Dec31.155736.29068@cs.cornell.edu> <BEVAN.92Dec31202001@panda.cs.man.ac.uk>
- Date: Fri, 1 Jan 1993 04:33:29 GMT
- Lines: 29
-
- It's a beguiling idea, but it doesn't scale up well. We went through
- this back when formal specifications were being touted as the next big
- thing. It works well for a few simple cases:
-
- 1) The inverse of a function is much simpler to implement than
- the function.
- Example: square root.
-
- 2) The function has a simple but inefficient implementation that
- can be used as its description.
- Example: lookup-type operations, including relational databases.
-
- 3) The function can be well-expressed by a few constraints.
- Example: sorting.
-
- Unfortunately, not many applications seem to fall into these categories.
- Our experience in building an operating system this way was that the formal
- spec was about 1/3 to 1/2 the size of the code, and much harder to debug.
-
- However, if I were doing a database management system, or anything that
- basically stores and retrieves data, I'd consider specifying it formally
- in terms of its inputs and outputs. But it might be easier to write a
- "dumb" implementation, with everything in arrays and all lookups by
- brute-force search, and use that as a specification. Formal specs
- that you can't run are tough to work with.
-
- John Nagle
-
- John Nagle
-