next up previous
Next: 13.11 An useful Prolog Up: 13 The Blackboard Previous: 13.9 The blackboard as

13.10 Copying primitives

Copy_term/2 is Prolog's usual primitive extended to copy objects from the heap and also from blackboard to the current top of the heap. We refer to [13] for the implementation and memory management aspects of these primitives.

Save_term/2 copies an object possibly distributed over the heap and the blackboard to a new blackboard object. It also takes care not to copy parts of the object already on the blackboard.

Remark that having known modes and argument types helps in the case of partial evaluation or type inference systems. Separating Prolog's asserts two main functions (naming+copying) in lower level operations allows program transformers to go inside more complex blackboard operations and possibly use the typing and mode information that comes from def/3, set/3 and val/3 to infer it for other predicates.



next up previous
Next: 13.11 An useful Prolog Up: 13 The Blackboard Previous: 13.9 The blackboard as



Paul Tarau
Thu Apr 3 10:26:39 AST 1997