| gets the term which is stored with a certain key in a blackboard.
bb_get(+BoardName, ?Key, ?Term)
Blackboards are collections of (Key,Value) tuples.
bb_get/3 allows to inspect the tuples of a blackboard.
-
If Key is a ground term hashing will be used to retrieve the
associated Value entry. If there is a tuple (Key,Value)
in the blackboard Value will be unified with Term. Otherwise
the predicate fails.
- If Key is not a ground term, by backtracking
all tuples (K,V) of the blackboard will be retrieved
and unified with the term (Key,Value).
Arguments
Board blackboard
Key ground term
Term term
Examples
Assume there exists a blackboard 'blackboard' with elements (100, abc), (101, element101), (102, abc).
| bb_get(blackboard,102, abc).
| Succeeds.
| | bb_get(blackboard, 100, X).
| Succeeds with substitution X <- abc
| | bb_get(blackboard, Key, abc).
| Succeeds twice with substitution
Key <- 100
Key <- 102
| | bb_get(blackboard, Key, Term).
| Succeeds three times with substitution
X <- abc
X <- element101
X <- abc
|
Standard
This predicate is not part of the ISO-Prolog Standard.
See also
bb_clear/1,
bb_clear_2/2,
bb_create/1,
bb_contains/2,
bb_contains_key/2,
bb_get/3,
bb_get_4/4,
bb_put/3,
bb_put_4/4,
bb_remove/2.
bb_keys/2.
bb_elements/2.
|