A global heap variable has a name (a non-variable term) and a value associated with it. Unlike a normal global variable, a global heap variable is stored on the heap, not in the code area, and updates on global heap variables are undone automatically upon backtracking and a global heap variable itself is gone once execution backtracks over the point where it was created.
- global_heap_set(Name,Value):
Set the value of the global heap variable Name to Value. This action is undone upon backtracking.
- global_heap_get(Name,Value):
The value 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):
Test if Name is a global heap variable.
Neng-Fa Zhou
2012-01-03