The Blackboard

YAP implements a blackboard in the style of the SICStus Prolog blackboard.

The blackboard uses the same underlying mechanism as the internal data-base but has several important differences:

  • It is module aware, in contrast to the internal data-base.

  • Keys can only be atoms or integers, and not compound terms.

  • A single term can be stored per key.

  • An atomic update operation is provided; this is useful for parallelism.

  • bb_update/3

  • bb_delete/2
  • bb_get/2
  • bb_put/2

Define:

1. NULL:

Functions:

1. static BBProp PutBBProp(AtomEntry *ae, Term mod USES_REGS):

1. static BBProp PutIntBBProp(Int key, Term mod USES_REGS):

1. static BBProp GetBBProp(AtomEntry *ae, Term mod):

1. static BBProp GetIntBBProp(Int key, Term mod):

1. static int resize_bb_int_keys(UInt new_size):

1. static BBProp AddBBProp(Term t1, char *msg, Term mod USES_REGS):

1. static BBProp FetchBBProp(Term t1, char *msg, Term mod):

1. static Term BBPut(Term t0, Term t2):

1. static Int p_bb_put(USES_REGS1):

1. static Term BBGet(Term t, UInt arity USES_REGS):

1. static Int p_bb_get(USES_REGS1):

1. static Int p_bb_delete(USES_REGS1):

1. static Int p_bb_update(USES_REGS1):

1. static Int p_resize_bb_int_keys(USES_REGS1):

1. void Yap_InitBBPreds(void):