TeamSPoon / swipl-devel-unstable

DIFF https://github.com/SWI-Prolog/swipl-devel/compare/master...logicmoo:master_dvard
https://docs.google.com/document/d/1jo8aG_C7wwh1lZzPsFMfh3DEcRjhTQ-MMT_D2_GimEQ/edit
Other
4 stars 1 forks source link

O_TRIE - Extension of O_HT_BLOB #7

Open TeamSPoon opened 8 years ago

TeamSPoon commented 8 years ago

O_TRIE - Extension of O_HT_BLOB

create a few levels deep of HTs ..

if i want to store p(q(r,A,B,t),C) = foo.

I create this linked tree

p/2 -> q/4 -> r -> VAR1 -> VAR2 -> t -> VAR1 = foo

Note:
Each level of compound may have its own private var numbering

?- ht_nb_putval_trie($X,p(q(r,A,B,t),C) ,foo).

?-  ht_current_kvs($X,K,V).
K = p(_G6330,_G6331),
V = <hashtable_with_grefs>(0x15e08c8)

?-  ht_current_kvs($V,K,V1).
K = q(_G6331,_G6332,_G6333,_G6334),
V1 = <hashtable_with_grefs>(0x17370a0)