Scopes of Bindings Full


  • Yielder::= current bindings | bound to Yielder | closure
  • Yielder Action ::= bind | furthermore Action | Action moreover Action | Action before Action | recursively Action | unfolding Action | unfold

  The AN­2 yielder bound to Y is equivalent to the AN­1 yielder the bindable bound to Y. The yielder the s bound to Y has the same meaning in both AN­1 and AN­2, but is parsed in AN­2 as the s (bound to Y), where the s is the data operation projecting onto the subsort corresponding to s.

  The action bind may be written with arguments as bind (tk, Y), corresponding closely to the AN­1 action bind tk to Y. The binding combinators furthermore, moreover, and before are defined to give essentially the same effect as in AN­1.

  Recursion was provided only for single bindings in AN­1, and mutual recursion had to be expressed using explicit indirect bindings. Despite the close relationship of indirect bindings to 'forward' declarations in programming languages, it is preferable to provide a general combinator for mutual recursion, and this has now been achieved in the proposed AN­2: recursively A is as A, except that recursively A is also inserted (appropriately) in any closures formed when performing A. In particular, recursively bind(tk, closure A#) is equivalent to

  bind tk to closure (furthermore (recursively bind(tk , closure A # )) hence A # )

  and similarly for mutually­recursive bindings to closures. Note however that if A has effects on storage or interactions with other processes, these get repeated every time any closure in recursively A is enacted; in general, to avoid unexpected consequences, A should be formed only from dataflow and binding actions.

The Kernel AN­1 notation for unfolding is provided merely as an abbreviation in Full AN­2, but the usage and intended interpretation remain the same.




   
Data| Flow of Data and Control| Actions as Data| Effects on Storage| Interactive Processes