root/tags/lgt293/configs/yap430.config

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

Changed comments about Logtalk flags.

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