Sather Home Page

Section 6.7.2:
Assign Statement

Assignment is the only way of altering the value of a state component in Sather.

Concrete Syntax

assign statement = (expression | (identifier, Colon_SY, [type specifier])),
initialise ;

Abstract Syntax

Assign_Name = token
inv aname ==
aname = Assign ;

Predefined_Call ::
id : token
args : Feature
impl : Feature
rval : [Value_Expression] ;

inv mk_Predefined_Call(expid,args,imp,val) ==
expid = Assign
and len args = 2
and imp.imp = do_assign(args(1),args(2)
and val = nil


do_assign(loc : Address, val : ANY)

TO BE DONE

Static Semantics

The first argument must be a storage expression and the second a value expression.

Dynamic Semantics

The state component indicated by the evaluation of the first argument is changed to have the value given by the second argument.


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