Skip to main content Accessibility help
×
Hostname: page-component-7bb8b95d7b-5mhkq Total loading time: 0 Render date: 2024-09-26T00:07:13.611Z Has data issue: false hasContentIssue false

4 - Properties of CHR

from Part II - The CHR language

Published online by Cambridge University Press:  10 February 2010

Thom Frühwirth
Affiliation:
Universität Ulm, Germany
Get access

Summary

Real-world applications have to interact with their environment and be sufficiently fast for real-time computation, and thus concurrent, anytime, online algorithms are an asset.

A CHR program will automatically implement algorithms with these desirable properties due to the properties of its operational semantics. The anytime (approximation) algorithm property means that we can interrupt the execution of a program at any time, observe an approximation to the result and restart from that intermediate result. The online (incremental) algorithm property means that we can add additional constraints while the program is running without the need to recompute from scratch. Concurrency means that rules can be applied in parallel to separate (even certain overlapping) parts of a goal.

Unless otherwise noted, we use the very abstract semantics in this chapter to avoid clutter and technicalities of the abstract semantics.

The results in this chapter carry over to the refined operational semantics with some limitations only. In particular, programs written with the refined semantics in mind may give wrong results when executed in parallel. However, if a program has the confluence property (cf. Section 5.2), programs executing under the refined semantics basically also have the three properties (anytime, online, concurrent) discussed in this chapter.

Anytime approximation algorithm property

In an anytime algorithm we can interrupt the execution of a program at any time, observe an approximation to the result and continue from that intermediate result without the need to recompute from scratch. The intermediate results from successive interrupts better and better approximate the final result.

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

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.

  • Properties of CHR
  • Thom Frühwirth, Universität Ulm, Germany
  • Book: Constraint Handling Rules
  • Online publication: 10 February 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511609886.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.

  • Properties of CHR
  • Thom Frühwirth, Universität Ulm, Germany
  • Book: Constraint Handling Rules
  • Online publication: 10 February 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511609886.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.

  • Properties of CHR
  • Thom Frühwirth, Universität Ulm, Germany
  • Book: Constraint Handling Rules
  • Online publication: 10 February 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511609886.007
Available formats
×