Skip to main content Accessibility help
×
Hostname: page-component-7bb8b95d7b-2h6rp Total loading time: 0 Render date: 2024-09-28T18:43:05.034Z Has data issue: false hasContentIssue false

4 - Program set

Published online by Cambridge University Press:  03 September 2009

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

Summary

As mentioned before, by inserting a constraint into a program, we shrink the domain for which it is defined. To reverse this process, we need to be able to speak of, and make use of, a set of subprograms. To this end, a new programming construct called a program set is now introduced. The meaning of a program set, or a set of programs, is identical to the conventional notion of a set of other objects. As usual, a set of n programs is denoted by {P1, P2, …, Pn}. When used as a programming construct, it describes the computation prescribed by its elements. Formally, the semantics of such a set is defined in Axiom 4.1.

Axiom 4.1

wp({P1, P2, …, Pn}, R) ≡ wp(P1, R) ⋁ wp(P2, R) ⋁ … ⋁ wp(Pn, R).

The choice of this particular semantics is explained in detail at the end of this chapter. A program set so defined has all properties commonly found in an ordinary set. For instance, because the logical operation of disjunction is commutative, a direct consequence of Axiom 4.1 is Corollary 4.2.

Corollary 4.2

The ordering of elements in a program set is immaterial, i.e.,

{P1, P2} ⇔ {P2, P1}.

Furthermore, because every proposition is an idempotent under the operation of disjunction, we have Corollary 4.3.

Corollary 4.3

P ⇔ {P} ⇔ {P, P} for any program P.

In words, a set is unchanged by listing any of its elements more than once.

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.

  • Program set
  • J. C. Huang, University of Houston
  • Book: Path-Oriented Program Analysis
  • Online publication: 03 September 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511546990.005
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.

  • Program set
  • J. C. Huang, University of Houston
  • Book: Path-Oriented Program Analysis
  • Online publication: 03 September 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511546990.005
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.

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