root/tags/lgt2311/configs/yap.config

Revision 4006, 16.7 KB (checked in by pmoura, 12 months ago)

Some strange YAP bug forces us to set the "unkwnon" flag to "error" even after setting the "language" flag to "iso", otherwise YAP exits when calling an unkown predicate instead of simply reporting the uncaught exception!

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%
3%  Logtalk - Open source object-oriented logic programming language
4%  Release 2.31.1
5%
6%  configuration file for YAP Prolog 5.1.2 and later versions
7%
8%  last updated: January 1, 2008
9%
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12
13% the following language initialization is not needed to run Logtalk altough is
14% higly recommended; you can comment out the set_prolog_flag/2 calls if needed
15
16:- initialization((
17    use_module(library(system)),
18    '$lgt_hide_predicates',
19    set_prolog_flag(language, iso),
20    set_prolog_flag(update_semantics, logical),
21    set_prolog_flag(unknown, error))).
22
23
24'$lgt_hide_predicates' :-
25    (   predicate_property(hide_predicate(_), built_in) ->
26        dynamic('$lgt_before_'/5), hide_predicate('$lgt_before_'/5),
27        dynamic('$lgt_after_'/5), hide_predicate('$lgt_after_'/5),
28        dynamic('$lgt_current_protocol_'/3), hide_predicate('$lgt_current_protocol_'/3),
29        dynamic('$lgt_current_category_'/3), hide_predicate('$lgt_current_category_'/3),
30        dynamic('$lgt_current_object_'/8), hide_predicate('$lgt_current_object_'/8),
31        dynamic('$lgt_implements_protocol_'/3), hide_predicate('$lgt_implements_protocol_'/3),
32        dynamic('$lgt_imports_category_'/3), hide_predicate('$lgt_imports_category_'/3),
33        dynamic('$lgt_instantiates_class_'/3), hide_predicate('$lgt_instantiates_class_'/3),
34        dynamic('$lgt_specializes_class_'/3), hide_predicate('$lgt_specializes_class_'/3),
35        dynamic('$lgt_extends_protocol_'/3), hide_predicate('$lgt_extends_protocol_'/3),
36        dynamic('$lgt_extends_object_'/3), hide_predicate('$lgt_extends_object_'/3),
37        dynamic('$lgt_extends_category_'/3), hide_predicate('$lgt_extends_category_'/3),
38        dynamic('$lgt_complemented_object_'/4), hide_predicate('$lgt_complemented_object_'/4),
39        dynamic('$lgt_loaded_file_'/2), hide_predicate('$lgt_loaded_file_'/2),
40        dynamic('$lgt_debugging_'/1), hide_predicate('$lgt_debugging_'/1),
41        dynamic('$lgt_dbg_debugging_'/0), hide_predicate('$lgt_dbg_debugging_'/0),
42        dynamic('$lgt_dbg_tracing_'/0), hide_predicate('$lgt_dbg_tracing_'/0),
43        dynamic('$lgt_dbg_skipping_'/0), hide_predicate('$lgt_dbg_skipping_'/0),
44        dynamic('$lgt_dbg_spying_'/2), hide_predicate('$lgt_dbg_spying_'/2),
45        dynamic('$lgt_dbg_spying_'/4), hide_predicate('$lgt_dbg_spying_'/4),
46        dynamic('$lgt_dbg_leashing_'/1), hide_predicate('$lgt_dbg_leashing_'/1),
47        dynamic('$lgt_current_flag_'/2), hide_predicate('$lgt_current_flag_'/2),
48        dynamic('$lgt_static_binding_entity_'/1), hide_predicate('$lgt_static_binding_entity_'/1),
49        dynamic('$lgt_obj_static_binding_cache_'/4), hide_predicate('$lgt_obj_static_binding_cache_'/4),
50        dynamic('$lgt_ctg_static_binding_cache_'/6), hide_predicate('$lgt_ctg_static_binding_cache_'/6),
51        dynamic('$lgt_obj_lookup_cache_'/4), hide_predicate('$lgt_obj_lookup_cache_'/4),
52        dynamic('$lgt_self_lookup_cache_'/4), hide_predicate('$lgt_self_lookup_cache_'/4),
53        dynamic('$lgt_super_lookup_cache_'/5), hide_predicate('$lgt_super_lookup_cache_'/5),
54        dynamic('$lgt_db_lookup_cache_'/6), hide_predicate('$lgt_db_lookup_cache_'/6),
55        dynamic('$lgt_pp_warnings_top_argument_'/1), hide_predicate('$lgt_pp_warnings_top_argument_'/1),
56        dynamic('$lgt_pp_comp_warnings_counter_'/1), hide_predicate('$lgt_pp_comp_warnings_counter_'/1),
57        dynamic('$lgt_pp_load_warnings_counter_'/1), hide_predicate('$lgt_pp_load_warnings_counter_'/1),
58        dynamic('$lgt_hook_goal_'/2), hide_predicate('$lgt_hook_goal_'/2),
59        dynamic('$lgt_threaded_tag_counter'/1), hide_predicate('$lgt_threaded_tag_counter'/1)
60    ;   true
61    ).
62
63
64
65%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66%
67%  ISO Prolog Standard predicates that we must define because they are
68%  not built-in
69%
70%  add a clause for lgt_iso_predicate/1 declaring each ISO predicate that
71%  we must define; there must be at least one clause for this predicate
72%  whose call should fail if we don't define any ISO predicates
73%
74%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
75
76
77% '$lgt_iso_predicate'(?callable).
78
79'$lgt_iso_predicate'(_) :-
80    fail.
81
82
83
84%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
85%
86%  predicate properties
87%
88%  this predicate must return at least static, dynamic, and built_in
89%  properties for an existing predicate
90%
91%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92
93
94% '$lgt_predicate_property'(+callable, ?predicate_property)
95
96'$lgt_predicate_property'(Pred, Prop) :-
97    predicate_property(Pred, Prop).
98
99
100
101%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
102%
103%  meta-predicates
104%
105%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
106
107
108% call_cleanup(+callable, +callble) -- built-in
109
110
111% forall(+callable, +callble) -- built-in
112
113forall(Generate, Test) :-
114    \+ (call(Generate), \+ call(Test)).
115
116
117% retractall(+callable) -- built-in
118
119
120% call_with_args/2-9
121%
122% use these definitions only if your compiler does
123% not provide call_with_args/2-9 as built-in predicates
124
125% call_with_args(F, A) -- built-in
126
127% call_with_args(F, A1, A2) -- built-in
128
129% call_with_args(F, A1, A2, A3) -- built-in
130
131% call_with_args(F, A1, A2, A3, A4) -- built-in
132
133% call_with_args(F, A1, A2, A3, A4, A5) -- built-in
134
135% call_with_args(F, A1, A2, A3, A4, A5, A6) -- built-in
136
137% call_with_args(F, A1, A2, A3, A4, A5, A6, A7) -- built-in
138
139% call_with_args(F, A1, A2, A3, A4, A5, A6, A7, A8) -- built-in
140
141
142
143%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144%
145%  Prolog built-in meta-predicates
146%
147%  (excluding ISO Prolog Standard meta-predicates)
148%
149%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150
151
152% '$lgt_pl_meta_predicate'(?callable).
153
154'$lgt_pl_meta_predicate'(all(*, ::, *)).
155'$lgt_pl_meta_predicate'(call_cleanup(::)).
156'$lgt_pl_meta_predicate'(call_cleanup(::, ::)).
157'$lgt_pl_meta_predicate'(call_residue(::, *)).
158'$lgt_pl_meta_predicate'(if(::, ::, ::)).
159'$lgt_pl_meta_predicate'(on_cleanup(::)).
160'$lgt_pl_meta_predicate'(freeze(*, ::)).
161'$lgt_pl_meta_predicate'(time_out(::, *, *)).
162'$lgt_pl_meta_predicate'(when(*, ::)).
163
164'$lgt_pl_meta_predicate'(thread_at_exit(::)).
165'$lgt_pl_meta_predicate'(thread_create(::, *, *)).
166'$lgt_pl_meta_predicate'(thread_create(::, *)).
167'$lgt_pl_meta_predicate'(thread_create(::)).
168'$lgt_pl_meta_predicate'(thread_signal(*, ::)).
169'$lgt_pl_meta_predicate'(with_mutex(*, ::)).
170
171
172
173%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
174%
175%  file extension predicates
176%
177%  these extensions are used by Logtalk load/compile predicates
178%
179%  you may want to change the extension for Prolog files to match
180%  the one expected by your Prolog compiler
181%
182%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183
184
185% '$lgt_file_extension'(?atom, ?atom)
186
187'$lgt_file_extension'(logtalk, '.lgt').
188'$lgt_file_extension'(prolog, '.pl').
189'$lgt_file_extension'(xml, '.xml').
190
191
192
193%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
194%
195%  default flag values
196%
197%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198
199
200% '$lgt_default_flag'(?atom, ?atom)
201%
202% default values for all flags
203
204'$lgt_default_flag'(xmldocs, on).
205'$lgt_default_flag'(xslfile, 'lgtxml.xsl').
206'$lgt_default_flag'(xmlspec, dtd).
207'$lgt_default_flag'(xmlsref, local).
208
209'$lgt_default_flag'(unknown, warning).
210'$lgt_default_flag'(misspelt, warning).
211'$lgt_default_flag'(singletons, warning).
212'$lgt_default_flag'(lgtredef, warning).
213'$lgt_default_flag'(plredef, silent).
214'$lgt_default_flag'(portability, silent).
215
216'$lgt_default_flag'(report, on).
217
218'$lgt_default_flag'(smart_compilation, off).
219'$lgt_default_flag'(reload, always).
220
221'$lgt_default_flag'(startup_message, flags(verbose)).
222
223'$lgt_default_flag'(underscore_variables, singletons).
224
225'$lgt_default_flag'(code_prefix, '').
226
227'$lgt_default_flag'(debug, off).
228'$lgt_default_flag'(break_predicate, true).
229
230'$lgt_default_flag'(events, off).
231
232'$lgt_default_flag'(altdirs, off).
233'$lgt_default_flag'(tmpdir, 'lgt_tmp/').
234'$lgt_default_flag'(xmldir, 'xml_docs/').
235
236'$lgt_default_flag'(encoding_directive, Encoding) :-
237    (   catch(current_prolog_flag(version_data, _), _, fail) -> % version_data flag added on YAP version 5.1.3
238        Encoding = full                                         % together with working Unicode support
239    ;   Encoding = unsupported
240    ).
241'$lgt_default_flag'(threads, Threads) :-
242    (   current_prolog_flag(system_options, threads) ->
243        Threads = on
244    ;   Threads = off
245    ).
246
247'$lgt_default_flag'(context_switching_calls, allow).
248
249
250
251%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
252%
253%  list predicates
254%
255%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
256
257
258'$lgt_append'([], List, List).
259'$lgt_append'([Head| Tail], List, [Head| Tail2]) :-
260    '$lgt_append'(Tail, List, Tail2).
261
262
263'$lgt_member'(Head, [Head| _]).
264'$lgt_member'(Head, [_| Tail]) :-
265    '$lgt_member'(Head, Tail).
266
267
268'$lgt_member_var'(V, [H| _]) :-
269    V == H.
270'$lgt_member_var'(V, [_| T]) :-
271    '$lgt_member_var'(V, T).
272
273
274'$lgt_is_list'([]) :-
275    !.
276'$lgt_is_list'([_| Tail]) :-
277    '$lgt_is_list'(Tail).
278
279
280'$lgt_is_proper_list'(List) :-
281    List == [], !.
282'$lgt_is_proper_list'([_| Tail]) :-
283    nonvar(Tail),
284    '$lgt_is_proper_list'(Tail).
285
286
287
288
289%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
290%
291%  file predicates
292%
293%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294
295
296% '$lgt_file_exists'(+atom)
297%
298% checks if a file exist in the current directory
299
300'$lgt_file_exists'(File) :-
301    file_exists(File).
302
303
304% '$lgt_directory_exists'(+atom)
305%
306% checks if a directory exists
307
308'$lgt_directory_exists'(Directory) :-
309    (   atom_concat(Directory2, '/', Directory) ->
310        true
311    ;   Directory2 = Directory
312    ),
313    absolute_file_name(Directory2, Path),
314    file_exists(Path),
315    file_property(Path, type(directory)).
316
317
318% '$lgt_current_directory'(-atom)
319%
320% gets current working directory
321
322'$lgt_current_directory'(Directory) :-
323    getcwd(Directory).
324
325
326% '$lgt_change_directory'(+atom)
327%
328% changes current working directory
329
330'$lgt_change_directory'(Directory) :-
331    cd(Directory).
332
333
334% '$lgt_make_directory'(+atom)
335%
336% makes a new directory; succeeds if the directory already exists
337
338'$lgt_make_directory'(Directory) :-
339    (   '$lgt_directory_exists'(Directory) ->
340        true
341    ;   make_directory(Directory)
342    ).
343
344
345% '$lgt_load_prolog_code'(+atom, +atom)
346%
347% compile and load a Prolog file
348
349'$lgt_load_prolog_code'(File, _) :-
350    reconsult(File).
351
352
353% '$lgt_compare_file_mtimes'(?atom, +atom, +atom)
354%
355% compare file modification times
356
357'$lgt_compare_file_mtimes'(Result, File1, File2) :-
358    file_property(File1, mod_time(Time1)),
359    file_property(File2, mod_time(Time2)),
360    compare(Result, Time1, Time2).
361
362
363
364%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
365%
366%  sorting predicates
367%
368%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
369
370
371% '$lgt_keysort'(+list, -list)
372
373'$lgt_keysort'(List, Sorted) :-
374    keysort(List, Sorted).
375
376
377% '$lgt_sort'(+list, -list)
378
379'$lgt_sort'(List, Sorted) :-
380    sort(List, Sorted).
381
382
383
384%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
385%
386%  time and date predicates
387%
388%  if your Prolog compiler does not provide access to the operating system
389%  time and date just write dummy definitions
390%
391%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
392
393
394% '$lgt_current_date'(?Year, ?Month, ?Day)
395
396'$lgt_current_date'(Year, Month, Day) :-
397    datime(datime(Year, Month, Day, _, _, _)).
398
399
400% '$lgt_current_time'(?Hours, ?Mins, ?Secs)
401
402'$lgt_current_time'(Hours, Mins, Secs) :-
403    datime(datime(_, _, _, Hours, Mins, Secs)).
404
405
406
407%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
408%
409%  timing predicate
410%
411%  if your Prolog compiler does not provide access to a timing predicate
412%  just write dummy definition
413%
414%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
415
416
417% '$lgt_cpu_time'(-Seconds)
418
419'$lgt_cpu_time'(Seconds) :-
420    statistics(cputime, [Miliseconds, _]),
421    Seconds is Miliseconds/1000.
422
423
424
425%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
426%
427%  comparison predicate
428%
429%  the usual compare/3 definition
430%
431%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
432
433
434% compare(?atom, @term, @term) -- built-in
435
436
437
438%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
439%
440%  callable predicate
441%
442%  the usual callable/1 definition
443%
444%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
445
446
447% callable(@term) -- built-in
448
449
450
451%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
452%
453%  read character predicate
454%
455%  read a single character echoing it and writing a newline after
456%
457%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
458
459
460'$lgt_read_single_char'(Char) :-
461    get_char(Char),
462    (   peek_code(10) ->    % hack to workaround the lack of built-in
463        get_code(_)         % support for unbuffered character input
464    ;   true
465    ).
466
467
468
469%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
470%
471%  pretty print a term by naming its free variables
472%  (avoid instantiating variables in term by using double negation if necessary)
473%
474%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
475
476
477'$lgt_pretty_print_vars'(Stream, Term) :-
478    \+ \+ (
479        numbervars(Term, 0, _),
480        write_term(Stream, Term, [numbervars(true)])).
481
482
483'$lgt_pretty_print_vars_quoted'(Stream, Term) :-
484    \+ \+ (
485        numbervars(Term, 0, _),
486        write_term(Stream, Term, [numbervars(true), quoted(true)])).
487
488
489
490%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
491%
492%  getting stream current line number
493%  (needed for improved compiler error messages)
494%
495%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
496
497
498% '$lgt_stream_current_line_number'(@stream, -integer)
499
500'$lgt_stream_current_line_number'(Stream, Line) :-
501    stream_property(Stream, position('$stream_position'(_, Last, _))),
502    Line is Last + 1.
503
504
505
506%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
507%
508%  handling of Prolog-proprietary directives on Logtalk source files
509%
510%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
511
512
513% '$lgt_ignore_pl_directive'(@callable)
514
515'$lgt_ignore_pl_directive'(load_foreign_files(Files,Libs,InitRoutine)) :-
516    load_foreign_files(Files,Libs,InitRoutine).
517
518
519% '$lgt_rewrite_and_copy_pl_directive'(@callable, -callable)
520
521'$lgt_rewrite_and_copy_pl_directive'(table(PIs), table(CPIs)) :-
522    '$lgt_rewrite_and_copy_pl_directive_pis'(PIs, CPIs).
523
524'$lgt_rewrite_and_copy_pl_directive'(thread_local(PIs), thread_local(CPIs)) :-
525    '$lgt_rewrite_and_copy_pl_directive_pis'(PIs, CPIs).
526
527'$lgt_rewrite_and_copy_pl_directive_pis'(PIs, _) :-
528    var(PIs),
529    throw(instantiation_error).
530'$lgt_rewrite_and_copy_pl_directive_pis'([], []) :-
531    !.
532'$lgt_rewrite_and_copy_pl_directive_pis'([PI| PIs], [CPI| CPIs]) :-
533    !,
534    '$lgt_rewrite_and_copy_pl_directive_pis'(PI, CPI),
535    '$lgt_rewrite_and_copy_pl_directive_pis'(PIs, CPIs).
536'$lgt_rewrite_and_copy_pl_directive_pis'((PI, PIs), (CPI, CPIs)) :-
537    !,
538    '$lgt_rewrite_and_copy_pl_directive_pis'(PI, CPI),
539    '$lgt_rewrite_and_copy_pl_directive_pis'(PIs, CPIs).
540'$lgt_rewrite_and_copy_pl_directive_pis'(Functor/Arity, TFunctor/TArity) :-
541    '$lgt_pp_object_'(_, Prefix, _, _, _, _, _, _, _, _, _),
542    '$lgt_construct_predicate_functor'(Prefix, Functor, Arity, TFunctor),
543    functor(Meta, Functor, Arity),
544    (   '$lgt_pp_meta_predicate_'(Meta) ->
545        TArity is Arity + 4
546    ;   TArity is Arity + 3
547    ).
548
549
550% '$lgt_rewrite_and_recompile_pl_directive'(@callable, -callable)
551
552'$lgt_rewrite_and_recompile_pl_directive'(_, _) :-
553    fail.
554
555
556
557%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
558%
559%  multi-threading predicates
560%
561%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
562
563
564% thread_property(+atom, ?nonvar) -- built-in
565
566
567% thread_self(?atom) -- built-in
568
569
570% thread_create(@callable, -thread_id, +list) -- built-in
571
572
573% thread_join(+atom, -nonvar) -- built-in
574
575
576% thread_detach(+atom) -- built-in
577
578
579% thread_exit(@term) -- built-in
580
581
582% thread_send_message(+atom, @callable) -- built-in
583
584
585% thread_peek_message(+atom, ?callable) -- built-in
586
587
588% thread_get_message(+atom, ?callable) -- built-in
589
590
591% thread_get_message(?callable) -- built-in
592
593
594% thread_sleep(+number) -- built-in
595
596
597
598%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
599%
600%  Shortcut to the Logtalk built-in predicate logtalk_load/1
601%
602%  defined in the config files in order to be able to comment it out in case
603%  of conflict with some Prolog native feature; it implies conformance with
604%  the ISO Prolog standard regarding the definition of the {}/1 syntax
605%
606%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
607
608{File, Files} :-
609    !,
610    logtalk_load(File),
611    {Files}.
612{File} :-
613    logtalk_load(File).
614
615
616
617%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
618%
619%  end!
620%
621%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the browser.