
To Do List
==========
* use mmap() instead of malloc() to allocate memory.
* encoded read/write with private var tables
* private properties per thread
* allow option to set timer interval
* need to implement getsockid(Port?, Id^)
* remove references to clock() and standardise on using usertime().

------------------------------------------------------------------------
12 Oct 93	dac
	Problem: redefining one predicate undefines all other predicates
	in the original file.
	Fix: loader.pl
	Should use abolish/1 instead of kill/1 when redefining.

29 Sep 93	dac
	Change: encode.c parlog/h_pipe.c
	Added short symbol as a new encoded term type.  Removed
	hash code from encoded symbols.

28 Sep 93	Release of version 0.96 (binary only)

28 Sep 93	dac
	Problem: Parlog cannot load large relations.  Error message
	says cannot extend shared memory.
	Fix: parlog/alloc.c
	Since memory was allocated in segments of 64K bytes, there was
	an upper limit of 16K instruction words for a relation on a Sparc
	(32K for other machines which do not need 4-byte alignment).

27 Sep 93	dac
	Problem: Parlog fails to compile relations with a large number
	(say 100) parallel clauses.
	Fix: system/comp/dtree1.par
	The compiler was trying to generate (unnecessarily) long labels.

21 Sep 93	dac
	Problem: loading Prolog TCP primitives as foreign code takes
	a long time.
	Fix: primdef.h escape.c tcp.pl
	Made Prolog TCP primitives builtin escapes.

	Problem: segmentation faults when doing a lot of property handling.
	Fix: interrupt.c event.c
	Interrupt handlers should not call malloc().

7 Sep 93	dac
	Problem: assert/retract behave weirdly when run in multiple
	threads concurrently.
	Fix: assert.pl
	A section of code for retract must be done atomically without
	switching threads.

	Problem: files which are not out of date are sometimes recompiled.
	Fix: misc.pl
	Use '>=' instead of '>' when comparing timestamps.

	Problem: compiling source files in other directories creates
	'.icp' files in the current directory.
	Fix: comp.pl
	Create compiled files in the same directory as source files.

20 Aug 93	dac
	Change: properties.c
	Made hash table 16 times bigger (size is now 4096 instead of 256).

	Change: primdef.h escape.c esc_code.pl escape.pl tcp.pl
	Made TCP primitives builtins instead of foreign code.

12 Aug 93	dac
	Change: fork.c fork.pl
	Added suspend/1 to suspend a specific thread and make timeslice/1
	available for general use.

30 Jul 93	dac
	Problem: Parlog operators declared with precedence 1 don't work.
	Also, if an operator is first declared locally and then
	in system, the system declaration always seems to take
	precedence.
	Fix: parlog/support.c
	The way undefined operators were recorded is indistinguishable
	from non-associate operators with precedence 1, since both
	left and right precedences are 0.  Undefined operators now
	have left and right precedences of -1.

30 Jun 93	dac
	Problem: Running out of heap space in certain circumstances when
	garbage collection should be able to reclaim it.
	Fix: cg.c fork.c icp.c compiler.pl
	The problem occurs in clauses which have a gc instruction but
	no succ or deallocate.  Added new instruction gc0 and modified
	other instructions (allocate, deallocate, gc_allocate, succ,
	jmp and execute) to allow pre-allocated heap space to be reclaimed.

28 Jun 93	dac
	Problem: tcp_recvfrom/6 sometimes reads a variable when a ground
	term was sent.
	Fix: tcp/tcp_prolog.c
	After garbage collection, three arguments in 'tcp_recvfrom%f' were
	swapped.

	Problem: In parlog, variables in background processes become bound
	to '$VAR'(N) where N is the print name of the variable.
	Fix: system/env/toplev.par
	When binding variables to their print names for displaying,
	do it to a copy of the binding list instead of the original.

24 May 93       dac
	Problem: the Parlog program
		mode bug(?,^).
		bug( R, F ) <- 
			F is 1+R.
	fails to compile.
	Fix: system/comp/codegen5.par
	A typo in the naming of two variables.

18 May 93	dac
	Problem: Parlog load_foreign with multiple libraries causes the
	library arguments to be concatenated without separating spaces.
	Fix: parlog/jam_foreign.c
	Added space character before '-l' library arguments.

5 May 93	dac
	Problem: In Parlog, write('$VAR'('A')) is not treated specially.
	Fix: system/env/write.par
	The goal should just write the unquoted atomic argument.

	Change: system/env/toplev.par
	Made display of variable bindings more user-friendly.

	Change: parlog/support.c system/env/syspred.par
	Added two new primitives - varsin/2 and varoccurs/2.
	varoccurs/2 returns a list of occurrences of all variables
	in a term, while varsin/2 returns the same list with duplicates
	removed.

	Problem: the Parlog tracer utility would not parse some clauses.
	Fix: utilities/tracer/t_abs.par
	A typo in fold_in_seq/7.

	Change: utilities/tracer/t_prims.par
	Added support for varoccurs/2 and varsin/2.

	Change: utilities/tracer/t_user.par
	Prompts for yes/no answers should display that it is expecting a
	'y' or 'n' answer.
	
4 May 93	dac
	Problem: In Parlog, sequential conjunctions in the guard
	involving var/1 or '<='/2 are compiled incorrectly as
	parallel conjunctions.
	Fix: system/comp/dtree1.par
	When analysing a conjunction of goals in a guard, the type
	of conjunction (sequential or parallel) should be taken into
	account.

	Problem: The Parlog program
		zero(0).	% for integers
		zero(0.0).	% for floating-point
	fails to compile.
	Fix: system/comp/dtree2.par
	Should use =:=/2 to compare numbers, not =@=/2.

	Problem: The Parlog program
		f(X,Y) <- [X|Y] = [1,2,3].
	fails to compile.
	Fix: system/comp/codegen5.par
	A typo in the code for compiling out unification.

30 Apr 93	dac
	Problem: bug report from vjb about insert_primitive() in foreign.c
	Fix: foreign.c
	Bug in binary search.

21 Apr 93	dac
	Problem: The following parlog calls deadlock.
		name(X,Y), X=abc.
		X =.. Y, X=f(1).
	Fix: system/env/prims.par
	Implementation of these primitives used parallel guards.  Transformed
	code into a single guard with and-parallel meta-calls.

20 Apr 93	dac
	Problem: Parlog tracer doesn't work for some primitives.
	Fix: utilities/tracer/{t_prims,t_utilities}.par
	Some primitives were put in the wrong suspension category.  Primitives
	which suspend on first argument were being meta-called without
	suspending.  The arguments to primitives need to be converted
	back from the tracer internal format (e.g. f(a) was represented
	as structure(f,1,[a]) ).

	Problem: print/1-2 does not work in parlog.
	Fix: system/env/write.par
	Check whether portray/2 is defined; if not use write/2.

	Change: parlog/jam_gc.c
	Incorporated bug fixes from Waterloo.

16 Apr 93	dac
	Problem: In Parlog, the relation
		test(X) <- nonvar(X), X > 0 : true.
		test(X) <- nonvar(X), X =< 0 : true;
		test(X) <- true.
	failed to compile.
	Fix: system/comp/{dtree2,codegen1}.par
	Added extra clause to identical_test/2 for nonvar/1 test.  Allow
	the condition of an if-then-else to be a builtin such as nonvar/1.

2 Apr 93	dac
	Problem: In Parlog, the conjunction
		nonvar(X) & 1 <= X
	in the guard is changed to
		1 <= X & nonvar(X)
	by the compiler.
	Fix: system/comp/dtree1.par
	Added a special case clause for nonvar/1.

24 Mar 93	dac
	Use index()/rindex() instead of strchr()/strrchr().

	Change: unix.c, unix.pl
	Added setenv/2. getenv/2 can now return numbers.

	Change: parlog/execute.c
	Removed zombie check.  It should never happen ...

23 Mar 93	dac
	Change: parlog/{filenames,jam_foreign}.c
	Switch to using index()/rindex() instead of strchr()/strrchr()
	since they are more portable.

	Change: parlog/{initial,support}.c
	Made setenv/2, getenv/2 and stat/7 I/O primitives so that
	they are executed within the master process only.

16 Mar 93	dac
	Problem: G/C faults.
	Fix: cg.c debug.c opcodes.h
	Added gc_allocate intruction to replace 'gc, allocate' combo.

	Problem: cannot build system with Parlog TCP built in.
	Fix: src/parlog/Makefile.m4
	Need to include extra object file if option enabled.

10 Mar 93	dac
	Change: parlog/utilties/pshell.par
	Fixed many bugs and made program more robust.

9 Mar 93	dac
	Problem: garbage collection errors caused by reversing order of
	gc and allocate instructions.
	Fix: icp.c
	Reverted compiler.pl and assert.pl to what it was before.  Fixed
	the bug in C by makiing allocate use previous value of HMAX.

8 Mar 93	dac
	Problem: tcp_recv/2 and tcp_recvfrom/4 busy waits.
	Fix: tcp/tcp_prolog.c
	Set flag so that select() is called if no other thread can run.

	Problem: running out of heap and stack space unexpectedly.
	Fix: assert.pl compiler.pl
	The gc instr'n (if any) must not come before the allocate instr'n.

3 Mar 93	dac
	Change: parlog/{support.c,initial.c,funcs.h}
	Added new primitive get_channel/2.

	Change: {syspred,loadenv,loadcomp,foreign,t_load,boot}.par
	Use the more efficient '$concat_atom'/2 to construct filenames.

	Problem: parlog tracer could not accept named predicates
	to be traced.
	Fix:utilities/tracer/t_user.par
	Undefined predicate l_to_i/2 changed to number_chars/2.

1 Mar 93	dac
	Change: parlog/{foreign,initial}.c system/env/unix.par
	Removed redundant base filename argument in '$load_foreign'/5.

	Problem: channel IDs could not be names.
	Fix: parlog/{support,load}.c
	Atoms are now allowed as channel names.

24 Feb 93       dac
	Problem: extra 'true' goals in the guard or body cause
	compilation problems.
	Fix: system/comp/kernel.par
	Remove the redundant calls to 'true' when parsing the clause.

	Problem: sites which use an automounter have installation
	problems because of difference in directory names.
	Fix: makefile, install/Makefile.install
	Prefer to use the user-defined pathname instead of the real
	path name wherever possible.

4 Feb 93	dac
	Problem: mbx_recv(Id, a(X)) fails to bind variable even when
	message is in correct format.
	Fix: mailbox.pl
	Should perform output unification.

2 Feb 93	dac
	Problem: could not read 1.2e+20 as a floating point number.
	Fix: token.c
	Now allow '+' after 'e' in exponents.

21 Jan 93	dac
	Problem: can inadvertently access element after end of tuple.
	e.g. arg(2,a(1),X), tag(X,N), writenl(N) succeeds with N=7 !
	Fix: term.c
	Should make sure argument number is strictly less than tuple arity.

	Problem: 0-arity predicates could not compile or trace properly.
	Fix: tracer.pl
	0-arity predicates are the same as atoms.

15 Jan 93	dac
	Problem: CFLAGS which use the -I option seem to behave strangely.
	Fix: makefile
	The M4 preprocessor treats 'include' as a builtin macro.  Need to
	quote the CFLAGS macro.

12 Jan 93	dac
	Problem: terms which have arity greater than 255 could not be
	communicated.
	Change: encode.c parlog/h_pipe.c
	In term encoding, changed length of tuple arity from one byte
	to two bytes.

	Problem: consulting a file which contains a static or system
	predicate does not give a helpful error message.
	Change: assert.pl
	Now we name the culprit predicate.

11 Jan 93	Release of version 0.94 (binary only)

11 Jan 93	dac
	Removed C source code from distribution so that we do not have
	to wait for permission to be granted for releasing confidential
	information.

8 Jan 93	dac
	Problem: make/1 is getting dates wrong.
	Fix: misc.pl
	Still using 'stat%f'/6 instead of new 'stat%f'/7.

	Change: misc.pl
	Added new predicate absolute_file_name/2.
	
7 Jan 93	Unofficial release of version 0.94

23 Dec 92	dac
	Change: unix.pl make.pl escape.pl esc_code.pl primitives.pl
	Added extra argument to stat/6 (now stat/7) that returns the
	absolute filename.

22 Dec 92	dac
	Problem: Name clashes of parlog auxiliary predicates introduced to
	handle sequential conjunctions nested within parallel conjunctions.
	Fix: parlog/system/comp/dtree1.par
	Generate unique names.

	Problem: is/2 expressions containing variables are erroneously
	optimised away in Parlog compiler.
	Fix: parlog/system/comp/kernel.par
	Do not optimise in these cases.

	Problem: '~', '.' and '..' are not recognised in ICP_PATH.
	Fix: filenames.c
	Added code to interpret them.

	Problem: cannot use other character encodings without recompiling.
	Fix: main.c token.c
	Added command line option to set character encoding.

21 Dec 92	dac
	Problem: '$compare'/3 builtin Parlog primitive not working.
	Fix: builtin.c
	Arguments incorrectly ordered.
	
17 Dec 92	dac
	Change: parlog/utilities/tracer
	Added parlog tracer.

15 Dec 92	dac
	Problem: can only take one command line argument.
	Fix: icp.sed

	Change: ascii.h ascii_latin1.h ascii_greek.h
	Now uses the standard ISO-Latin-1 character encoding.  Alternative
	encodings for Macintosh character set and Greek alphabet are
	available.

15 Dec 92	yac
	Problem: quotes in startup script get lost
	Fix: icp.sed script

	Added support for iso ascii tables
	Fix: token.c ascii.h

11 Dec 92	dac
	Problem: tracer is interpreting skipped goals, this wastes space
	and time.
	Fix: tracer.pl
	Execute goal directly if it is skipped in the tracer.

	Problem: core dump in garbage collector.
	Fix: gc.c
	NULL pointer problem in mark_early_resets().  Bug fixed but
	I don't know why an unbound variable was trailed in the first
	place.  May need in investigate further ...

10 Dec 92	dac
	Problem: core dump in parlog tcp_client/4 when connection is refused.
	Fix: parlog/system/hermes/tcp.par
	When error occurs, the primitive should fail after printing
	error message.

	Change: hermes_env.par hermes_boot.par
	Added ensure_loaded/1 to parlog.

8 Dec 92	dac
	Problem: core dump due to output buffer of stdout being full.
	Fix: cursor.c io.c
	There seems to be a bug in ftell() which reset stdout->_cnt.
	Solution is to flush the buffer before ftell() is called.

2 Dec 92	dac
	Problem: intermittent core-dumps during startup.
	Fix: main.c loader.c
	Timeslicing should be switched off while a file is being
	loaded.

2 Dec 92	yac
	Problem: copy_term/2 and varsin/2 crash if the second argument
	is not a variable.
	Fix: metalogical.c
	Unify second argument with result.

1 Dec 92	dac
	Problem: writeq/3 fails if term contains variables.
	Fix: write.pl
	Should ground the term before hollowing it.

	Problem: predicate names longer than 40 characters cause
	core dump.
	Fix: foreign.c
	Allow up to 256 chars for predicate names.

	Problem: parlog sometimes fails to startup.
	Fix: boot.pl fork.pl
	The prolog server port should be defined before starting parlog.

26 Nov 92	dac
	Problem: '<LOAD>' commands were not being done.
	Fix: primitives.c cg.c
	The predicate '<LOAD>'/0 is always made public when compiling.

	Change: parlog/support.c system/env/syspred.par
	Added defined/1 to determine whether predicates were defined or not.

	Change: support.c
	Added stat/6 to retrieve info about files.

25 Nov 92	dac
	Problem: cannot run parlog(Goal) without first switching console
	to parlog.
	Fix: fork.pl system/hermes/hermes_boot.par
	Can now pass commands to parlog through set_prop/3 in prolog.

	Change: primitives.pl swi.pl
	Added new primitives memberchk/2, concat_atom/2, nth0/3, nth1/3,
	ensure_loaded/1.

24 Nov 92	dac
	Change: system/env/rdtok.par
	Added more escape sequences to quoted atoms.  The term reader
	now understands octal chars, control chars, continuation lines
	and layout chars.

	Change: newForeign.pl
	The C header file required for compiling foreign routines are now
	in $ICP_INSTALLDIR/include.

	Problem: cannot open broadcast socket in Parlog.
	Fix: system/hermes/tcp.par
	Corrected typo.

	Problem: Parlog startup file cannot be skipped.
	Fix: main.c
	Added -nn command line option to suppress parlog startup file.
	Added '-zz' to allow commands to be passed to parlog from command
	line.
	Changed '-i' to '-ff' for consistency.

	Change: boot.pl primitives.pl system/hermes/hermes_boot.par
	Changed object name for command line properties from '$1$' to
	'$prolog$' and '$parlog$'.

	Problem: core dump if no argument to -h (e.g. 'icp -h')
	Fix: main.c
	Trap cases where '-h' and '-s' do not have values.

23 Nov 92	dac
	Problem: atoms in solutions were not being quoted.
	Fix: system/env/toplev.par
	Use writeq/2 for R.H.S. of equations.

	Change: system/env/prims.par
	Added atom_chars/2 and number_chars/2.

	Problem: quoted atoms with escape chars are not displayed correctly.
	Fix: parlog/jam_io.c
	Display escaped chars as '\X'.

19 Nov 92	dac,adb
	Problem: Compiler errors.
	Fix: system/comp/{kernel,codegen1,dtree2,compile}.par
	Parallel deep guards are now detected and displays a warning.
	User specified one-way unification in the guard now compile
	correctly.
	Primitive calls in the guard common to multiple clauses now
	compile correctly.

19 Nov 92	dac
	Problem: system hangs
	Fix: interrupt.c
	An event queue manipulation was unprotected from signals.

	Problem: some prompts in the tracer were not flushed out.
	Fix: tracer.pl
	Prompts flushed and help added.

17 Nov 92	yac
	Problem: last remaining hard-wired paths
	Fix: Makefile hermes_boot.par, newForeign.pl main.c
	ICP_INSTALLDIR can no longer be defaulted.  It must have a value
	for icp to run correctly.  This simplifies installation of the
	system.

16 Nov 92	yac
	Problem: univ broken
	Fix: primitives.pl
	Was broken in the case of
		a(b) =.. [a|B].

14 Nov 92	dac
	Problem: prolog server sometimes fails.
	Fix: fork.pl system/hermes/hermes_env.par
	The prolog server relies on messages coming in pairs (the goal and
	the return port).  The indeterminacy of scheduing may cause the
	interleaving of messages from two calls.  Solution is to make
	each goal plus return port pair a single message.

	Problem: floating-point numbers are converted to integers
	indiscriminately when reading encoded terms.
	Fix: parlog/h_pipe.c
	Conversion to integer only takes place if the number would not
	have fitted in a 27-bit prolog integer.

	Problem: Parlog channels do not work properly.
	Fix: parlog/support.c
	Writing to a channel should wake up processes suspended on it.

	Problem: the goals 'X =.. [a|Y], Y=[]' and 'name(X, [97|Y]), Y=[]'
	deadlock when they should succeed.
	Fix: system/env/prims.par
	'=..'/2 and name/2 should not call the underlying primitive with a
	non-ground list.

	Problem: Parlog reader does not understand escape characters.
	Change: rdtok.par and affected parlog source files.

	Problem: merge/3 and append/3 were not defined in the system.
	Fix: system/env/syspred.par system/comp/dtree2.par
	Defined a fair merge/3 that replaces the merge/3 in the compiler.
	Made the new merge/3 and append/3 public.

	Change: parlog/{support.c funcs.h initial.c}
	Added new primitives realtime/1, getenv/2, concat_atom/2.

	Problem: meta-calls sometimes cause segmentation faults.
	Fix: icp.c loader.c misc.pl
	meta-calling a term when a predicate name is expected now fails.

	Problem: read_pipe/2 insisted on a variable as the second argument.
	Change: io.c

7 Nov 92	dac
	Problem: programs sometimes hang unexpectedly.
	Fix: parlog/jam_io.c
	When I/O primitives return SUSPEND, the counter Nsuspv should be
	reset to 0, otherwise the next 'innocent' predicate might suspend. 

6 Nov 92	dac
	Problem: In parlog, reading the atom '123' get converted to an integer.
	Fix: rdtok.par
	Defined new primitive '$list_to_atom' which does not check for
	possible integer interpretations.

	Problem: When parlog load_foreign encounters an undefined primitive
	in an object file, it stops processing the rest of the primitives.
	Fix: parlog/jam_foreign.c
	Changed 'break' statement to 'continue' inside the for-loop.

5 Nov 92	yac
	Problem: -static is ld flag
	fix: Makefiles
	Changed makefiles to use CC, CFLAGS, LDFLAGS instead of just CC

*** version 0.92 released ***
