root/tags/lgt2311/configs/NOTES.txt

Revision 4009, 17.8 KB (checked in by pmoura, 12 months ago)

Make K-Prolog 5.1.x the default version used by the integration scripts due to some serious bugs uncovered on the K-Prolog 6.0.1 version.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1================================================================
2Logtalk - Open source object-oriented logic programming language
3Release 2.31.1
4
5Copyright (c) 1998-2008 Paulo Moura.  All Rights Reserved.
6================================================================
7
8
9This file contains some notes about the config files provided. If you
10improve or correct some of these files, or write new ones for other
11Prolog compilers, please send me a copy. It is impossible for me to
12individually test Logtalk under each Prolog listed here (or, for that
13mater, to own a copy of each one of these compilers). For some of
14these Prolog compilers I only have the manuals available on-line.
15
16As a general rule, always try to use the latest version of your Prolog
17compiler of choice. Most Prolog compilers are moving towards better
18ISO Standard compatibility and, as a consequence, improved Logtalk
19compatibility.
20
21
22template config file
23
24    template.config
25
26    If a config file for your favorite Prolog is not available, use this
27    file as a template for writing one. For each predicate in the file,
28    see if it is built-in in your Prolog, available in a library, or if
29    you can write a better definition.
30
31
32ALS Prolog 3.1
33
34    als.config
35
36    Only a few tests have been done with this compiler. One known problem: an
37    ALS bug in operator handling that make calls like "\+ ::Pred" be
38    interpreted like "::(\+ Pred)" instead of "\+ (::Pred)". A workaround is
39    to replace all occurrences of "\+ ::Pred" by "\+ (::Pred)" and all
40    occurrences of "\+ Obj::Pred" by "\+ (Obj::Pred)". Please report any other
41    problems that you might find. Don't forget to use the cd/1 predicate to
42    set the working directory before loading the library or an example. Consult
43    the file builtins/comp_d10.pro in the ALS Prolog installation directory in
44    order to get the definition of predicate numbervars/3 needed by the Logtalk
45    built-in debugger. Supports smart compilation of source files. Does not
46    support the "altdirs" compiler flag.
47
48
49Amzi! Prolog 7.6.1 and later versions
50
51    amzi.config
52
53    For Amzi! Prolog 7.6.1 and later versions. You need to patch the Logtalk
54    compiler (the "compiler/logtalk.pl" file) by searching for all calls of
55    ':'/2 and wrap them inside call/1. For better performance, use the Amzi!
56    "acmp" command-line compiler to compile the files "configs/amzi.config",
57    "compiler/logtalk.pl", and "libpaths/libpaths.pl" and then load the
58    resulting ".plm" files using the predicate load/1 (you will need first
59    to change the extension of the config file to either ".pl" or ".pro" and
60    to edit the "libpaths.pl" file by following the instructions on the
61    "libpaths/NOTES.txt" file).
62   
63    One potential problem is that the compiler definition of the compare/3
64    built-in predicate returns the atom == instead of = for identical terms
65    (contrary to every other Prolog compiler!). Search the library files for
66    all calls of the compare/3 predicate and make the necessary changes.
67    The built-in sort/2 predicate does not eliminate duplicates, which may
68    result in problems with some of the examples. Don't forget to use the
69    chdir/1 predicate to set the working directory before loading a library
70    or an example.
71
72
73B-Prolog 7.0 and later versions
74
75    b.config
76
77    For B-Prolog 7.0 and later versions. Don't forget to use the chdir/1
78    predicate to set the working directory before loading the library or
79    an example. Note that this configuration file redefines the B-Prolog
80    ::/2 finite-domain built-in predicate (you may use the alternative
81    in/2 predicate instead).
82
83    You can generate a new Prolog top level that includes the config file, the
84    Logtalk compiler/runtime, and the library paths file by doing something
85    like:
86
87        | ?- set_prolog_flag(redefined, off).
88
89        | ?- compile(['configs/b.config', 'compiler/logtalk.pl', 'libpaths/libpaths.pl']).
90   
91    These calls will result in the creation of three files, "b.config.out",
92    "logtalk.out", and "libpaths.out". Place these files on the $BPDIR
93    directory and then copy the "bp" script to a "bplgt" file and modify it
94    by adding the names of the three *.out files after the "$BPDIR/bp.out"
95    file (prefixing them with $BPDIR/). You will probably need to increase
96    the sizes of the code areas on the "bplgt" script if you run into
97    out-of-memory errors with complex applications.
98
99
100Bin-Prolog 8.x~10.x
101
102    bin.config
103
104    Start BinProlog using "bp -l4". You will need to create project files to
105    workaround the restriction of only one top-level file per interactive
106    session. For instance, the project file for the "metapredicates" example
107    will look like (in the Unix version):
108   
109        :- ['$LOGTALKUSER/configs/bin.config'].
110        :- ['$LOGTALKHOME/compiler/logtalk.pl'].
111       
112        :- ['$LOGTALKUSER/examples/metapredicates/meta.pl'].
113        :- ['$LOGTALKUSER/examples/metapredicates/sort1.pl'].
114        ...
115   
116    You will probably want to have a project file including only the config
117    and the pre-processor/runtime files (logtalk.pl) in order to compile the
118    examples using logtalk_compile/1-2 (do NOT use logtalk_load/1-2 or the
119    provided loader files). Don't forget to call the cd/1 predicate to set
120    the working directory before compiling the library or an example.
121    Supports smart compilation of source files.
122
123    Updated and tested with help of Arun Majumdar.
124
125
126CIAO Prolog 1.8p2 and later versions
127
128    ciao.config
129    ciao_aux.config
130
131    The "ciao.config" file is just a loader file containing two include/1
132    directives which load the "ciao_aux.config" and the Logtalk compiler/
133    runtime. You must edit the contents of the file ciao.config to match
134    your operating system (the include directive arguments are file paths
135    that differ between operating systems).
136
137    The definition of the predicate '$lgt_predicate_property'/2 in the file
138    "ciao_aux.config" is a bit of a hack, but should enable you to run the
139    Logtalk companion examples and to try out your own Logtalk programs.
140
141    Don't forget to call the cd/1 predicate to set the working directory
142    before compiling the library or an example (you will need first to
143    load the library system that exports the cd/1 predicate by calling the
144    goal use_module(library(system)). Supports smart compilation of source
145    files.
146
147
148CxProlog 0.95.x or later versions
149
150    cx.config
151
152    Developed and tested with the help of Artur Miguel Dias, CxProlog author.
153
154
155ECLiPSe 5.10#26 or later versions
156
157    eclipse.config
158    eclipseiso.config
159
160    There are two configs files for this compiler. The first one, named
161    "eclipse.config", should be used when, for some reason, you don't want
162    to load the "iso" library. The second file, "eclipseiso.config" contains
163    a call to load the "iso" library. Both config files may be used with
164    ECLiPSe 5.10#26 or later versions.
165
166    You should use the "eclipseiso.config" whenever possible. The alternative
167    config file may not contain all the needed definitions for ISO Prolog
168    predicates that are needed for compiling Logtalk itself, the Logtalk
169    library, or the Logtalk examples.
170
171    There is a clash between Logtalk and ECLiPSe regarding the ::/2 operator.
172    You may still use the ::/2 operator defined on the ECLiPSe constraint
173    solver libraries by using explicit module qualification by writing
174    "{library:(Var::Domain)}" (replace "library" by the actual library name;
175    the {}/1 control construct allows you to bypass the Logtalk compiler).
176
177    For improved performance, add the following calls to the top of all the
178    files in the "compiler" sub-directory:
179   
180        :- pragma(system).
181        :- pragma(nodebug).
182
183    These calls disables debugging support for the Logtalk compiler/runtime
184    Prolog code and mark the Logtalk predicates as built-ins. Make sure that
185    the library top-level is loaded if you want to use the Logtalk built-in
186    debugger.
187
188    Adopted from a config file written and tested with help of Taner Bilgic
189    for Logtalk 1.x. Don't forget to use the cd/1 predicate to set the working
190    directory before loading the library or an example. Supports smart
191    compilation of source files.
192
193    With this Prolog compiler, avoid reloading Logtalk source files declaring
194    and defining dynamic predicates. Due to the semantics of the ECLiPSe
195    built-in predicate compile/1, new clauses for dynamic predicates are
196    appended to the old ones instead of replacing them!
197
198
199GNU Prolog GNU Prolog 1.2.14 and later versions
200
201    gnu.config
202
203    GNU Prolog supports the ISO Prolog standard. No problems expected. You
204    can generate a new Prolog top level that includes the config file and
205    the Logtalk compiler/runtime by doing something like:
206
207        % cd $LOGTALKHOME
208        % mv configs/gnu.config configs/gnu.pl
209
210    Edit the compiler/logtalk.pl file and add the line ":- built_in." to
211    the top. Then:
212
213        % gplc -o logtalk configs/gnu.pl compiler/logtalk.pl
214        % mv logtalk /usr/local/bin/
215
216    This way, every time you want to work with Logtalk you will just need
217    to type:
218
219        % logtalk
220
221    Don't forget to use the change_directory/1 predicate to set the working
222    directory before loading the library or an example. Supports smart
223    compilation of source files.
224
225    On startup, you may get a warning about a suspicious predicate, {}/1.
226    You may safely ignore this warning.
227
228
229IF/Prolog 5.1 and later versions
230
231    if.config
232
233    IF/Prolog 5.1 supports the ISO Prolog standard. No problems expected.
234    Don't forget to use the cd/1 predicate to set the working directory
235    before loading the library or an example. Supports smart compilation
236    of source files. Does not support the "altdirs" compiler flag.
237
238
239JIProlog 3.0.2-6 and later versions
240
241    ji.config
242
243    Written with the help of the JIProlog author (but if you find any Logtalk
244    problem please report it to me). Don't forget to use the cd/1 predicate to
245    set the working directory before loading the library or an example. Some
246    examples may not compile or run due to work in progress regarding ISO
247    Prolog standard compliance. Supports smart compilation of source files.
248
249
250K-Prolog 5.1.2a and later 5.1.x versions
251
252    k.config
253
254    K-Prolog 5.1.2a supports the ISO Prolog standard. No problems expected.
255    Config file written and tested with the help of Nobukuni Kino. Don't
256    forget to use the cd/1 predicate to set the working directory before
257    loading the library or an example. Supports smart compilation of source
258    files.
259
260
261K-Prolog 6.0.1 and later versions
262
263    k6.config
264
265    K-Prolog 6.0.1 supports the current ISO Prolog standard and features
266    from the draft core revison proposal. The Windows version is missing the
267    forall/2 predicate. Other bugs exist in the 6.0.1 beta version that may
268    cause trouble to Prolog and Logtalk applications. These bugs are expected
269    to be corrected in the next K-Prolog version.
270    Don't forget to use the cd/1 predicate to set the working directory before
271    loading the library or an example. Supports smart compilation of source
272    files.
273
274
275LPA MacProlog32 1.25
276
277    lpamac.config
278
279    This is my old Prolog development environment. Two known problems: (1) an
280    LPA bug in operator handling that make calls like "\+ ::Pred" be
281    interpreted like "::(\+ Pred)" instead of "\+ (::Pred)". A workaround is
282    to replace all occurrences of "\+ ::Pred" by "\+ (::Pred)"; (2) If you call
283    the \+ operator in your code the writeq/1 built-in don't always output a
284    space after the operator resulting in calls like "\+(...)". Because \+ is
285    not defined as a predicate this will fail. Don't forget to use the dvol/1
286    predicate to set the working directory before loading an example.
287    Due to the size of the Logtalk pre-processor file, you must load it by
288    using the consult/1 predicate instead of using the File:Open menu option.
289    Be aware that this configuration file redefines some built-ins that
290    you may use in your own programs. You must be careful to not consult the
291    config file twice. Supports smart compilation of source files. Does not
292    support the "altdirs" compiler flag.
293
294
295LPA WinProlog32 4.0x
296
297    lpawin.config
298
299    Written with the help of the LPA support team. Of course, if you find any
300    bugs please direct your flames to me ;-). Be aware that this configuration
301    file redefines some built-ins that you may use in your programs. Don't
302    forget to use the chdir/1 predicate to set the working directory before
303    loading the library or an example. Be careful to not consult the config
304    file twice. Supports smart compilation of source files. Does not support
305    the "altdirs" compiler flag.
306
307
308MasterProlog 4.1
309
310    master.config
311
312    Written with the help of the MasterProlog support team (but if you find
313    any Logtalk problem please report it to me).
314    If in the MasterProlog version that you are using the implementation of
315    the close/1 predicate does not follow the ISO standard, you will have to
316    apply the following patch to the Logtalk pre-processor: replace every
317    call of close(...) with fclose(...).  Does not support the "altdirs"
318    compiler flag.
319
320
321Open Prolog 1.1b5
322
323    open.config
324
325    Limited test done. Please report any problems that you may find.
326    Don't forget to use the set_folder/1 predicate to set the working
327    directory before loading the library or an example. Does not support
328    the "altdirs" compiler flag.
329
330
331PrologII+ 4.5 and later versions
332
333    prologII.config
334
335    Written and tested with the help of Claude Lai from PrologIA. You need
336    to apply the following patches to the Logtalk pre-processor/runtime:
337    Search and replace every instance of "quoted(true)" with "quoted(:true)";
338    "open(File, write, Stream)" with "open(File, :write, Stream)",
339    "catch(close(Stream), _, true)" with "catch(close(Stream), _, :true)",
340    "open(File, read, Stream)" with "open(File, :read, Stream, [eof_action(eof_code)])".
341    Remember that you need to use the set_import_dir/1 built-in predicate to
342    set the working directory before loading the library or an example.
343    Does not support the "altdirs" compiler flag.
344
345
346Qu-Prolog 8.1
347
348    qu.config
349
350    In order to compile and load both the config file and the Logtalk compiler,
351    the following sequence of steps is advised. First make a copy of the config
352    file:
353
354        % cd $LOGTALKHOME/configs; cp qu.config qu.ql
355
356    Second, start Qu-Prolog using adequate switches. For example:
357
358        % qp -T 16 -s 2048 -d 1024 -h 2000
359
360    Third, compile and load the config file using:
361
362        | ?- fcompile('qu.ql', [assemble_only(true)]), load(qu).
363
364    Next, compile and load the Logtalk compiler:
365
366        | ?- chdir('../compiler/'), fcompile('logtalk.pl', [assemble_only(true), string_table(256)]), load(logtalk).
367
368    Finally, compile and load the library paths file:
369
370        | ?- chdir('../libpaths/'), fcompile('libpaths.pl', [assemble_only(true)]), load(libpaths).
371
372    Don't forget to use the chdir/1 predicate to set the working directory
373    before loading the library or an example.
374
375    Written and tested with the help of Peter Robinson.
376
377
378Quintus Prolog 3.3~3.5
379
380    quintus.config
381
382    Written and tested with help of a friend of mine, Paulo Urbano, for a
383    previous version. Adopted (but not tested) for the current release by
384    using information available on-line in the internet. Don't forget to use
385    the unix(cd(Dir)) predicate to set the working directory before loading
386    the library or an example. Supports smart compilation of source files.
387
388
389SICStus Prolog 3.8~3.12.x
390
391    sicstus.config
392   
393    For versions 3.8.x~3.12.x. The config file sets the flag language to
394    iso, but that is only recommended and should not be needed to run Logtalk.
395    No problems expected although not fully tested. Don't forget to use the
396    SICStus working_directory/2 predicate to set the working directory before
397    loading the library or an example. Supports smart compilation of source
398    files.
399
400    If you want SICStus Prolog to automatically load Logtalk at startup, then
401    add the following lines to your ~/.sicstusrc or ~/.sicstus.ini initialization
402    file:
403   
404        :- compile('$LOGTALKUSER/configs/sicstus.config').
405        :- compile('$LOGTALKHOME/compiler/logtalk.pl').
406
407    Consult the SICStus Prolog documentation for further information on the
408    ~/.sicstusrc and ~/.sicstus.ini user initialization files.
409
410
411SICStus Prolog 4.0
412
413    sicstus4.config
414
415    Config file for the forthcoming SICStus Prolog 4.0 version (tested with
416    the Windows beta version).
417
418
419SWI Prolog 5.6.x and later versions
420
421    swi.config
422    swihook.pl
423    xpcehook.pl
424    swi_set_logtalk_context.pl
425
426    No problems expected. Please report any problem found (with a solution
427    if possible). Don't forget to use the cd/1 predicate to set the working
428    directory before loading the library or an example. Supports smart
429    compilation of source files. To improve the integration between Logtalk
430    and SWI-Prolog edit the compiler/logtalk.pl file and add the line
431    ":- system_module." to the top of the file. You may also load the file
432    configs/swihook.pl in order to be able to load Logtalk entities using
433    SWI-Prolog load_files/2 and consult/1 predicates.
434
435    If you want SWI-Prolog to automatically load Logtalk at startup, then add
436    the following lines to your pl.ini (on Windows):
437
438        :- ['drive:\\path to logtalk user folder\\configs\\swi.config'].
439        :- ['drive:\\path to logtalk installation\\compiler\\logtalk.pl'].
440
441     or to your .plrc (on MacOS X, Linux, Unix, and similar systems):
442   
443        :- ['$LOGTALKUSER/configs/swi.config'].
444        :- ['$LOGTALKHOME/compiler/logtalk.pl'].
445
446    See the SWI-Prolog documentation for further information on the .plrc and
447    pl.ini user initialization files.
448
449    If you intend to use Logtalk and XPCE at the same time, you may load the
450    configs/xpcehook.pl file in order to support Logtalk message sending goals
451    as XPCE call-back goals.
452
453    See the comments in the "swi_set_logtalk_context.pl" itself for a
454    description of its functionality.
455
456    With multi-threading support turned on, you will get an warmless message
457    when halting the system regarding threads that wouldn't die: you can
458    supress the message on POSIX systems by using "% swilgt 2> /dev/null".
459
460
461XSB 3.1 and later versions
462
463    xsb.config
464
465    Don't forget to use the cd/1 predicate to set the working directory
466    before loading the library or an example. Supports smart compilation
467    of source files. Support for the Logtalk multi-threading features
468    requires XSB CVS version.
469
470
471YAP 5.1.2 and later versions
472
473    yap.config
474
475    Don't forget to use the cd/1 predicate to set the working directory
476    before loading the library or an example. Supports smart compilation
477    of source files.
Note: See TracBrowser for help on using the browser.