Unifies Term with the most general instance of the dynamic clause or recorded term indicated by the database reference Ref.
Ref must be instantiated to a database
reference to an existing clause or recorded term.
not sensitive to the source module and can be used to access any
clause, regardless of its module.
instance/2 ignores the module of a clause.
Because of this, accessing a clause with via
different from accessing it via
clause/3 with a given Ref.
If the reference is to a unit-clause C, then
Term is unified with
| ?- assert(foo:bar,R). R = '$ref'(771292,1) | ?- instance('$ref'(771292,1),T). T = (bar:-true) | ?- clause(H,B,'$ref'(771292,1)). no | ?- clause(foo:H,B,'$ref'(771292,1)). H = bar, B = true | ?-