root/tags/lgt2210/configs/template.config

Revision 1460, 9.1 KB (checked in by pmoura, 4 years ago)

Updated release number to 2.21.0.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%
3%  Logtalk - Object oriented extension to Prolog
4%  Release 2.21.0
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 definition for missing ISO predicates
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%  metapredicates
56%
57%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58
59
60% forall(+callable, +callble)
61
62forall(Generate, Test) :-
63    \+ call((Generate, \+ call(Test))).
64
65
66% retractall(+callable)
67
68retractall(Head) :-
69    ?????
70
71
72% lgt_call/2-8
73%
74% if your compiler provides call/1-8 as built-in
75% predicates rewrite these definitions using call(...).
76
77'$lgt_call'(F, A) :-
78    Call =.. [F, A],
79    call(Call).
80
81
82'$lgt_call'(F, A1, A2) :-
83    Call =.. [F, A1, A2],
84    call(Call).
85
86
87'$lgt_call'(F, A1, A2, A3) :-
88    Call =.. [F, A1, A2, A3],
89    call(Call).
90
91
92'$lgt_call'(F, A1, A2, A3, A4) :-
93    Call =.. [F, A1, A2, A3, A4],
94    call(Call).
95
96
97'$lgt_call'(F, A1, A2, A3, A4, A5) :-
98    Call =.. [F, A1, A2, A3, A4, A5],
99    call(Call).
100
101
102'$lgt_call'(F, A1, A2, A3, A4, A5, A6) :-
103    Call =.. [F, A1, A2, A3, A4, A5, A6],
104    call(Call).
105
106
107'$lgt_call'(F, A1, A2, A3, A4, A5, A6, A7) :-
108    Call =.. [F, A1, A2, A3, A4, A5, A6, A7],
109    call(Call).
110
111
112% lgt_once/2-8
113%
114% if your compiler provides call/1-8 as built-in
115% predicates rewrite these definitions using call(...), !.
116
117'$lgt_once'(F, A) :-
118    Call =.. [F, A],
119    once(Call).
120
121
122'$lgt_once'(F, A1, A2) :-
123    Call =.. [F, A1, A2],
124    once(Call).
125
126
127'$lgt_once'(F, A1, A2, A3) :-
128    Call =.. [F, A1, A2, A3],
129    once(Call).
130
131
132'$lgt_once'(F, A1, A2, A3, A4) :-
133    Call =.. [F, A1, A2, A3, A4],
134    once(Call).
135
136
137'$lgt_once'(F, A1, A2, A3, A4, A5) :-
138    Call =.. [F, A1, A2, A3, A4, A5],
139    once(Call).
140
141
142'$lgt_once'(F, A1, A2, A3, A4, A5, A6) :-
143    Call =.. [F, A1, A2, A3, A4, A5, A6],
144    once(Call).
145
146
147'$lgt_once'(F, A1, A2, A3, A4, A5, A6, A7) :-
148    Call =.. [F, A1, A2, A3, A4, A5, A6, A7],
149    once(Call).
150
151
152
153%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154%
155%  Prolog built-in metapredicates
156%
157%  (excluding ISO Prolog Standard metapredicates)
158%
159%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
160
161
162% '$lgt_pl_metapredicate'(?callable).
163
164'$lgt_pl_metapredicate'(_) :-
165    fail.
166
167
168
169%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
170%
171%  file extension predicates
172%
173%  these extensions are used by Logtalk load/compile predicates
174%
175%  you may want to change the extension for Prolog files to match
176%  the one expected by your Prolog compiler
177%
178%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
179
180
181% '$lgt_file_extension'(?atom, ?atom)
182
183'$lgt_file_extension'(metafile, '.mlgt').
184'$lgt_file_extension'(logtalk, '.lgt').
185'$lgt_file_extension'(prolog, '.pl').
186'$lgt_file_extension'(xml, '.xml').
187
188
189
190%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
191%
192%  default flag values
193%
194%  if your Prolog compiler supports the ISO definition of the
195%  initialization/1 then change the default value below to true
196%
197%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198
199
200% '$lgt_default_flag'(?atom, ?atom)
201%
202% default values for all flags
203
204'$lgt_default_flag'(iso_initialization_dir, false).
205
206'$lgt_default_flag'(xml, on).
207'$lgt_default_flag'(xsl, 'lgtxml.xsl').
208'$lgt_default_flag'(xmlspec, dtd).
209'$lgt_default_flag'(doctype, local).
210
211'$lgt_default_flag'(unknown, warning).
212'$lgt_default_flag'(misspelt, warning).
213'$lgt_default_flag'(singletons, warning).
214'$lgt_default_flag'(lgtredef, warning).
215'$lgt_default_flag'(plredef, silent).
216'$lgt_default_flag'(portability, silent).
217
218'$lgt_default_flag'(report, on).
219
220'$lgt_default_flag'(smart_compilation, off).
221
222'$lgt_default_flag'(startup_message, flags).
223
224'$lgt_default_flag'(underscore_vars, singletons).
225
226'$lgt_default_flag'(code_prefix, '').
227
228'$lgt_default_flag'(debug, off).
229'$lgt_default_flag'(supports_break_predicate, false).
230
231
232
233%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
234%
235%  list predicates
236%
237%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
238
239
240'$lgt_append'([], List, List).
241'$lgt_append'([Head| Tail], List, [Head| Tail2]) :-
242    '$lgt_append'(Tail, List, Tail2).
243
244
245'$lgt_member'(Head, [Head| _]).
246'$lgt_member'(Head, [_| Tail]) :-
247    '$lgt_member'(Head, Tail).
248
249
250'$lgt_member_var'(V, [H| _]) :-
251    V == H.
252'$lgt_member_var'(V, [_| T]) :-
253    '$lgt_member_var'(V, T).
254
255
256'$lgt_proper_list'([]).
257'$lgt_proper_list'([_| List]) :-
258    '$lgt_proper_list'(List).
259
260
261'$lgt_reverse'(List, Reversed) :-
262    '$lgt_reverse'(List, [], Reversed, Reversed).
263
264'$lgt_reverse'([], Reversed, Reversed, []).
265'$lgt_reverse'([Head| Tail], List, Reversed, [_| Bound]) :-
266    '$lgt_reverse'(Tail, [Head| List], Reversed, Bound).
267
268
269
270%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
271%
272%  file predicates
273%
274%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
275
276
277% '$lgt_file_exists'(+atom)
278%
279% see if a file exist in the current directory
280
281'$lgt_file_exists'(File) :-
282    ?????
283
284
285% '$lgt_load_prolog_code'(+atom)
286%
287% compile and load a Prolog file
288
289'$lgt_load_prolog_code'(File) :-
290    ?????
291
292
293% '$lgt_compare_file_mtimes'(?atom, +atom, +atom)
294%
295% compare file modification times
296%
297% should fail if file modification times cannot be retrived
298% or if one of the files does not exist
299
300'$lgt_compare_file_mtimes'(Result, File1, File2) :-
301    ?????
302
303
304
305%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
306%
307%  sorting predicates
308%
309%  note that sort/2 and keysort/2 are buitl-in predicates in most Prolog
310%  compilers
311%
312%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
313
314
315% '$lgt_keysort'(+list, -list)
316
317'$lgt_keysort'(List, Sorted) :-
318    ?????
319
320
321% '$lgt_sort'(+list, -list)
322
323'$lgt_sort'(List, Sorted) :-
324    ?????
325
326
327
328%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
329%
330%  time and date predicates
331%
332%  if your Prolog compiler does not provide access to the operating system
333%  time and date just write dummy definitions
334%
335%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
336
337
338% '$lgt_current_date'(?Year, ?Month, ?Day)
339
340'$lgt_current_date'(Year, Month, Day) :-
341    ?????
342
343
344% '$lgt_current_time'(?Hours, ?Mins, ?Secs)
345
346'$lgt_current_time'(Hours, Mins, Secs) :-
347    ?????
348
349
350
351%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352%
353%  timing predicate
354%
355%  if your Prolog compiler does not provide access to a timing predicate
356%  just write dummy definition
357%
358%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
359
360
361% '$lgt_cpu_time'(-Seconds)
362
363'$lgt_cpu_time'(Seconds) :-
364    ?????
365
366
367
368%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
369%
370%  comparison predicate
371%
372%  the usual compare/3 definition
373%
374%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
375
376
377% compare(?atom, @term, @term)
378
379compare(Order, Term1, Term2) :-
380    ?????
381
382
383
384%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
385%
386%  callable predicate
387%
388%  the usual callable/1 definition
389%
390%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
391
392
393% callable(@term)
394
395callable(Term) :-
396    ?????
397
398
399
400%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
401%
402%  read character predicate
403%
404%  read a single character echoing it and writing a newline after
405%
406%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
407
408
409'$lgt_read_single_char'(Char) :-
410    ?????
411
412
413
414%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
415%
416%  pretty print a term by naming its free variables
417%  (avoid instantiating variables in term by using double negation if necessary)
418%
419%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420
421
422'$lgt_pretty_print_vars'(Stream, Term) :-
423    ?????
424
425
426'$lgt_pretty_print_vars_quoted'(Stream, Term) :-
427    ?????
428
429
430
431%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
432%
433%  end!
434%
435%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the browser.