root/tags/lgt291/configs/swi330.config

Revision 7, 6.3 KB (checked in by pmoura, 7 years ago)

Corrected compiler bug in the error checking code of directives info/1 and info/2.
Change the "mi" example objects loading order to avoid some "unknown entity" warnings.

  • 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.9.1
5%
6%  configuration file for SWI Prolog 3.3.x
7%
8%  last updated: August 24, 2000
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
29lgt_iso_predicate(_) :-
30    fail.
31
32
33
34%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35%
36%  predicate properties
37%
38%  this predicate must return at least static, dynamic and built_in
39%  properties for an existing predicate
40%
41%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42
43
44% lgt_predicate_property(+callable, ?predicate_property)
45
46lgt_predicate_property(Pred, Prop) :-
47    predicate_property(Pred, Prop).
48
49
50
51%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52%
53%  metapredicates
54%
55%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56
57
58% lgt_call/2-8
59%
60% use these definitions only if your compiler does
61% not provide call/1-8 as built-in predicates
62
63lgt_call(F, A) :-
64    call(F, A).
65
66
67lgt_call(F, A1, A2) :-
68    call(F, A1, A2).
69
70
71lgt_call(F, A1, A2, A3) :-
72    call(F, A1, A2, A3).
73
74
75lgt_call(F, A1, A2, A3, A4) :-
76    call(F, A1, A2, A3, A4).
77
78
79lgt_call(F, A1, A2, A3, A4, A5) :-
80    call(F, A1, A2, A3, A4, A5).
81
82
83lgt_call(F, A1, A2, A3, A4, A5, A6) :-
84    call(F, A1, A2, A3, A4, A5, A6).
85
86
87lgt_call(F, A1, A2, A3, A4, A5, A6, A7) :-
88    call(F, A1, A2, A3, A4, A5, A6, A7).
89
90
91% lgt_once/2-8
92%
93% if your compiler provides call/1-8 as built-in
94% predicates rewrite these definitions using call(...), !.
95
96lgt_once(F, A) :-
97    call(F, A),
98    !.
99
100
101lgt_once(F, A1, A2) :-
102    call(F, A1, A2),
103    !.
104
105
106lgt_once(F, A1, A2, A3) :-
107    call(F, A1, A2, A3),
108    !.
109
110
111lgt_once(F, A1, A2, A3, A4) :-
112    call(F, A1, A2, A3, A4),
113    !.
114
115
116lgt_once(F, A1, A2, A3, A4, A5) :-
117    call(F, A1, A2, A3, A4, A5),
118    !.
119
120
121lgt_once(F, A1, A2, A3, A4, A5, A6) :-
122    call(F, A1, A2, A3, A4, A5, A6),
123    !.
124
125
126lgt_once(F, A1, A2, A3, A4, A5, A6, A7) :-
127    call(F, A1, A2, A3, A4, A5, A6, A7),
128    !.
129
130
131
132%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133%
134%  file extension predicates
135%
136%  these extensions are used by Logtalk load/compile predicates
137%
138%  you may want to change the extension for Prolog files to match
139%  the one expected by your Prolog compiler
140%
141%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
142
143
144% lgt_file_extension(?atom, ?atom)
145
146lgt_file_extension(logtalk, '.lgt').
147lgt_file_extension(prolog, '.pl').
148lgt_file_extension(xml, '.xml').
149
150
151
152%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153%
154%  default compiler options
155%
156%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157
158
159% lgt_default_compiler_option(?atom, ?atom)
160%
161% default values for all compiler options
162
163lgt_default_compiler_option(iso_initialization_dir, true).
164
165lgt_default_compiler_option(xml, on).
166lgt_default_compiler_option(xsl, 'lgtxml.xsl').
167
168lgt_default_compiler_option(unknown, warning).
169lgt_default_compiler_option(misspelt, warning).
170lgt_default_compiler_option(singletons, warning).
171lgt_default_compiler_option(lgtredef, warning).
172lgt_default_compiler_option(plredef, silent).
173
174lgt_default_compiler_option(report, on).
175
176
177
178%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
179%
180%  list predicates
181%
182%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183
184
185lgt_append([], List, List).
186lgt_append([Head| Tail], List, [Head| Tail2]) :-
187    lgt_append(Tail, List, Tail2).
188
189
190lgt_member(Head, [Head| _]).
191lgt_member(Head, [_| Tail]) :-
192    lgt_member(Head, Tail).
193
194
195lgt_member_var(V, [H| _]) :-
196    V == H.
197lgt_member_var(V, [_| T]) :-
198    lgt_member_var(V, T).
199
200
201lgt_proper_list([]).
202lgt_proper_list([_| List]) :-
203    lgt_proper_list(List).
204
205
206
207%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
208%
209%  file predicates
210%
211%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
212
213
214% lgt_file_exists(+atom)
215%
216% see if a file exist in the current directory
217
218lgt_file_exists(File) :-
219    exists_file(File).
220
221
222% lgt_load_prolog_code(+atom)
223%
224% compile and load a Prolog file
225
226lgt_load_prolog_code(File) :-
227    consult(File).
228
229
230
231%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
232%
233%  sorting predicates
234%
235%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
236
237
238% lgt_keysort(+list, -list)
239
240lgt_keysort(List, Sorted) :-
241    keysort(List, Sorted).
242
243
244% lgt_sort(+list, -list)
245
246lgt_sort(List, Sorted) :-
247    sort(List, Sorted).
248
249
250
251%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
252%
253%  time and date predicates
254%
255%  if your Prolog compiler does not provide access to the operating system
256%  time and date just write dummy definitions
257%
258%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
259
260
261% lgt_current_date(?Year, ?Month, ?Day)
262
263lgt_current_date(Year, Month, Day) :-
264    get_time(Time),
265    convert_time(Time, Year, Month, Day, _, _, _, _).
266
267
268% lgt_current_time(?Hours, ?Mins, ?Secs)
269
270lgt_current_time(Hours, Mins, Secs) :-
271    get_time(Time),
272    convert_time(Time, _, _, _, Hours, Mins, Secs, _).
273
274
275
276%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
277%
278%  timing predicate
279%
280%  if your Prolog compiler does not provide access to a timing predicate
281%  just write dummy definition
282%
283%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
284
285
286% lgt_cpu_time(-Seconds)
287
288lgt_cpu_time(Seconds) :-
289    Seconds is cputime.
290
291
292
293%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294%
295%  comparison predicate
296%
297%  the usual compare/3 definition
298%
299%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
300
301
302% compare(?atom, @term, @term) -- built-in
303
304
305
306%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
307%
308%  end!
309%
310%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the browser.