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 [#!Tarau92:ECO!#] 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.