Sather Home Page

Section 6.8.8:
Method Closure Expression

Closures (association of bindings and operation description) may be of either form of method. Deatails of the two variants are given under the referenced links below.

Concrete Syntax

method closure expression = routine closure expression
| iter closure expression ;

Abstract Syntax

This expression is the use of the pre-defined bind built-in routine call.

Closure_Expression = Predefined_Call
     inv mk_Closure_Expression(mk_Predefined_Call(expid,_,_,_) ==
          expid = Bind

Static Semantics

The well-formedness of a method closure depends on which kind it is. The function following thus depends on the kind as given in the cases clause.

wf_closure : Closure_Expression -> bool

wf_closure(mk_Closure_Expression()) ==
   cases impl.kind:
      <Multiple>  -> wf_iter_closure(mk_Closure_Expression(_,args,_,_))
      <One_Shot> -> wf_routine_closure(mk_Closure_Expression(_,args,_,_))
   end

Dynamic Semantics


Specification Index Language Index Section 6 Index
Comments or enquiries should be made to Keith Hopper.
Page last modified: Wednesday, 25 April 2001.
Produced with Amaya