root/tags/lgt2311/configs/template.config

Revision 3986, 10.7 KB (checked in by pmoura, 13 months ago)

Updated the release number to 2.31.1.

  • 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 <your Prolog compiler name here>
7%
8%  last updated: <date of latest update>
9%
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12
13
14
15%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16%
17%  ISO Prolog Standard predicates that we must define because they are
18%  not built-in
19%
20%  add a clause for lgt_iso_predicate/1 declaring each ISO predicate that
21%  we must define; there must be at least one clause for this predicate
22%  whose call should fail if we don't define any ISO predicates
23%
24%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25
26
27% '$lgt_iso_predicate'(?callable).
28%
29% table of missing ISO predicates which are defined in this file
30
31'$lgt_iso_predicate'(_) :-          % remove this clause if you need
32    fail.                           % to define any ISO predicate
33
34
35
36%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37%
38%  predicate properties
39%
40%  this predicate must return at least static, dynamic, and built_in
41%  properties for an existing predicate
42%
43%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44
45
46% '$lgt_predicate_property'(+callable, ?predicate_property)
47
48'$lgt_predicate_property'(Pred, Prop) :-
49    ?????
50
51
52
53%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54%
55%  meta-predicates
56%
57%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58
59
60% call_cleanup(+callable, +callble) -- built-in ????
61
62
63% forall(+callable, +callble) -- built-in ????
64
65forall(Generate, Test) :-
66    \+ (call(Generate), \+ call(Test)).
67
68
69% retractall(+callable)
70
71retractall(Head) :-
72    ?????
73
74
75% lgt_call/2-9
76%
77% if your compiler provides call/1-9 as built-in
78% predicates rewrite these definitions using call(...).
79
80call_with_args(F, A) :-
81    Call =.. [F, A],
82    call(Call).
83
84
85call_with_args(F, A1, A2) :-
86    Call =.. [F, A1, A2],
87    call(Call).
88
89
90call_with_args(F, A1, A2, A3) :-
91    Call =.. [F, A1, A2, A3],
92    call(Call).
93
94
95call_with_args(F, A1, A2, A3, A4) :-
96    Call =.. [F, A1, A2, A3, A4],
97    call(Call).
98
99
100call_with_args(F, A1, A2, A3, A4, A5) :-
101    Call =.. [F, A1, A2, A3, A4, A5],
102    call(Call).
103
104
105call_with_args(F, A1, A2, A3, A4, A5, A6) :-
106    Call =.. [F, A1, A2, A3, A4, A5, A6],
107    call(Call).
108
109
110call_with_args(F, A1, A2, A3, A4, A5, A6, A7) :-
111    Call =.. [F, A1, A2, A3, A4, A5, A6, A7],
112    call(Call).
113
114
115call_with_args(F, A1, A2, A3, A4, A5, A6, A7, A8) :-
116    Call =.. [F, A1, A2, A3, A4, A5, A6, A7, A8],
117    call(Call).
118
119
120
121%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
122%
123%  Prolog built-in meta-predicates
124%
125%  (excluding ISO Prolog Standard meta-predicates)
126%
127%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
128
129
130% '$lgt_pl_meta_predicate'(?callable).
131
132'$lgt_pl_meta_predicate'(_) :-
133    fail.
134
135
136
137%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
138%
139%  file extension predicates
140%
141%  these extensions are used by Logtalk load/compile predicates
142%
143%  you may want to change the extension for Prolog files to match
144%  the one expected by your Prolog compiler
145%
146%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147
148
149% '$lgt_file_extension'(?atom, ?atom)
150
151'$lgt_file_extension'(logtalk, '.lgt').
152'$lgt_file_extension'(prolog, '.pl').
153'$lgt_file_extension'(xml, '.xml').
154
155
156
157%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
158%
159%  default flag values
160%
161%  if your Prolog compiler supports the ISO definition of the
162%  initialization/1 then change the default value below to true
163%
164%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165
166
167% '$lgt_default_flag'(?atom, ?atom)
168%
169% default values for all flags
170
171'$lgt_default_flag'(xmldocs, on).
172'$lgt_default_flag'(xslfile, 'lgtxml.xsl').
173'$lgt_default_flag'(xmlspec, dtd).
174'$lgt_default_flag'(xmlsref, local).
175
176'$lgt_default_flag'(unknown, warning).
177'$lgt_default_flag'(misspelt, warning).
178'$lgt_default_flag'(singletons, warning).
179'$lgt_default_flag'(lgtredef, warning).
180'$lgt_default_flag'(plredef, silent).
181'$lgt_default_flag'(portability, silent).
182
183'$lgt_default_flag'(report, on).
184
185'$lgt_default_flag'(smart_compilation, off).
186'$lgt_default_flag'(reload, always).
187
188'$lgt_default_flag'(startup_message, flags(verbose)).
189
190'$lgt_default_flag'(underscore_variables, singletons).
191
192'$lgt_default_flag'(code_prefix, '').
193
194'$lgt_default_flag'(debug, off).
195'$lgt_default_flag'(break_predicate, false).
196
197'$lgt_default_flag'(events, off).
198
199'$lgt_default_flag'(altdirs, off).
200'$lgt_default_flag'(tmpdir, 'lgt_tmp/').
201'$lgt_default_flag'(xmldir, 'xml_docs/').
202
203'$lgt_default_flag'(encoding_directive, unsupported).
204'$lgt_default_flag'(threads, unsupported).
205
206'$lgt_default_flag'(context_switching_calls, allow).
207
208
209
210%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
211%
212%  list predicates
213%
214%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
215
216
217'$lgt_append'([], List, List).
218'$lgt_append'([Head| Tail], List, [Head| Tail2]) :-
219    '$lgt_append'(Tail, List, Tail2).
220
221
222'$lgt_member'(Head, [Head| _]).
223'$lgt_member'(Head, [_| Tail]) :-
224    '$lgt_member'(Head, Tail).
225
226
227'$lgt_member_var'(V, [H| _]) :-
228    V == H.
229'$lgt_member_var'(V, [_| T]) :-
230    '$lgt_member_var'(V, T).
231
232
233'$lgt_is_list'([]) :-
234    !.
235'$lgt_is_list'([_| Tail]) :-
236    '$lgt_is_list'(Tail).
237
238
239'$lgt_is_proper_list'(List) :-
240    List == [], !.
241'$lgt_is_proper_list'([_| Tail]) :-
242    nonvar(Tail),
243    '$lgt_is_proper_list'(Tail).
244
245
246
247%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
248%
249%  file predicates
250%
251%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
252
253
254% '$lgt_file_exists'(+atom)
255%
256% see if a file exist in the current directory
257
258'$lgt_file_exists'(File) :-
259    ?????
260
261
262% '$lgt_directory_exists'(+atom)
263%
264% checks if a directory exists
265
266'$lgt_directory_exists'(Directory) :-
267    ?????
268
269
270% '$lgt_current_directory'(-atom)
271%
272% gets current working directory
273
274'$lgt_current_directory'(Directory) :-
275    ?????
276
277
278% '$lgt_change_directory'(+atom)
279%
280% changes current working directory
281
282'$lgt_change_directory'(Directory) :-
283    ?????
284
285
286% '$lgt_make_directory'(+atom)
287%
288% makes a new directory; succeeds if the directory already exists
289
290'$lgt_make_directory'(Directory) :-
291    ?????
292
293
294% '$lgt_load_prolog_code'(+atom, +atom)
295%
296% compile and load a Prolog file
297
298'$lgt_load_prolog_code'(PrologFile, LogtalkSourceFile) :-
299    ?????
300
301
302% '$lgt_compare_file_mtimes'(?atom, +atom, +atom)
303%
304% compare file modification times
305%
306% should fail if file modification times cannot be retrived
307% or if one of the files does not exist
308
309'$lgt_compare_file_mtimes'(Result, File1, File2) :-
310    ?????
311
312
313
314%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
315%
316%  sorting predicates
317%
318%  note that sort/2 and keysort/2 are buitl-in predicates in most Prolog
319%  compilers
320%
321%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322
323
324% '$lgt_keysort'(+list, -list)
325
326'$lgt_keysort'(List, Sorted) :-
327    ?????
328
329
330% '$lgt_sort'(+list, -list)
331
332'$lgt_sort'(List, Sorted) :-
333    ?????
334
335
336
337%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
338%
339%  time and date predicates
340%
341%  if your Prolog compiler does not provide access to the operating system
342%  time and date just write dummy definitions
343%
344%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
345
346
347% '$lgt_current_date'(?Year, ?Month, ?Day)
348
349'$lgt_current_date'(Year, Month, Day) :-
350    ?????
351
352
353% '$lgt_current_time'(?Hours, ?Mins, ?Secs)
354
355'$lgt_current_time'(Hours, Mins, Secs) :-
356    ?????
357
358
359
360%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
361%
362%  timing predicate
363%
364%  if your Prolog compiler does not provide access to a timing predicate
365%  just write dummy definition
366%
367%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
368
369
370% '$lgt_cpu_time'(-Seconds)
371
372'$lgt_cpu_time'(Seconds) :-
373    ?????
374
375
376
377%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
378%
379%  comparison predicate
380%
381%  the usual compare/3 definition
382%
383%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
384
385
386% compare(?atom, @term, @term)
387
388compare(Order, Term1, Term2) :-
389    ?????
390
391
392
393%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
394%
395%  callable predicate
396%
397%  the usual callable/1 definition
398%
399%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
400
401
402% callable(@term)
403
404callable(Term) :-
405    ?????
406
407
408
409%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
410%
411%  read character predicate
412%
413%  read a single character echoing it and writing a newline after
414%
415%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
416
417
418'$lgt_read_single_char'(Char) :-
419    ?????
420
421
422
423%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
424%
425%  pretty print a term by naming its free variables
426%  (avoid instantiating variables in term by using double negation if necessary)
427%
428%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
429
430
431'$lgt_pretty_print_vars'(Stream, Term) :-
432    ?????
433
434
435'$lgt_pretty_print_vars_quoted'(Stream, Term) :-
436    ?????
437
438
439
440%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
441%
442%  getting stream current line number
443%  (needed for improved compiler error messages)
444%
445%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
446
447
448% '$lgt_stream_current_line_number'(@stream, -integer)
449
450'$lgt_stream_current_line_number'(Stream, Line) :-
451    ?????
452
453
454
455%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
456%
457%  handling of Prolog-proprietary directives on Logtalk source files
458%
459%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
460
461
462% '$lgt_ignore_pl_directive'(@callable)
463
464'$lgt_ignore_pl_directive'(_) :-
465    fail.
466
467
468% '$lgt_rewrite_and_copy_pl_directive'(@callable, -callable)
469
470'$lgt_rewrite_and_copy_pl_directive'(_, _) :-
471    fail.
472
473
474% '$lgt_rewrite_and_recompile_pl_directive'(@callable, -callable)
475
476'$lgt_rewrite_and_recompile_pl_directive'(_, _) :-
477    fail.
478
479
480
481%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
482%
483%  Shortcut to the Logtalk built-in predicate logtalk_load/1
484%
485%  defined in the config files in order to be able to comment it out in case
486%  of conflict with some Prolog native feature; it implies conformance with
487%  the ISO Prolog standard regarding the definition of the {}/1 syntax
488%
489%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
490
491{File, Files} :-
492    !,
493    logtalk_load(File),
494    {Files}.
495{File} :-
496    logtalk_load(File).
497
498
499
500%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
501%
502%  end!
503%
504%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the browser.