Example of a Program Action


Action:




| | | give 3
| | then 
| | | bind "c" to the given datum
| before 
| | | | give 4
| | | and 
| | | | allocate a cell
| | then 
| | | | bind "x" to the given cell # 2
| | | and 
| | | | store (the given datum # 1) in (the given cell # 2)
hence 
| | | | | rebind
| | | | moreover 
| | | | | | | give 5
| | | | | | and 
| | | | | | | allocate a cell
| | | | | then 
| | | | | | | bind "x" to the given cell # 2
| | | | | | and 
| | | | | | | store (the given datum # 1) in (the given cell # 2)
| | | hence 
| | | | | | | give 10
| | | | | | and 
| | | | | | | give (the datum bound to "c")
| | | | | then 
| | | | | | give (sum ( (the given integer # 1) , (the given integer # 2) ))
| | | | then 
| | | | | store (the given datum) in (the cell bound to "x")
| | and then 
| | | | | rebind
| | | | moreover 
| | | | | | | give 6
| | | | | | and 
| | | | | | | allocate a cell
| | | | | then 
| | | | | | | bind "y" to the given cell # 2
| | | | | | and 
| | | | | | | store (the given datum # 1) in (the given cell # 2)
| | | hence 
| | | | | | | give 20
| | | | | | and 
| | | | | | | give (the datum stored in (the cell bound to "x"))
| | | | | then 
| | | | | | give (sum ( (the given integer # 1) , (the given integer # 2) ))
| | | | then 
| | | | | store (the given datum) in (the cell bound to "y")
| and then 
| | | | | give (the datum stored in (the cell bound to "x"))
| | | | and 
| | | | | give (the datum bound to "c")
| | | then 
| | | | give (sum ( (the given integer # 1) , (the given integer # 2) ))
| | then 
| | | store (the given datum) in (the cell bound to "x")

Informal description:

The above action is the meaning of the following Specimen program:

program local2 =
const c : int = 3;
var x : int := 4
in
local
var x : int := 5
in
x := 10 + c
end;
local
var y : int := 6
in
y := 20 + x
end;
x := x + c
end

Try this action using Java ANI.


RAT| People

[Created by Luis Carlos. Last edited at 16 Apr 2004 by Luis Carlos]