File: README.windows

package info (click to toggle)
swi-prolog 3.1.0-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,772 kB
  • ctags: 12,869
  • sloc: ansic: 43,657; perl: 12,577; lisp: 4,359; sh: 1,534; makefile: 798; awk: 14
file content (294 lines) | stat: -rw-r--r-- 10,643 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
			SWI-Prolog for Windows
			    Jan Wielemaker
			       06/06/94

			  (Updated: 16/11/94)
			    (Version 1.9.4)


This distribution contains SWI-Prolog for  Windows.    It  is  a port of
version 1.9.4 of SWI-Prolog.  SWI-Prolog  runs   in  a  simple MS-Window
providing traditional stream-based interaction.


Status:
=======

Third beta test  version.   First   beta-test  version  reported  mostly
installation problems due to filename   representation  problems.  Third
beta-test version should run on machines lacking floating point hardware
(`SX' machines).  It should fix a bug in the stack-expander incorporates
various improvements and fixes in  the   common  sources.  Please report
problems to jan@swi.psy.uva.nl.


Version 1.9.4 windows-specific changes
======================================

	* Compiled for floating-point emulations on machines that
	  lack floating point hardware.
	* Fixed memory management bug in stack-expander.
	* Added DDE interface.
	* Added editor declaration for Windows notepad.
	* Fixed problem in file-name mapping that caused existing
	  files to be reported as non-existing sometimes.

Version 1.9.0 windows-specific changes
======================================

	* Filename conversion and finding the home-directory is
	  fixed.
	* The drive's root directory is now handled properly.
	* Fatal errors will now often :-( show a Windows message-box
	  instead of just quiting Prolog.  This allows you to read
	  the message :-)
	* Control-C break is tested in the main virtual machine loop.
	  A few procent slower, but it does allow you to break a
	  looping program ...
	* Cut-and-paste is implemented in the console-window, allowing
	  for xterm-like cut-and-paste (left/right to start/extend the
	  selection and middle to paste it).
	* Improved error reporting.
	* Now Writes files in DOS text-format rather then using binary
	  mode.
	* Installation has changed a bit.  Read it!
	  ============


Copyright:
==========

SWI-Prolog may be  distributed  freely   for  non-commercial  use.   See
pl\licence for a more complete description of your rights.


Requirements:
=============

386/486/pentium based PC running MS-Windows 3.1.  SWI-Prolog is compiled
using the WATCOM 32-bit C/C++ compiler and   should run on machines with
and with or without floating point   coprocessor.   Minimum memory usage
will be about 1  MB.   You'll  probably  need   at  least  4  MB  to run
SWI-Prolog under Windows.  Please report your experiences.


Parts:
======

The system consists of four parts:

	bin/pl.exe	32-bits Windows Executable.

	bin/pl.qlf	Quick-Load-File containing procompiled Prolog
			code, defining various essential parts of the
			Prolog system.

			Should be installed in the same directory as
			pl.exe and have the same base-name.
	
			Other places where it will be looking for this
			file are: startup/startup.pc and startup/startup
			(both relative to the `home' directory).

	library\	The Prolog library file.  Holds the Prolog
			library and help system.

	boot\		Contains the Prolog source for building pl.qlf.
			You don't need this if you don't want to look
			at this or modify it.


Installation:
=============

Unpack the zip file from C:, creating a directory c:\pl.  If you want to
install in another directory, there are   various  possibilities to make
the system find its home directory.  It will be looking for these in the
following places (in this order:

	1) Trying the environment variable `SWI_HOME_DIR'
	2) Trying the environment variable `SWIPL'
	3) Trying the parent directory of the directory from
	   which the executable was loaded.  Thus, if pl.exe
	   is in bin/pl.exe from the home directory this should
	   work.
	4) Trying <drive>:\pl where drive is one of `cdefghijklmnopab'

3) is the new and  preferred  way   of  finding  the home directory.  It
implies that you just have to make  a new `program instance', specifying
an absolute path to the pl.exe executable.

Create a `New Program Object' using the Window Program Manager's `new...'
option.  The fields should be:

	Description:		SWI-Prolog
	Command Line:		c:\pl\bin\pl.exe
	Working Directory:	The place you work

Modify `Command Line' if you installed SWI-Prolog into another directory.


Configuration of the Console:
=============================

The stream-based console window is a  completely separate library, using
its own configuration info.  It will  look at two environment variables:
"CONSOLE" and the base-name of the running  program ("PL" if you use the
default configuration).  Options in "PL"   overrule  those in "CONSOLE".
Options in "CONSOLE" apply to any application compiled using the console
library.  The options variable should contain a string of the form

	<name>:<value>{,<name>:<value>}

Where <name> is one of:

	<name>	default		description
	sl	200		Number of lines you can scroll back.
				There is no limit, but the more you
				specify the more memory will be used.
				Memory is allocated when data becomes
				available.
	rows	24		Initial number of lines
	cols	80		Initial number of columns
	x	CW_USEDEFAULT	X-coordinate of the top-left corner.
	y	CW_USEDEFAULT	Y-coordinate of the top-left corner.
				
You will normally specify this in your autoexec.bat file.  Here is
what I use:

	set CONSOLE=sl:600,x:400,y:400

Editor interface
================

SWI-Prolog defines an interface to  an   external  text editor using the
predicates ed(+Predicate) and edit(+File).   Normally,   after  the user
quits the editor, the system will run  the predicate make/0 to recompile
all modified files.  This will not work  for Windows as the shell/1 call
returns immediately, without waiting  for   the  external application to
finish.

You can specify the editor in autoexec.bat   or ~/_plrc.  If you wish to
use the simple notepad editor delivered  with Windows, put the following
line in your ~/_plrc:

	?- setenv('EDITOR', notepad).


Windowing and Graphics
======================

SWI-Prolog itself has  no  graphical   capabilities.   Graphics  can  be
provided by the XPCE toolkit, for which   an  MS-Windows beta version is
available.  XPCE is *not* free software.  It is distributed for academic
users  at  a  price  of  dfl.   500,--  (at  the  time  of  writing,  $1
approximates dfl.  1.75).  This licence   includes classroom and student
usage.  For details, ftp swi.psy.uva.nl/pub/xpce/Windows/...  or contact
xpce-request@swi.psy.uva.nl if you are interrested.


Filenames:
==========

All filenames are internally handled in   a Unix compatible format: they
are lowercase, the directories are  separated   with  a '/' and absolute
files are of the form  /<drive>:/...    Filenames  will  be converted to
DOS/Windows format just before invoking the C-library functions.

Filename expansion will translate `~' to  the environment variable HOME.
Constructs  of  the  form  $VAR  in    filenames  are  expanded  to  the
corresponding environment variable.  DOS %VAR% is not recognised.

The user may specify filenames either using   DOS format or Unix format.
Unix format should be used in source-files that   need to be run both on
the Unix and DOS/Windows version.

The predicate prolog_to_os_filename(+PrologPath, +OsPath) may be used to
explicitely  convert  filenames  between   both  representations.   This
predicate exists in all versions of 1.9.4  and later.  On unix it simply
unifies the arguments.  
	
Features and bugs specific to this version:
===========================================

	* Dynamically expanding runtime stacks using a stack-shifter.
	  Expands the environment (local), heap (global) and trail-stacks
	  if necessary.

	* Garbage collection on global (heap) and trail-stacks.

	* Fixed C-stack of 128 KB (limits depth of unification and
	  various other recursive tasks; does not limit normal Prolog
          recursion).

	* GNU-Readline 1.2 based input editor that allows for GNU-EMACS
	  like editing of the command line.  This input editor runs on
	  top of a simple, still incomplete I/O window.	 Features:

	  	* Command history using ^P, ^N
		* Cursor movement using ^B, ^F, etc.
		* Many more; just try the GNU-Emacs bindings!
		* End-of-file is ^D.
		* Completion on files and atoms using TAB, viewing
		  alternatives using ESC-?

		* Window may be resized and scrolled.
		* Cut-and-paste is similar to X11's xterm:
		  left-button starts a selection, right-button extends
		  it and middle-button pastes.

	  Bugs:

		* Showing matching bracket does not work
		* Resizing the window while the line is wrapped gives
		  bad results.

	* save/[1,2] and save_program/[1,2] do not work.

	* profile/1 does not work.

	* load_foreign/[2,5] does not work.

	* The statistics/[0.2] reported CPU-time also includes idle time.

	* help/1 just dumps it output in the console window.  Should be
	  a separate window some day ...


Boot compilation:
=================

The file bin/pl.qlf is a `Prolog Quick  Load File' file created from the
Prolog sources in the boot subdirectory.  If you want to change anything
there, you can recreate the startup file using the command:

	pl.exe -b boot/init.pl -c boot/load.pl

For this command-line the working directory should be the home directory
of Prolog.  If not, you should absolute paths.


Sources:
========

The common source for all platforms is  available using anonymous ftp to
swi.psy.uva.nl,  directory  pub/SWI-Prolog.   The   Windows  version  is
compiled using the 32-bit WATCOM C/C++   compiler (version 9.5).  If you
decide to port it to another compiler  (for example GCC), please forward
me the changes.

SWI-Prolog is reported *not* to compile  using WATCOM version 10.0.  The
problem appears that there is no   specific area in virtual memory-space
where malloc() happens.  This implies there are  no (not enough) bits on
a pointer to add tags to it.

It uses two libraries, both of which may be found at ftp.swi.psy.uva.nl:
Library xos.lib redefines the WATCOM file  access library to handle both
Unix and DOS format files and make   the direcory operations work on the
root-direcories of a drive.  Library   readline.lib provides the console
window and readline command-editor.  Both libraries are assumed to be
installed next to the Prolog sources:

	..../xos/...		XOS library
	..../readline/...	Readline and console library
	..../pl/...		SWI-Prolog source