enable cross-query memoization in the tabling library
This commit is contained in:
@@ -73,9 +73,9 @@ put_new_trie_table_link :-
|
|||||||
( bb_get(trie_table_link_initialized, _) ->
|
( bb_get(trie_table_link_initialized, _) ->
|
||||||
true
|
true
|
||||||
; trie_new(Trie),
|
; trie_new(Trie),
|
||||||
bb_b_put(trie_table_link, TrieFlag),
|
put_atts(TrieFlag, trie_table_link(Trie)),
|
||||||
bb_b_put(trie_table_link_initialized, []),
|
bb_put(trie_table_link, TrieFlag),
|
||||||
put_atts(TrieFlag, trie_table_link(Trie))
|
bb_put(trie_table_link_initialized, [])
|
||||||
).
|
).
|
||||||
|
|
||||||
get_trie_table_link(Trie) :-
|
get_trie_table_link(Trie) :-
|
||||||
@@ -104,7 +104,9 @@ p_existing_table(Variant, TableIdentifier) :-
|
|||||||
p_link_variant_identifier(Variant, TableIdentifier) :-
|
p_link_variant_identifier(Variant, TableIdentifier) :-
|
||||||
get_trie_table_link(Trie),
|
get_trie_table_link(Trie),
|
||||||
variant_canonical_representation(Variant, CanonicalRepresentation),
|
variant_canonical_representation(Variant, CanonicalRepresentation),
|
||||||
trie_insert_succeed(Trie, CanonicalRepresentation, TableIdentifier).
|
trie_insert_succeed(Trie, CanonicalRepresentation, TableIdentifier),
|
||||||
|
put_atts(TrieFlag, trie_table_link(Trie)),
|
||||||
|
bb_put(trie_table_link, TrieFlag).
|
||||||
|
|
||||||
% Returns a list of existing table identifiers.
|
% Returns a list of existing table identifiers.
|
||||||
% Rather costly.
|
% Rather costly.
|
||||||
|
|||||||
Reference in New Issue
Block a user