#[inline]
pub fn must_retract_local_clauses(&self) -> bool {
- self.is_extensible && !self.is_discontiguous
+ self.is_extensible && self.has_clauses && !self.is_discontiguous
}
}
is_discontiguous: self.is_discontiguous,
is_dynamic: self.is_dynamic,
is_multifile: self.is_multifile,
- has_clauses: !self.clauses.is_empty(),
+ has_clauses: !self.clause_clause_locs.is_empty(),
}
}
put_attrs(Name/Arity, Module) -->
put_attr(Name, Arity, Module),
- [(put_atts(Var, Attr) :- lists:maplist(put_atts(Var), Attr), !)].
+ [(put_atts(Var, Attr) :- lists:maplist(Module:put_atts(Var), Attr), !)].
put_attrs((Name/Arity, Atts), Module) -->
{ nonvar(Atts) },
put_attr(Name, Arity, Module),
:- module(cont, [reset/3, shift/1]).
+:- meta_predicate reset(0, ?, ?).
+
reset(Goal, Ball, Cont) :-
call(Goal),
'$reset_cont_marker',
get_chunks(E, P, L),
( L == [] ->
Cont = cont(true)
- ; Cont = cont(call_continuation(L))
+ ; Cont = cont(cont:call_continuation(L))
),
'$write_cont_and_term'(_, _, Cont, Ball),
'$unwind_environments'.
:- use_module(library(tabling/double_linked_list)).
:- use_module(library(tabling/table_data_structure)).
:- use_module(library(tabling/batched_worklist)).
-:- use_module(library(tabling/wrapper)).
:- use_module(library(tabling/global_worklist)).
:- use_module(library(tabling/table_link_manager)).
+:- use_module(library(tabling/wrapper)).
:- use_module(library(cont)).
:- use_module(library(lists)).
table_for_variant(V,T),
tbd_table_status(T,S).
+
+:- meta_predicate start_tabling(?, 0).
+
start_tabling(Wrapper,Worker) :-
put_new_trie_table_link,
put_new_global_worklist,
:- attribute executing_all_work/1, worklist_presence/1, wkl_answer_cluster/1, wkl_suspension_cluster/1, wkl_answer_cluster_pointer_flag/1.
+verify_attributes(_, _, []).
+
/** <module> Tabling Worklist management
A batched worklist: a worklist that clusters suspensions and answers as
:- attribute table_global_worklist/1.
+verify_attributes(_, _, []).
+
put_new_global_worklist :-
( bb_get(table_global_worklist_initialized, _) ->
true
:- attribute table_status/1, newly_created_table_identifiers/1.
+verify_attributes(_, _, []).
+
% This file defines the table datastructure.
%
% The table datastructure contains the following sub-structures:
:- attribute trie_table_link/1.
+verify_attributes(_, _, []).
+
% This file defines a call pattern trie.
%
% This data structure keeps the relation between a variant and the
:- attribute maybe_just/1, children/1.
+verify_attributes(_, _, []).
+
% Implementation of a prefix tree, a.k.a. trie %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:- use_module(library(dcgs)).
:- use_module(library(error)).
+:- multifile(tabled/2).
+
%%:- multifile
%% system:term_expansion/2,
%% tabled/2.
.map(|skeleton| skeleton.predicate_info())
.unwrap_or_default();
- if predicate_info.must_retract_local_clauses() {
+ if local_predicate_info.must_retract_local_clauses() {
self.retract_local_clauses(&key, predicate_info.is_dynamic);
}