Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Repack Operations

Repack operations describe actions on owned places.

RegainLoanedCapability

Fields:

  • - Place
  • - Capability

This operation is used to indicate that is no longer borrowed, and can therefore be restored to capability .

In principle I think should always be exclusive capability

Applying RegainLoanedCapability

The PCG applies this operation by setting the capability of to .

DerefShallowInit

Fields:

  • - From Place
  • - To Place

This operation is used to indicate that a (which is a shallow-initialized box) was dereferenced.

Applying DerefShallowInit

Let be the expansion of obtained by expanding towards .

The PCG applies this operation by adding read capability to the places in

Why do we use this logic?

Collapse

Fields:

  • - Place
  • - Collapse Guide
  • - Capability

This operation indicates that the expansion of should be packed (using guide ) with resulting capability .

Applying Collapse

Let be the expansion of towards guide place .

Preconditions:

  • Each place in has a capability

Let be the minimum capability of the places in .

  • Capability for each place in is removed.
  • Capability for is set to .
  • The Unpack edge from is removed

The current implementation guarantees there is only one unpack edge from . In the future this may change.

Expand

Fields:

  • - Place
  • - Expand Guide
  • - Capability

This operation indicates that should be expanded (using guide ) such that each place in the expansion has capability .

Applying Expand

Let be the expansion of towards guide place .

Preconditions:

  • has capability
  • The unpack edge is added
  • Capability for every place in is set to
  • If is Read capability, the capability of is set to Read
  • Otherwise, if is not Read, capability of is removed

Note that reference-typed places will never be expanded.