root/tags/lgt2212/configs/NOTES

Revision 1599, 15.6 KB (checked in by pmoura, 4 years ago)

Added note on problem with JIProlog when running on MacOS X.

  • 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.21.2
4
5Copyright (c) 1998-2004 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 Prologs I only have the (on-line available) manuals.
15
16As a general rule, always try to use the most recent version of your
17Prolog compiler of choice. Most Prolog compilers are moving towards
18better ISO Standard compatibility and, as a consequence, improved
19Logtalk compatibility.
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 to write one. For each predicate in the file, see if it is built-in
28    in your Prolog, available in a library, or if you can write a better
29    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.
46
47
48Amzi! Prolog 6.2.2 and later versions
49
50    amzi.config
51
52    For Amzi! Prolog 6.22 and later releases. The compiler definition of the
53    compare/3 built-in predicate returns the atom == instead of = for
54    identical terms (contrary to every other Prolog compiler!). You need to
55    search the library files for all calls of the compare/3 predicate and
56    make the necessary changes. Don't forget to use the chdir/1 predicate
57    to set the working directory before loading the library or an example.
58
59
60B-Prolog 4.0~5.0, 6.4 and later versions
61
62    b5.config
63
64    For B-Prolog 4.0 or 5.0.
65    The (Logtalk) predicates '$lgt_current_date'/3 and '$lgt_current_time'/3
66    have dummy definitions. Don't forget to use the chdir/1 predicate to
67    set the working directory before loading the library or an example.
68
69    b6.config
70
71    For B-Prolog 6.4 and later versions.
72    This version contains a bug in the atom_concat/3 predicate that prevents
73    some examples such as the "symdiff" from running. Don't forget to use the
74    chdir/1 predicate to set the working directory before loading the library
75    or an example.
76
77
78Bin-Prolog 8.x~10.x
79
80    bin.config
81
82    Start BinProlog using "bp -l4". You will need to create project files to
83    workaround the restriction of only one top-level file per interactive
84    session. For instance, the project file for the metapredicates example
85    will look like (in the Unix version):
86   
87        :- ['$LOGTALKHOME/configs/bin.config'].
88        :- ['$LOGTALKHOME/compiler/logtalk.pl'].
89       
90        :- ['$LOGTALKHOME/examples/metapredicates/meta.pl'].
91        :- ['$LOGTALKHOME/examples/metapredicates/sort1.pl'].
92        ...
93   
94    You will probably want to have a project file including only the config
95    and the pre-processor/runtime files (logtalk.pl) in order to compile the
96    examples using logtalk_compile/1-2 (do NOT use logtalk_load/1-2 or the
97    provided loader files). Don't forget to call the cd/1 predicate to set
98    the working directory before compiling the library or an example.
99    Supports smart compilation of source files.
100
101    Updated and tested with help of Arun Majumdar.
102
103
104CIAO Prolog 1.8p2 and later versions
105
106    ciao.config
107    ciao_aux.config
108
109    The ciao.config is just a loader file with two include/1 directives
110    that load the ciao_aux.config and the Logtalk compiler/runtime. You
111    must edit the contents of the file ciao.config to match your operating
112    system (the include directives arguments are file paths that differ
113    between operating systems). The definition of the '$lgt_predicate_property'/2
114    in file ciao_aux.config is a bit of a hack, but should enable you to run
115    the Logtalk companion examples and to try out your own Logtalk programs.
116    Don't forget to call the cd/1 predicate to set the working directory before
117    compiling the library or an example (you will need first to load the library
118    system that exports the cd/1 predicate by calling the goal
119    use_module(library(system)). Supports smart compilation of source files.
120
121
122ECLiPSe 5.5~5.7
123
124    eclipse.config
125    eclipseiso.config
126
127    There are two configs files for this compiler. The first one, named
128    "eclipse.config", should be used when, for some reason, we don't want
129    to load the "iso" library. The second file, "eclipseiso.config" contains
130    a call to load the "iso" library. Both config files may be used with
131    ECLiPSe versions from 5.5 to 5.7
132   
133    You should use the eclipseiso.config whenever possible. The alternative
134    config file may not contain all the needed definitions for ISO Prolog
135    predicates that are needed for compiling Logtalk itself, the Logtalk
136    library or the Logtalk examples.
137
138    For improved performance, add the following calls to the top of all the
139    files in the "compiler" sub-directory:
140   
141        :- pragma(system).
142        :- pragma(nodebug).
143
144    These calls disables debugging support for the Logtalk compiler/runtime
145    Prolog code and mark the Logtalk predicates as built-ins. Make sure that
146    the library toplevel is loaded if you want to use the Logtalk built-in
147    debugger.
148
149    Adopted from a config file written and tested with help of Taner Bilgic
150    for Logtalk 1.x. Don't forget to use the cd/1 predicate to set the working
151    directory before loading the library or an example. Supports smart
152    compilation of source files.
153
154
155GNU Prolog 1.1.2 (and later versions, except 1.2.13)
156
157    gnu.config
158
159    GNU Prolog supports the ISO Prolog standard. No problems expected. You
160    can generate a new Prolog top level that includes the Logtalk config file
161    and pre-processor plus the runtime by doing something like:
162
163    % cd $LOGTALKHOME
164    % mv configs/gnu.config configs/gnu.pl
165
166    Edit the compiler/logtalk.pl file and add the line ":- built_in." to the
167    top. Then:
168
169    % gplc -o logtalk configs/gnu.pl compiler/logtalk.pl
170    % mv logtalk /usr/local/bin/
171
172    This way, every time you want to work with Logtalk you will just need to
173    type:
174
175    % logtalk
176
177    Don't forget to use the change_directory/1 predicate to set the working
178    directory before loading the library or an example. Supports smart
179    compilation of source files.
180
181
182IF/Prolog 5.1
183
184    if.config
185
186    IF/Prolog 5.1 supports the ISO Prolog standard. No problems expected.
187    Don't forget to use the cd/1 predicate to set the working directory
188    before loading the library or an example. Supports smart compilation
189    of source files.
190
191
192JIProlog 3.0.0-4
193
194    ji.config
195
196    Experimental configuration file, written with the help of the JIProlog
197    author (but if you find any Logtalk problem please report it to me).
198    When running on MacOS X, there is a bug on the exists_file/1 built-in
199    predicate which prevents Logtalk from compiling source files.
200    Don't forget to use the chdir/1 predicate to set the working directory
201    before loading the library or an example.
202
203
204K-Prolog 5.01 Linux/Solaris, 5.02 Windows and later versions
205
206    k.config
207
208    Config file for the Linux/Solaris 5.01 version or Windows 5.0.2 version or
209    later versions (if you are still running version 5.00, please upgrade before
210    using Logtalk). K-Prolog 5.01 supports the ISO Prolog standard. No problems
211    expected. This config file have been written with the help of Nobukuni Kino.
212    Don't forget to use the cd/1 predicate to set the working directory before
213    loading the library or an example. Supports smart compilation of source files.
214
215
216LPA MacProlog32 1.25
217
218    lpamac.config
219
220    This is my old Prolog development environment. Two known problems: (1) an
221    LPA bug in operator handling that make calls like "\+ ::Pred" be
222    interpreted like "::(\+ Pred)" instead of "\+ (::Pred)". A workaround is
223    to replace all occurrences of "\+ ::Pred" by "\+ (::Pred)"; (2) If you call
224    the \+ operator in your code the writeq/1 built-in don't always output a
225    space after the operator resulting in calls like "\+(...)". Because \+ is
226    not defined as a predicate this will fail. Don't forget to use the dvol/1
227    predicate to set the working directory before loading an example.
228    Due to the size of the Logtalk pre-processor file, you must load it by
229    using the consult/1 predicate instead of using the File:Open menu option.
230    Be aware that this configuration file redefines some built-ins that
231    you may use in your own programs. You must be careful to not consult the
232    config file twice. Supports smart compilation of source files.
233
234
235LPA WinProlog32 4.0x
236
237    lpawin.config
238
239    Written with the help of the LPA support team. Of course, if you find any
240    bugs please direct your flames to me ;-). Be aware that this configuration
241    file redefines some built-ins that you may use in your programs. Don't
242    forget to use the chdir/1 predicate to set the working directory before
243    loading the library or an example. Be careful to not consult the config
244    file twice. Supports smart compilation of source files.
245
246
247MasterProlog 4.1
248
249    master.config
250
251    Written with the help of the MasterProlog support team (but if you find
252    any Logtalk problem please report it to me).
253    If in the MasterProlog version that you are using the implementation of
254    the close/1 predicate does not follow the ISO standard, you will have to
255    apply the following patch to the Logtalk pre-processor: replace every
256    call of close(...) with fclose(...).
257
258
259Open Prolog 1.1b5
260
261    open.config
262
263    Limited test done. Please report any problems that you may find.
264    Don't forget to use the set_folder/1 predicate to set the working
265    directory before loading the library or an example.
266
267
268PrologII+ 4.5 and later versions
269
270    prologII.config
271
272    Written and tested with the help of Claude Lai from PrologIA. You need
273    to apply the following patches to the Logtalk pre-processor/runtime:
274    Search and replace every instance of "quoted(true)" with "quoted(:true)";
275    "open(File, write, Stream)" with "open(File, :write, Stream)",
276    "catch(close(Stream), _, true)" with "catch(close(Stream), _, :true)",
277    "open(File, read, Stream)" with "open(File, :read, Stream, [eof_action(eof_code)])".
278    Remember that you need to use the set_import_dir/1 built-in predicate to
279    set the working directory before loading the library or an example.
280
281
282Qu-Prolog 6.5
283
284    qu.config
285
286    Qu-Prolog 6.5 does not support floats. In order to compile the Logtalk
287    library and the Logtalk examples you will need to replace all occurrences
288    of floats by either integers or (quoted) atoms. In Unix-like systems, you
289    may perform the changes by running the following commands:
290
291        % cd $LOGTALKHOME
292        % find . -name "*.lgt" -exec perl -pi -e "s/version is (\d)\.(\d)/version is '\1\.\2'/" {} \;
293
294    Not that the above patch will not enable some examples that use floats to
295    run.
296
297    In order to compile and load both the config file and the Logtalk compiler,
298    the following sequence of steps is advised. First make a copy of the config
299    file:
300
301        % cd $LOGTALKHOME/configs; cp qu.config qu.ql
302
303    Second, start Qu-Prolog using adequate switches. For example:
304
305        % qp -s 2048 -d 1024 -h 2000
306
307    Next, compile and load the config file using:
308
309        | ?- fcompile('qu.ql', [assemble_only(true)]), load(qu).
310
311    Finally, compile and load the Logtalk compiler:
312
313        | ?- chdir('../compiler/'), fcompile('logtalk.pl', [assemble_only(true), string_table(256)]), load(logtalk).
314
315    Don't forget to use the chdir/1 predicate to set the working directory
316    before loading the library or an example.
317
318    Written and tested with the help of Peter Robinson.
319
320
321Quintus Prolog 3.3~3.5
322
323    quintus.config
324
325    Written and tested with help of a friend of mine, Paulo Urbano, for a
326    previous version. Adopted (but not tested) for the current release by
327    using information available on-line in the internet. Don't forget to use
328    the unix(cd(Dir)) predicate to set the working directory before loading
329    the library or an example. Supports smart compilation of source files.
330
331
332SICStus Prolog 3.8~3.11.x
333
334    sicstus.config
335   
336    For versions 3.8.x~3.11.x. The config file sets the flag language to
337    iso, but that is only recommended and should not be needed to run Logtalk.
338    No problems expected although not fully tested. Don't forget to use the
339    SICStus working_directory/2 predicate to set the working directory before
340    loading the library or an example. Supports smart compilation of source
341    files.
342
343    If you want SICStus Prolog to automatically load Logtalk at startup, then
344    add the following lines to your ~/.sicstusrc or ~/.sicstus.ini initialization
345    file:
346   
347        :- compile('$LOGTALKHOME/configs/sicstus.config').
348        :- compile('$LOGTALKHOME/compiler/logtalk.pl').
349
350    Consult the SICStus Prolog documentation for further information on the
351    ~/.sicstusrc and ~/.sicstus.ini user initialization files.
352
353
354SWI Prolog 3.3.x and all later versions
355
356    swi.config
357
358    For version 3.3.x and all later versions (5.2.3 or later recommended)
359
360    No problems expected. Please report any problem found (with a solution
361    if possible). Don't forget to use the cd/1 predicate to set the working
362    directory before loading the library or an example. Supports smart
363    compilation of source files. To improve the integration between Logtalk
364    and SWI-Prolog edit the compiler/logtalk.pl file and add the line
365    ":- system_module." to the top of the file. You may also load the file
366    configs/swihook.pl in order to be able to load Logtalk entities using
367    SWI-Prolog load_files/2 and consult/1 predicates.
368
369    If you want SWI-Prolog to automatically load Logtalk at startup, then add
370    the following lines to your pl.ini (on Windows):
371
372        :- ['drive:\\path to logtalk installation\\configs\\swi.config'].
373        :- ['drive:\\path to logtalk installation\\compiler\\logtalk.pl'].
374
375     or to your .plrc (on MacOS X, Unix, and similar systems):
376   
377        :- ['$LOGTALKHOME/configs/swi.config'].
378        :- ['$LOGTALKHOME/compiler/logtalk.pl'].
379
380    See the SWI-Prolog documentation for further information on the .plrc and
381    pl.ini user initialization files.
382
383
384XSB Prolog 2.6
385
386    xsb.config
387
388    You need to rename both the config file and the Logtalk pre-processor to
389    end with a '.P' extension otherwise the (re)consult built-in predicate
390    will not find them!
391
392    You also need to apply the following patch to the Logtalk compiler. Open
393    the file compiler/logtalk.pl, find the clauses that read:
394   
395        '$lgt_current_object_'(user, ...).
396        '$lgt_current_object_'(debugger, ...).
397   
398        '$lgt_dbg_leasing_'(...).
399       
400    and replace it with the queries:
401   
402        :- assertz('$lgt_current_object_'(user, ...)).
403        :- assertz('$lgt_current_object_'(debugger, ...)).
404
405        :- assertz('$lgt_dbg_leasing_'(...)).
406   
407    You may get syntax errors while compiling the Logtalk pre-processor
408    or some of the examples due to a know bug in the XSB parsing of infix
409    operators: just add a space after the infix operator.
410
411    The write_canonical/2 predicates may output code that in some instances
412    can not be read back with read_term/3. If you receive a syntax error
413    while loading a Logtalk compiled file we will have to fix the problem by
414    editing the file (the Prolog output, not the Logtalk source). Don't
415    forget to use the cd/1 predicate to set the working directory before
416    loading the library or an example.
417
418
419YAP 4.3.x~4.5.x
420
421    yap.config
422
423    For all 4.3.x and later versions. Don't forget to use the cd/1 predicate
424    to set the working directory before loading the library or an example.
425    Supports smart compilation of source files.
Note: See TracBrowser for help on using the browser.