root/trunk/configs/NOTES.txt

Revision 4572, 19.8 KB (checked in by pmoura, 2 weeks ago)

Updated the Logtalk version number to 2.33.3 in preparation for the next release.

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