![]() |
Section 6.8.5:
|
![]() |
In order to effect actions and state changes, the Sather language uses method (routines and iters) calls. Those which return a value are therefore expressions, those which do not are statements. Both forms of call are specified in this sub-section of the language definition because of the commonality of their abstract model.
The call statement comprises all of the statement variants which carry out the actions of a program.
in which the assignment call is treated specially. There are two variants of application statement - one pre-defined by the language and the other user written.
The expression evaluation calls are analogous to the Application_Statement above, thus -
The similarity between prredefined call statements and predefined call expressions extends to them having the same abstract syntax - with different invariants, thus for the statement variant -
Predefined_Call :: id : token args : Feature impl : Feature rval : [Value_Expression] ; inv mk_Predefined_Call(expid,_,_,val) == expid in set dom Built_In_Name and val = nil
and for the expression variant -
Predefined_Call :: id : token args : Feature impl : Feature rval : [Value_Expression] ; inv mk_Predefined_Call(expid,_,_,val) == expid in set dom Built_In_Exp_Name and val <> nil
Feature application is again common to both expression and statement, the only restriction occurring in the well-formedness function in relation to returned value (or not).
Feature_Application :: id : Defined_Feature_Name body : Feature ;
TO BE DONE
TO BE DONE
![]() |
Specification Index | ![]() |
Language Index | ![]() |
Section 6 Index |
Comments
or enquiries should be made to Keith Hopper. Page last modified: Thursday, 26 April 2001. |
![]() |