root/tags/lgt293/configs/NOTES

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

Updated notes on config files for SWI-Prolog.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1=================================================================
2Logtalk - Object oriented extension to Prolog
3Release 2.9.3
4
5Copyright (c) 1998-2002 Paulo Moura.  All Rights Reserved.
6=================================================================
7
8>>>> CONFIG FILE CONTENTS DIFFERENT FROM PREVIOUS RELEASES.
9>>>> SEE FILE template.config FOR DETAILS.
10
11This file contains some notes about the config files provided. If you
12improve or correct some of these files, or write new ones for other
13Prolog compilers, please send me a copy. It is impossible for me to
14individually test Logtalk under each Prolog listed here (or, for that mater,
15to own a copy of each one of these compilers). For some of these Prologs I
16only have the (on-line available) manuals.
17
18As a general rule, always try to use the most recent version of your
19Prolog compiler of choice. Most Prolog compilers are moving towards
20better ISO Standard compatibility and, as a consequence, improved
21Logtalk compatibility.
22
23>>>> CHECK THE CONFIGURATION FILE THAT YOU INTEND TO USE CAREFULLY
24>>>> BEFORE TRYING TO RUN LOGTALK
25
26
27
28template config file
29
30    template.config
31
32    If a config file for your favorite Prolog is not available, use this
33    file to write one. For each predicate in the file, see if it is builtin
34    in your Prolog, available in a library, or if you can write a better
35    definition.
36
37
38ALS Prolog 3.1
39
40    als.config
41
42    Only a few tests have been done with this compiler. One known problem: an
43    ALS bug in operator handling that make calls like "\+ ::Pred" be
44    interpreted like "::(\+ Pred)" instead of "\+ (::Pred)". A workaround is
45    to replace all occurences of "\+ ::Pred" by "\+ (::Pred)" and all
46    occurences of "\+ Obj::Pred" by "\+ (Obj::Pred)". Please report any other
47    problems that you might find. Don't forget to use the cd/1 predicate to
48    set the working directory before loading an example.
49
50
51Amzi! Prolog 4.103, 5.0, 6.1.21
52
53    amzi.config
54
55    For Amzi! Prolog 4.103 and 5.0. The compiler definition of the compare/3
56    built-in predicate returns the atom == instead of = for identical terms
57    (contrary to every other Prolog compiler!). You need to search the library
58    files for all calls of the compare/3 predicate and make the necessary
59    changes.
60
61    Older versions of the Amzi! compiler contain a bug in the implementation
62    of the if-then-else control structure that affects Logtalk behaviour (and
63    any other program using it!). Don't forget to use the chdir/1 predicate
64    to set the working directory before loading an example.
65
66    amzi6.config
67
68    For Amzi! Prolog 6.1.21 beta release. The compiler definition of the
69    compare/3 built-in predicate returns the atom == instead of = for
70    identical terms (contrary to every other Prolog compiler!). You need to
71    search the library files for all calls of the compare/3 predicate and
72    make the necessary changes. Don't forget to use the chdir/1 predicate
73    to set the working directory before loading an example.
74
75
76Aquarius Prolog 1.0
77   
78    aquarius.config
79
80    THIS CONFIG FILE IS INCOMPLETE. Any help in finishing it will be
81    appreciated. Don't forget to use the unix(cd(+Directory)) predicate to
82    set the working directory before loading an example.
83
84
85Arity/Prolog32 V 1.1
86
87    arity.config
88
89    THIS CONFIG FILE IS INCOMPLETE. Any help in finishing it will be
90    appreciated. Don't forget to use the chdir/1 predicate to set the
91    working directory before loading an example.
92
93
94B-Prolog 4.0~5.0, 6.x
95
96    b5.config
97
98    For B-Prolog 4.0 or 5.0.
99    The (Logtalk) predicates lgt_current_date/3 and lgt_current_time/3
100    have dummy definitions. Don't forget to use the chdir/1 predicate to
101    set the working directory before loading an example.
102
103    b6.config
104
105    For B-Prolog 6.x.
106    Don't forget to use the chdir/1 predicate to set the working
107    directory before loading an example.
108
109Bin-Prolog 8.x
110
111    bin.config
112
113    Start BinProlog using "bp -l4". You will need to create project files to
114    workaround the restriction of only one top-level file per interactive
115    session. For instance, the project file for the metapredicates example
116    will look like (in the Unix version):
117   
118        :- ['configs/bin.config'].
119        :- ['compiler/logtalk.pl'].
120       
121        :- ['examples/metapredicates/meta.pl'].
122        :- ['examples/metapredicates/sort1.pl'].
123        ...
124   
125    You will probably want to have a project file including only the config
126    and the pre-processor/runtime files (logtalk.pl) in order to compile the
127    examples using logtalk_compile/1 (do NOT use logtalk_load/1 or the
128    provided loader files). Don't forget to call the cd/1 predicate to set
129    the working directory before compiling an example.
130
131    Updated and tested with help of Arun Majumdar.
132
133
134CIAO Prolog 1.6p1, 1.7p162
135
136    ciao16.config
137    ciao_aux16.config
138
139    ciao17.config
140    ciao_aux17.config
141
142    The ciao1x.config is just a loader file with two include/1 directives
143    that load the ciao_aux1x.config and the Logtalk compiler/runtime. You
144    must edit the contents of the file ciao.config to match your operating
145    system (the include directives arguments are file paths that differ
146    between operating systems). The definition of the
147    lgt_predicate_property/2 in file ciao_aux.config is a bit of a hack,
148    but should enable you to run the Logtalk companion examples and to try
149    out your own Logtalk programs. Don't forget to call the cd/1 predicate
150    to set the working directory before compiling an example (you will need
151    first to load the library system that exports the cd/1 predicate by
152    calling the goal use_module(library(system))).
153
154
155Eclipse 4.2.2, 5.x
156
157    eclipse.config
158    eclipseiso.config
159
160    There are two configs files for this compiler. The first one, named
161    "eclispe.config", should be used when, for some reason, we don't want
162    to load the "iso" library. The second file, "eclispeiso.config" contains
163    a call to load the "iso" library.
164
165    Adopted from a config file written and tested with help of Taner Bilgic
166    for Logtalk 1.x. Don't forget to use the cd/1 predicate to set the working
167    directory before loading an example.
168
169
170GNU Prolog 1.1.2 (and later versions)
171
172    gnu.config
173
174    GNU Prolog supports the ISO Prolog standard. No problems expected. You
175    can generate a new Prolog top level that includes the Logtalk config file
176    and pre-processor plus the runtime by doing something like:
177
178    % cd lgt292
179    % cp configs/gnu.config configs/gnu.pl
180    % gplc -o logtalk configs/gnu.pl compiler/logtalk.pl
181    % mv logtalk /usr/local/bin/
182
183    This way, every time you want to work with Logtalk you will just need to
184    type:
185
186    % logtalk
187
188    Don't forget to use the change_directory/1 predicate to set the working
189    directory before loading an example.
190
191
192IC Prolog II 0.96
193
194    ic.config
195
196    THIS CONFIG FILE IS INCOMPLETE. Any help in finishing it will be
197    appreciated (how do we define ISO compliant catch/3 and throw/1
198    predicates ?). Don't forget to use the cd/1 predicate to set the
199    working directory before loading an example.
200
201
202IF/Prolog 5.1
203
204    if.config
205
206    IF/Prolog 5.1 supports the ISO Prolog standard. No problems expected.
207    Don't forget to use the cd/1 predicate to set the working directory
208    before loading an example.
209
210
211K-Prolog 4.5, 5.01 Linux/Solaris, 5.02 Windows
212
213    k45.config
214
215    For Logtalk to run with K-Prolog 4.5 you need to apply the following patch
216    to the Logtalk pre-processor: find and replace every instance of "throw("
217    with "iso_throw(". This config file have been written with the help of
218    Nobukuni Kino. Don't forget to use the cd/1 predicate to set the working
219    directory before loading an example.
220
221    k50.config
222
223    Config file for the Linux/Solaris 5.01 version or Windows 5.0.2 version
224    (if you are still running version 5.00 please upgrade before using Logtalk).
225    K-Prolog 5.01 supports the ISO Prolog standard. No problems expected.
226    This config file have been written with the help of Nobukuni Kino. Don't
227    forget to use the cd/1 predicate to set the working directory before
228    loading an example.
229
230
231LPA MacProlog32 1.25
232
233    lpamac.config
234
235    This is my old Prolog development environment. Two known problems: (1) an
236    LPA bug in operator handling that make calls like "\+ ::Pred" be
237    interpreted like "::(\+ Pred)" instead of "\+ (::Pred)". A workaround is
238    to replace all occurences of "\+ ::Pred" by "\+ (::Pred)"; (2) If you call
239    the \+ operator in your code the writeq/1 built-in don't always output a
240    space after the operator resulting in calls like "\+(...)". Because \+ is
241    not defined as a predicate this will fail. Don't forget to use the dvol/1
242    predicate to set the working directory before loading an example.
243    Due to the size of the Logtalk pre-processor file, you must load it by
244    using the consult/1 predicate instead of using the File:Open menu option.
245    Be aware that this configuration file redefines some built-ins that
246    you may use in your own programs. You must be careful to not consult the
247    config file twice.
248
249
250LPA WinProlog32 3.61 & 4.00
251
252    lpawin36.config
253    lpawin40.config
254
255    Written with the help of the LPA support team. Of course,
256    if you find any bug please direct your flames to me ;-).
257    Be aware that this configuration file redefines some built-ins that
258    you may use in your programs. Don't forget to use the chdir/1
259    predicate to set the working directory before loading an example. Be
260    careful to not consult the config file twice.
261
262
263MasterProlog 4.1
264
265    master.config
266
267    Written with the help of the MasterProlog support team (but if you find
268    any Logtalk problem please report it to me).
269    If in the MasterProlog version that you are using the implementation of
270    the close/1 predicate does not follow the ISO standard, you will have to
271    apply the following patch to the Logtalk pre-processor: replace every
272    call of close(...) with fclose(...).
273
274
275Open Prolog 1.1b4
276
277    open.config
278
279    Limited test done. Please report any problems that you may find.
280    Don't forget to use the set_folder/1 predicate to set the working
281    directory before loading an example.
282
283
284PrologII+ 4.5
285
286    prologII.config
287
288    Written and tested with the help of Claude Lai from PrologIA. You need
289    to apply the following patches to the Logtalk pre-processor/runtime:
290    Search and replace every instance of "quoted(true)" with "quoted(:true)";
291    "open(File, write, Stream)" with "open(File, :write, Stream)",
292    "catch(close(Stream), _, true)" with "catch(close(Stream), _, :true)",
293    "open(File, read, Stream)" with "open(File, :read, Stream, [eof_action(eof_code)])".
294    Remember that you need to use the set_import_dir/1 built-in predicate to
295    set the working directory before loading an example.
296
297
298QU-Prolog 4.3
299
300    qu.config
301
302    Not tested but no problems are expected.
303    The predicates lgt_current_date/3 and lgt_current_time/3 have dummy
304    definitions. For most users, this will be no problem (some examples may
305    use lgt_current_date/3 only to put a time stamp in new objects).
306
307
308Quintus Prolog 3.3
309
310    quintus.config
311
312    Written and tested with help of a friend of mine, Paulo Urbano, for a
313    previous version. Adopted (but not tested) for the current release by
314    using information available on-line in the internet. Don't forget to use
315    the unix(cd(Dir)) predicate to set the working directory before loading
316    an example.
317
318
319SICStus Prolog 3.5~3.8.x
320
321    sicstus35.config
322   
323    For versions 3.5, 3.6, and 3.7.
324    The initialization/1 directive does not follow the ISO standard. In order
325    to run the examples you have to edit the loader files and remove the
326    call to the directive, leaving of course the logtalk_load/1 call. Also,
327    some library objects (like difflist) use the unify_with_occurs_check/2 ISO
328    predicate that the 3.5 version does not define. Don't forget to use
329    the working_directory/2 predicate to set the working directory before
330    loading an example.
331
332    sicstus38.config
333   
334    For version 3.8.x. The config file sets the flag language to iso, but that
335    is only recomended and should not be needed to run Logtalk.
336    No problems expected although not fully tested. Don't forget to use the
337    working_directory/2 predicate to set the working directory before loading
338    an example.
339
340
341SWI Prolog 3.2.9 & 3.3.x and later versions
342
343    swi329.config
344
345    For version 3.2.9 (or older versions).
346
347    swi.config
348
349    For version 3.3.x and later releases
350
351    No problems expected. Please report any other problem found (with a
352    solution if possible). Don't forget to use the cd/1 predicate to set
353    the working directory before loading an example.
354
355
356Trinc-Prolog R3
357
358    trinc.config
359
360    There is a conflict between Logtalk and Trinc-Prolog operators that
361    prevents the Logtalk pre-processor/runtime to compile without errors.
362    Also, the definition of lgt_predicate_property/2 is fragile. Better
363    support is needed from TP regarding predicate properties.
364
365
366XSB Prolog 2.3
367
368    xsb.config
369
370    You need to rename both the config file and the Logtalk pre-processor to
371    end with a '.P' extension otherwise the (re)consult built-in predicate
372    will not find them!
373
374    You also need to apply the following patchs to the Logtalk pre-processor/
375    runtime: (1) open the file compiler/logtalk.pl, go to the line 1670 and
376    replace the clause "lgt_current_object_(user, user0_)." by the query
377    ":- assertz(lgt_current_object_(user, user0_))."; (2) you may get
378    syntax errors while compiling the Logtalk pre-processor or some of the
379    examples due to a know bug in the XSB parsing of infix operators: just
380    add a space after the infix operator.
381
382    The write() and writeq() predicates output code that in some instances
383    can not be readed back with read(). If you receive a syntax error while
384    loading a Logtalk compiled file we will have to fix the problem by
385    editing the file (the Prolog output, not the Logtalk source). Don't
386    forget to use the cd/1 predicate to set the working directory before
387    loading an example.
388
389
390YAP 4.2.0 & 4.3.x
391
392    yap420.config
393   
394    For version 4.2.0 (or older versions).
395
396    yap430.config
397
398    For all 4.3.x versions.
399
400    The predicates lgt_current_date/3 and lgt_current_time/3 have dummy
401    definitions. For most users, this will be no problem (some examples may
402    use lgt_current_date/3 only to put a time stamp in new objects). Don't
403    forget to use the cd/1 predicate to set the working directory before
404    loading an example.
Note: See TracBrowser for help on using the browser.