BUGS:
-----

	* format('~t~w~72|~n', [ 'hello\0\world' ]) simply writes
	  hello at the end of the line.

	* plcon.exe to delay Control-C in garbage collections.

CO-ROUTING AND CALL/1
=====================

	* Compile goal to local stack.
	    - How to activate?
	        - Manipulate PC?  Making it accesible may be expensive!
		- Signal and test on I_ENTER + foreign I_EXIT
		- Both require a queue of goals!
		- How to handle backtracking?
		    - Choice-point of new node should be last choice.

	* Variable can have value: pointer to term holding when(X, Goal).
	  This may also serve `attributed variables' in the future?

	    - Other temporary use of variables must remember value
	        - compiler
		- copy-term
		- unify-with-occurs-check
	    - including the use as `setarg' to restore on backtracking
	    
	
PROLOG FLAGS AND FOREIGN CODE
=============================

	* Cleanup GD->initialised status variables to use a bitmask

	* Change PL_set_feature into PL_set_prolog_flag(), calling
	  defFeature() if the system is not initialised and the lower
	  level of a split pl_set_feature() if the system is properly
	  initialised.


SCRIPT
======

On Solaris #!/usr/bin/pl -q -t main -f calls Prolog as
/usr/bin/pl "-q" <file>


=======
INPUT HANDLING:
---------------

Provide Quintus-like alternate input sources, so input from server-sockets
can be mixed with the toplevel without loosing the toplevel.  Other aim:
Allow Unix/X11 version of XPCE to run without X11 display but with active
sockets.  Problems: Windows compatibility, X11 handling. 


FOREIGN LINKING:
----------------

	* Add info for compilation and linking to pl -dump-runtime-variables:

		+ Compile-flag for position-independent
		+ Link flag for making shared object
		+ Use this in plld

ISO:
----

	* Complete replacement of warnings by exceptions.


FEATURES:
---------

	* Provide options when trying to load existing module from another
	  file.


MULTI-LINGUAL SUPPORT:
----------------------

Provide support for UTF-8 encoding:

	* Known encodings:
		ascii,
		iso_latin_1
		utf_8			# internal
		unicode			# Stream I/O
		ucs_2			# = unicode
		ucs_4

	* set_prolog_flag(encoding, utf_8).

	* File open:

		open(File, read, Stream, [encoding(utf_8)]).
		set_stream(Stream, encoding(utf_8)).

	* Breaking up atoms
		+ atom_codes/2
		+ atom_chars/2
		+ atom_length/2		# ignore 0x80-0xbf!
		+ char_code/2

	* get_code/1

	* put_code/1

	* Prolog source?
		+ Can be entered as UTF-8
		+ ISO?


FOREIGN CLAUSES:
----------------

Aim: store programs in external resources. Most promising resource is a
mapped file. External clauses are fully transparent to the user, but
might be read-only.

Requirements:

	* PIC (Position Independent Code)
	VM code only uses relative branches, so this is no problem.  8
	instructions refer to atoms, functors or predicates.  These need
	to be doubled, where PIC version uses the external symbol-table
	to relate the symbol to the internal one.

	* Finding clauses
	firstClause() and findClause() should get hookable at the predicate
	level.  This implies that the choice-point handle returned to the
	VM should get abstract.  Possibly this can be unified to the
	foreign/internal distinction. already present.

	* Hooks into assert/retract


REDESIGN:
---------

With the introduction of `external predicates' we would have three types
of predicates.  Time to rationalise a bit.  The following operations on
procedures can be identified:

	* Starting it
	* Retrying it
	* Modifying it

STARTING procedures can easily be rationalised by providing special start
instructions as normal Prolog VM code.  So, a foreign procedure becomes an
ordinary Prolog procedure whose single clause has a single instruction:

	I_FOREIGN <procedure-pointer>
or
	I_NDET_FOREIGN <procedure-pointer>

For RETRYING, there simply are too many options.  The following cases,
requiring totally different actions can be distinguished:

	* Retry to a jump-location in the current clause
	* Retry to the next clause (in same predicate)
	* Retry to the next clause/frame
	* Retry foreign predicate

Affected:

	* pl-wam.c
	* pl-comp.c (?)
	* pl-gc.c
	* pl-trace.c

STEPS:
------

Database design:

	* Symbol-table
	* Adapted compiler
	* Clause Index

MISC ISSUES:
------------

	* Is it safe to create a foreign frame and call-back while another
	  query is in progress?  I think it is, but this should be checked,
	  documented and handled by a test-procedure.

WINDOWS ISSUES:
---------------

	* After installing icons one needs the following to tell the
	  explorer:  Must be added to the regtry library!

	  SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);
