Imperative Actions

store Y | allocate a cell | deallocate Y

   All primitive imperative actions:
  • Give no transients.
  • Produce no bindings.
  • Do not communicate.
  • Redirect no bindings.
   There are no special imperative action combinators.

    
storeY1 in Y2: a primitive imperative action, where Y1 is a yielder of storable data and Y2 is a yielder of cells. Represents changing an atomic piece of stable information.
  • Indivisible. Commits and completes when Y2 yields a reserved cell and Y1 yields storable data. Fails otherwise.
  • Stores the storable yielded by Y1 in the cell yielded by Y2.
   Example

    
allocate a cell: a primitive imperative action, where Y is a yielder of cells. Represents extending stable information with an extra, uninitialized piece.
  • Indivisible. Commits and completes when Y yields an unreserved cell. Fails otherwise.
  • Reserves the cell yielded by Y and stores the datum uninitialized in it.
   Example

    
deallocate Y: a primitive imperative action, where Y is a cell yielder. Represents destroying stable information.
  • Indivisible. Commits and completes when Y yields a reserved cell. Fails otherwise.
  • Unreserves the cell yielded by Y.
   Example



    Imperative Action Index | Imperative Actions | Imperative Yielders | Imperative Data