QuoteRef: hansDR5_1978 ;;392 "Procedures and activation records for procedures (called environment are source-language data objects. [is SL5
|
393 ;;Quote: an SL5 expression returns a value and a signal; the signal is an unsigned integer used for control purposes, e.g., true/false
|
393 ;;Quote: the value of an expression can be a variable that holds the value; dereferencing obtains the value
|
393 ;;Quote: evaluation is executing the expression (interpretation) and dereferencing the result
|
393 ;;Quote: in SL5, if..then..else is an expression whose result is the result of the then.. or else.. part
|
393 ;;Quote: in SL5, 'e1 and e2' has the value of e2 if both succeed, else the value of e1
|
393 ;;Quote: SL5 procedure invocation is decomposed into create environment, bind arguments, resume execution
|
QuoteRef: hansDR5_1978 ;;393 "In SL5, procedures are data objects. A procedure is created by the func := 'procedure (id1, id2, ..., idn) declarations body 'end
|
394 ;;Quote: the environment for a procedure contains its variables and continuation point
|
394 ;;Quote: every process (and its environment) knows the environment that created it
|
394 ;;Quote: in SL5, sending an argument list to an environment returns the environment with formal arguments assigned, normally to arg values
|
394 ;;Quote: a 'resume' expression suspends the current environment and passes a value and the resumer's identity to another environment
|
394 ;;Quote: SL5 function calls are abbreviations for resume(create f with arg_list)
|
395 ;;Quote: in SL5, 'return r to e' suspends environment, resumes environment e with value r; prior resumer of e unchanged
|
395 ;;Quote: to help construct control relationships, every environment can get its creator and its resumer
|
396 ;;Quote: a non-local or public identifier in an environment is assigned a constant value when the environment is created
|
QuoteRef: hansDR5_1978 ;;396 "The expression e.i refers to the identifier i in the environment e.
|
396 ;;Quote: in SL5, a transmitter is a procedure associated with a parameter that intercepts actual arguments and returns a value
|
396 ;;Quote: a reference argument to an environment is interpreted whenever the argument changes [?]
|
QuoteRef: hansDR5_1978 ;;397 "A [argument] transmitter may be a built-in procedure, a programmer-defined procedure, or an environment.
|
397 ;;Quote: in SL5, an assignment becomes the value transmission transmitter
|
397 ;;Quote: write a random number generator in SL5 as an environment that is resumed for each value
|
397 ;;Quote: can define multiple generators with a single procedure and multiple environments
|
397+;;Quote: should conceptualize program organization in terms of environments instead of procedures
|