Skip to main content Accessibility help
×
Hostname: page-component-7bb8b95d7b-2h6rp Total loading time: 0 Render date: 2024-09-30T07:18:50.859Z Has data issue: false hasContentIssue false

6 - Tautological constraints

Published online by Cambridge University Press:  03 September 2009

J. C. Huang
Affiliation:
University of Houston
Get access

Summary

As demonstrated in the preceding chapters, inserting certain state constraints into a program often allows the resulting program to be simplified. The program so produced, however, is in general a subprogram of the original program. To simplify a program, therefore, one needs to simplify a set of its subprograms, and then recompose the program from the simplified subprograms. Now, if the inserted constraint is tautological (see Definition 3.9), the resulting program is equivalent to the original. Therefore, we may be able to simplify a program directly by using tautological constraints. The ability to find tautological constraints is important in that, when we work with a loop construct, we often need to find its loop invariants that may allow us to simplify the loop body. Because a loop invariant is a condition that is true just before the loop is entered, the tautological constraints that immediately precede the loop construct often give us the clues as to what might be the invariant of that loop. Subsequently given is a set of relations that can be used for this purpose.

Corollary 6.1

/\Q; x := E ⇔ /\Q; x := E;/\(Q′ ⋀ x = E′)x′→E−1

where (Q′ ⋀ x = E′)x′→E−1 is a predicate we construct by following the subsequent steps:

We obtain Q′ and E′ from Q and E, respectively, by replacing every occurrence of x with x′, and then replacing every occurrence of x′ with E−1.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2007

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Tautological constraints
  • J. C. Huang, University of Houston
  • Book: Path-Oriented Program Analysis
  • Online publication: 03 September 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511546990.007
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Tautological constraints
  • J. C. Huang, University of Houston
  • Book: Path-Oriented Program Analysis
  • Online publication: 03 September 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511546990.007
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Tautological constraints
  • J. C. Huang, University of Houston
  • Book: Path-Oriented Program Analysis
  • Online publication: 03 September 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511546990.007
Available formats
×