root/tags/lgt290/configs/qu.configold

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

Initial revision

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