Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-2pzkn Total loading time: 0 Render date: 2024-05-23T13:23:18.569Z Has data issue: false hasContentIssue false

5 - Dynamics

from Part II - Statics and Dynamics

Published online by Cambridge University Press:  05 March 2016

Robert Harper
Affiliation:
Carnegie Mellon University, Pennsylvania
Get access

Summary

The dynamics of a language describes how programs are executed. The most important way to define the dynamics of a language is by the method of structural dynamics, which defines a transition system that inductively specifies the step–by–step process of executing a program. Another method for presenting dynamics, called contextual dynamics, is a variation of structural dynamics in which the transition rules are specified in a slightly different way. An equational dynamics presents the dynamics of a language by a collection of rules defining when one program is definitionally equivalent to another.

Transition Systems

A transition system is specified by the following four forms of judgment:

  1. s state, asserting that s is a state of the transition system.

  2. s final, where s state, asserting that s is a final state.

  3. s initial, where s state, asserting that s is an initial state.

  4. ss', where s state and s' state, asserting that state s may transition to state s'.

In practice, we always arrange things so that no transition is possible from a final state: if s final, then there is no s' state such that ss'. A state from which no transition is possible is stuck.Whereas all final states are, by convention, stuck, theremay be stuck states in a transition system that are not final. A transition system is deterministic iff for every state s there exists at most one state s' such that ss'; otherwise, it is non-deterministic.

A transition sequence is a sequence of states s0, …, sn such that s0 initial, and sisi+1 for every 0 ≤ i < n. A transition sequence is maximal iff there is no s such that sns, and it is complete iff it is maximal and sn final. Thus, every complete transition sequence is maximal, but maximal sequences are not necessarily complete. The judgment s ↓ means that there is a complete transition sequence starting from s, which is to say that there exists s' final such that s*s'.

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

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.

  • Dynamics
  • Robert Harper, Carnegie Mellon University, Pennsylvania
  • Book: Practical Foundations for Programming Languages
  • Online publication: 05 March 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316576892.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.

  • Dynamics
  • Robert Harper, Carnegie Mellon University, Pennsylvania
  • Book: Practical Foundations for Programming Languages
  • Online publication: 05 March 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316576892.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.

  • Dynamics
  • Robert Harper, Carnegie Mellon University, Pennsylvania
  • Book: Practical Foundations for Programming Languages
  • Online publication: 05 March 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316576892.007
Available formats
×