home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.theory
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!udel!sbcs.sunysb.edu!sbcs!stark
- From: stark@cs.sunysb.edu (Gene Stark)
- Subject: Re: Synthesizing loop invariants -- unsolvable?
- In-Reply-To: dsims@don.ece.uc.edu's message of Thu, 5 Nov 1992 23: 06:48 GMT
- Message-ID: <STARK.92Nov6074546@sbstark.cs.sunysb.edu>
- Sender: usenet@sbcs.sunysb.edu (Usenet poster)
- Nntp-Posting-Host: sbstark
- Organization: SUNY at Stony Brook Computer Science Dept.
- References: <1992Nov5.230648.23466@babbage.ece.uc.edu>
- Date: Fri, 6 Nov 1992 12:45:46 GMT
- Lines: 21
-
- >I've been thrashing about with the problem of automatically generating
- >loop invariants for the purposes of program verification. Is the general
- >case of automatically synthesizing a loop invariant for any given loop
- >unsolvable?
-
- The standard proof of (Cook) relative completeness for Hoare logics proceeds
- by showing how, given a desired postcondition expressed as a formula in a
- suitable first-order language, one can can construct a formula expressing
- the weakest precondition that will guarantee the postcondition upon
- termination. Finding these weakest preconditions includes the problem of
- finding loop invariants. The proof actually constructs the formulas, so
- the problem of synthesizing loop invariants is solvable. However, the
- formulas themselves are in no way guaranteed to be "simple" or "understandable"
- as they involve a number-theoretic encoding of possible program executions.
-
- For more information, a good reference is: "Mathematical Theory of Program
- Correctness", by de Bakker.
-
- - Gene Stark
-
-
-