A global heap variable has a name (a non-variable term) and an associated value. Unlike a normal global variable, a global heap variable is stored on the heap instead of the code area, and updates on global heap variables are undone automatically upon backtracking. A global heap variable is gone once execution backtracks over the point where it was created.
- global_heap_set(Name,Value):
Sets the value of the global heap variable Name to Value. This action is undone upon backtracking.
- global_heap_get(Name,Value):
The value that is associated with the global heap variable Name is Value. If Name is not a global heap variable, then a global heap variable with the name Name is created with the initial value Value.
- is_global_heap(Name):
Tests whether Name is a global heap variable.
Neng-Fa Zhou
2013-01-25