25:-
'$live'/0
use_system_module(
'$_boot', []).
27:-
'$do_error'/2
use_system_module(
'$_errors', []).
44 parallel_findall(?,
0,?),
45 parallel_findfirst(?,
0,?),
57 or_statistics(
Stream).
61 opt_statistics(
Stream).
70or_statistics(total_memory,[
BytesInUse,
BytesAllocated])
:-
71 '$c_get_optyap_statistics'(
0,
BytesInUse,
BytesAllocated).
72or_statistics(or_frames,[
BytesInUse,
StructsInUse])
:-
73 '$c_get_optyap_statistics'(
4,
BytesInUse,
StructsInUse).
74or_statistics(query_goal_solution_frames,[
BytesInUse,
StructsInUse])
:-
75 '$c_get_optyap_statistics'(
12,
BytesInUse,
StructsInUse).
76or_statistics(query_goal_answer_frames,[
BytesInUse,
StructsInUse])
:-
77 '$c_get_optyap_statistics'(
13,
BytesInUse,
StructsInUse).
86opt_statistics(total_memory,[
BytesInUse,
BytesAllocated])
:-
87 '$c_get_optyap_statistics'(
0,
BytesInUse,
BytesAllocated).
88opt_statistics(table_entries,[
BytesInUse,
StructsInUse])
:-
89 '$c_get_optyap_statistics'(
1,
BytesInUse,
StructsInUse).
90opt_statistics(subgoal_frames,[
BytesInUse,
StructsInUse])
:-
91 '$c_get_optyap_statistics'(
2,
BytesInUse,
StructsInUse).
92opt_statistics(dependency_frames,[
BytesInUse,
StructsInUse])
:-
93 '$c_get_optyap_statistics'(
3,
BytesInUse,
StructsInUse).
94opt_statistics(or_frames,[
BytesInUse,
StructsInUse])
:-
95 '$c_get_optyap_statistics'(
4,
BytesInUse,
StructsInUse).
96opt_statistics(suspension_frames,[
BytesInUse,
StructsInUse])
:-
97 '$c_get_optyap_statistics'(
5,
BytesInUse,
StructsInUse).
98opt_statistics(subgoal_trie_nodes,[
BytesInUse,
StructsInUse])
:-
99 '$c_get_optyap_statistics'(
6,
BytesInUse,
StructsInUse).
100opt_statistics(answer_trie_nodes,[
BytesInUse,
StructsInUse])
:-
101 '$c_get_optyap_statistics'(
7,
BytesInUse,
StructsInUse).
102opt_statistics(subgoal_trie_hashes,[
BytesInUse,
StructsInUse])
:-
103 '$c_get_optyap_statistics'(
8,
BytesInUse,
StructsInUse).
104opt_statistics(answer_trie_hashes,[
BytesInUse,
StructsInUse])
:-
105 '$c_get_optyap_statistics'(
9,
BytesInUse,
StructsInUse).
106opt_statistics(global_trie_nodes,[
BytesInUse,
StructsInUse])
:-
107 '$c_get_optyap_statistics'(
10,
BytesInUse,
StructsInUse).
108opt_statistics(global_trie_hashes,[
BytesInUse,
StructsInUse])
:-
109 '$c_get_optyap_statistics'(
11,
BytesInUse,
StructsInUse).
110opt_statistics(query_goal_solution_frames,[
BytesInUse,
StructsInUse])
:-
111 '$c_get_optyap_statistics'(
12,
BytesInUse,
StructsInUse).
112opt_statistics(query_goal_answer_frames,[
BytesInUse,
StructsInUse])
:-
113 '$c_get_optyap_statistics'(
13,
BytesInUse,
StructsInUse).
114opt_statistics(table_subgoal_solution_frames,[
BytesInUse,
StructsInUse])
:-
115 '$c_get_optyap_statistics'(
14,
BytesInUse,
StructsInUse).
116opt_statistics(table_subgoal_answer_frames,[
BytesInUse,
StructsInUse])
:-
117 '$c_get_optyap_statistics'(
15,
BytesInUse,
StructsInUse).
118opt_statistics(subgoal_entries,[
BytesInUse,
StructsInUse])
:-
119 '$c_get_optyap_statistics'(
16,
BytesInUse,
StructsInUse).
120opt_statistics(answer_ref_nodes,[
BytesInUse,
StructsInUse])
:-
121 '$c_get_optyap_statistics'(
17,
BytesInUse,
StructsInUse).
130 parallel_mode(
Mode),
Mode = parallel_mode,
parallel_mode,
132 '$parallel_query'(
Goal)
144'$parallel_query'(
Goal)
:-
156parallel_findall(
Template,
Goal,
Answers)
:-
157 parallel_mode(
Mode),
Mode = parallel_mode,
parallel_mode,
159 '$parallel_findall_query'(
Template,
Goal)
161 '$c_parallel_get_answers'(
Refs),
162 '$parallel_findall_recorded'(
Refs,
Answers),
165parallel_findall(
Template,
Goal,
Answers)
:-
166 findall(
Template,
Goal,
Answers).
168'$parallel_findall_query'(
Template,
Goal)
:-
171 recordz(parallel_findall,
Template,
Ref),
172 '$c_parallel_new_answer'(
Ref),
173 '$c_parallel_new_answer'.
174'$parallel_findall_query'(
_,
_).
176'$parallel_findall_recorded'([],[])
:- '$parallel_findall_recorded'.
177'$parallel_findall_recorded'([
Ref|Refs],[
Template|Answers])
:-
178 recorded(parallel_findall,
Template,
Ref),
179 '$parallel_findall_recorded'(
Refs,
Answers).
186parallel_findfirst(
Template,
Goal,
Answer)
:-
187 parallel_findall(
Template,(
Goal,!),
Answer).
194parallel_once(
Goal)
:-
195 parallel_mode(
Mode),
Mode = parallel_mode,
parallel_mode,
197 '$parallel_once_query'(
Goal)
202parallel_once(
Goal)
:-
205'$parallel_once_query'(
Goal)
:-
207 '$execute'(once(
Goal)),
210'$parallel_once_query'(
_).
213
nb_current(? Name, ? Value)
nth_instance(? Key,? Index,? R)
nth_instance(? Key,? Index, T,? R)
subsumes_term(? Subsumer, ? Subsumed)