Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-sjtt6 Total loading time: 0 Render date: 2024-06-30T01:53:57.625Z Has data issue: false hasContentIssue false

41 - Share models

from VI - Semantic model and soundness of Verifiable C

Published online by Cambridge University Press:  05 August 2014

Andrew W. Appel
Affiliation:
Princeton University, New Jersey
Robert Dockins
Affiliation:
Portland State University
Aquinas Hobor
Affiliation:
National University of Singapore
Lennart Beringer
Affiliation:
Princeton University, New Jersey
Josiah Dodds
Affiliation:
Princeton University, New Jersey
Gordon Stewart
Affiliation:
Princeton University, New Jersey
Sandrine Blazy
Affiliation:
Université de Rennes I, France
Xavier Leroy
Affiliation:
Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt
Get access

Summary

An important application of separation algebras is to model Hoare logics of programming languages with mutable memory. We generate an appropriate separation logic by choosing the correct semantic model, that is, the correct separation algebra. A natural choice is to simply take the program heaps as the elements of the separation algebra together with some appropriate join relation.

In most of the early work in this direction, heaps were modeled as partial functions from addresses to values. In those models, two heaps join iff their domains are disjoint, the result being the union of the two heaps. However, this simple model is too restrictive, especially when one considers concurrency. It rules out useful and interesting protocols where two or more threads agree to share read permission to an area of memory.

There are a number of different ways to do the necessary permission accounting. Bornat et al. [27] present two different methods; one based on fractional permissions, and another based on token counting. Parkinson, in chapter 5 of his thesis [74], presents a more sophisticated system capable of handling both methods. However, this model has some drawbacks, which we shall address below.

Fractional permissions are used to handle the sorts of accounting situations that arise from concurrent divide-and-conquer algorithms. In such algorithms, a worker thread has read-only permission to the dataset and it needs to divide this permission among various child threads.

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

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.

  • Share models
  • Andrew W. Appel, Princeton University, New Jersey
  • Book: Program Logics for Certified Compilers
  • Online publication: 05 August 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781107256552.048
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.

  • Share models
  • Andrew W. Appel, Princeton University, New Jersey
  • Book: Program Logics for Certified Compilers
  • Online publication: 05 August 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781107256552.048
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.

  • Share models
  • Andrew W. Appel, Princeton University, New Jersey
  • Book: Program Logics for Certified Compilers
  • Online publication: 05 August 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781107256552.048
Available formats
×