YAP change log

# Changes in YAP4.5

## Yap-4.5.3:

# Changes in YAP4.3

## Yap-4.3.23:

- UPDATE: new Logtalk version (2.15.2).
- NEW: `hide_predicate/1`. (request from Paulo Moura)
- NEW: support condor.
- FIXED: bug in waking up attached variables (summer@mail.sc.cninfo.net).
- FIXED: extra manual bugs (Maleeha Qazi).
- UPDATE: updated `configure.in` for smooth YAP compilation on MacOS X 10.2.
- FIXED: `rint` is not `truncate/1` (Paulo Moura).
- FIXED: recent change broke debugger help message (Nuno Fonseca).
- NEW: `call_with_args/n` simulates `call/n`.
- FIXED: have different types for `Atom`, `Term`, and `Functor` in `c_interface`.
- FIXED: make `call_with_args/*` check if first arg is atom.
- FIXED: make `cd/1` complain on bugs.
- FIXED: always do something on `gmp` allocation (request from Roberto Bagnara).
- FIXED: always allow abolish on static predicates.
- UPDATE: include new `apply_macros` code from Erick Alphonse, and acknowledge J. Schimpf.
- FIXED: `YapRunGoal` (Roberto Bagnara).
- NEW: `term_position` option for `read_term` (Nicos)
- UPDATE: fixed `shell/1` and `shell/2` in library(system). (Nicos)
- FIXED: `\newline` in strings (Roberto Bagnara).
- FIXED: avoid reincluding of `c_interface.h` (Roberto Bagnara).
- FIXED: make `c_interface.h` compilable in C++ (Roberto Bagnara).
- FIXED: garbage collector should recover dynamic clauses and logical semantics DB. Trust gc to recover active clauses
- FIXED: `read_vars` was called with unbound argument.
- FIXED: backtrackable C-predicates (thanks to Christophe Billard for sending the file).
- FIXED: new options for `file_property` (Nicos).
- FIXED: check unification result in `file_property` (Nicos).
- FIXED: `yap_flag(fileerrors)` (Nicos).
- FIXED: clauses with blobs cannot be simply abolished.
- FIXED: retract of undefined predicate makes it dynamic.

## Yap-4.3.22:

- FIXED: default syntax error mode should be error.
- NEW: atom garbage collector.
- FIXED: recover space for logical update semantics.
- FIXED: smash references to deleted entries with logical update semantics.
- FIXED: make instance of deleted fail for logical update semantics.
- FIXED: `garbage_collect` should call `do_gc` with `P`, not `CP`.
- FIXED: use `YAPSHAREDIR` as in manual (Ashwin Srinivasan).
- FIXED: warning message about `unify_extension`.

## Yap-4.3.21:

- FIXED: syntax errors dumped all numbers as if small integers.
- UPDATE: new Logtalk version (2.10.0).
- FIXED: debugger could enter infinite loop if spying `portray` (Steve Moyle).
- FIXED: `predicate_property(P,source)` (Ines Dutra).
- NEW: use system regex routines if available.
- FIXED: profiling.
- FIXED: Yap in CYGWIN, including DLLs.
- NEW: `variable_in_term/2` at `library(terms)`.
- FIXED: debugger would not step through `[-F]`.
- FIXED: `unix(argv(L))` was doing bad type checking.
- FIXED: `assert((a:- m:[f]))` would core dump.
- FIXED: gc in `dexecute` should not use current `Y`, instead if should look at parent's `Y` (Ines Dutra).
- FIXED: do not loop on unbound metacalls.
- FIXED: do not assert clauses if the predicate is active and you had to abolish first.
- FIXED: always allow asserting over static predicates.
- FIXED: disable cache when checking whether static was in use.
- FIXED: heap overflow while storing `db` term.
- FIXED: `trust_fail` should be preceeded by an `sla`.
- FIXED: make `sla` point to current pred, get rid of current pred in bitmap.
- FIXED: `MkVarTerm` in `c_interface.h` (Christophe Billard)
- FIXED: get rid of unnecessary `USE_OFFSETS`
- FIXED: stupid limit on Heap Size with `LowTags`. (David Page)
- FIXED: make `fileerrors` default for SICStus. (Nicos Angelopoulos)
- FIXED: `g(X) :- (Z is 2*X; a(Z))`: `Z` cannot be seen as a free var. (Nicos Angelopoulos).
- FIXED: `atom_concat` was not allocating heap correctly (Nicos Angelopoulos).
- NEW: `ord_intersection/4` (Nicos Angelopoulos).
- NEW: `file_search_path/2` (Nicos Angelopoulos).
- FIXED: fix `yap_flag(host_type)`.
- FIXED: make Yap compile under VC++ again.
- FIXED: don't try to handle `X/0` the ISO way.
- FIXED: make Yap runnable in WIN98.
- FIXED: access to non-existing dynamic array should not core-dump.
- FIXED: `abolish(_)` should give error in ISO mode.
- NEW: `yap_flag(argv,L)` (Nicos Angelopoulos).
- FIXED: make `user` the name of the first three streams.
- NEW: `reachable/3` in ugraphs (Nicos Angelopoulos).
- NEW: `-f` flag in boot (Nicos Angelopoulos).
- FIXED: manual html warnings (Nicos Angelopoulos).
- NEW: `yap_flag(informational_messages)` allows disabling informational messages (Nicos Angelopoulos).
- FIXED: `lcc` would choke when compiling Yap.
- FIXED: `simplesim` miscompilations.
- FIXED: more SICStus like top-level messaging (Nicos Angelopoulos).
- FIXED: missing WIN32 interface declaration (Christophe Billard).
- FIXED: `alarm` was not working in WIN32 (Tolga Konick).
- FIXED: `get0/2` and `get/2` should call `$get` directly.
- CHANGE: make full leash default.
- NEW: continue creeping after a goal. (Ines Dutra)
- FIXED: `creep` should not creep the whole debugger.
- FIXED: `break` should not start the whole system.
- FIXED: `abolish` could backtrack and give weird error (Nicos Angelopoulos).
- FIXED: make `consult`, `use_module`, and friends meta-predicates (Nicos Angelopoulos).
- FIXED: make `use_module` a directive.
- FIXED: `predicate_property/2` to handle modules correctly (Nicos Angelopoulos).
- FIXED: stack expansion in meta-execution.
- FIXED: `depth_limit` was not handled correct in meta-execution of conjunctions (Rui Camacho).
- NEW: new option for error handling in the debugger.
- UPDATE: new version of Logtalk.
- FIXED: heap library.
- NEW: `empty_heap/3`.
- FIXED: some system predicates are exported outside the prolog module.
- FIXED: calls to `open/3`, `current_stream/3`, `tab/{1,2}`, and `format/3` might interfere with trace.
- NEW: new `catch/3` and `throw/1` mechanism.
- FIXED: `p_socket` would crash if no streams were available (Ines Dutra).
- FIXED: CLPQR complaints on importing private predicates.

## Yap-4.3.20:

- FIXED: `'aaaa''xaaa'` was inserting `x` instead of `'` (Miguel Filgueiras).
- FIXED: fix CHR using merge from prolog instead of ordsets.
- FIXED: store infinite terms in DB properly (at last).
- FIXED: `execute_7` (Paulo Moura).
- FIXED: expand meta-call arguments even if they are built-ins (otherwise breaks `bb_*`).
- FIXED: always generate `FATAL_ERROR` on `SIGSEGV`.
- FIXED: another GC bug.
- FIXED: `phrase/2` and `phrase/3` are meta-predicates.
- FIXED: use `TR` instead of `H` for system.
- FIXED: `absolute_file_name/2` should be SICStus compatible (Nicos Angelopoulos).
- FIXED: put < debugger back to work (Ines Dutra).
- FIXED: make `rem` and `mod` ISO-compatible operators (Paulo Moura).
- FIXED: expand consult stack when there are too many predicates (David Page).
- FIXED: create DLs even when you don't need .so.
- FIXED: `abolish/1`.
- NEW: try to make module system really compatible.
- CLEANUP: don't use state of Pred.
- SPEEDUP: improve predicate access by linking predicates to functors.
- FIXED: `listing` broke when `current_predicate` became meta.
- FIXED: `consult` should not erase dynamic clauses (report from James Cussens).
- FIXED: check if we still can do garbage collection (`MBIT` and `RBIT` ok) (report from James Cussens).
- FIXED: always release stack after `InitBigNum` (report from Nicos Angelopoulos).
- FIXED: `random` would not load in windows (report from Henrik Boström).
- FIXED: don't send warnings about repeated predicates from different modules (report from Henrik Boström).
- NEW: `socket_buffering/4` (report from Henrik Boström).
- FIXED: `current_hostname/1` to `current_host/1` (report from Henrik Boström).
- FIXED: `socket_select/5` was completely broken (report from Henrik Boström).
- FIXED: avoid unnecessary choice-point in `yap_flag(user_*,Who)` (report from Nicos Angelopoulos).
- FIXED: `flush` should work with readline.
- FIXED: reset alarm at top-level.
- FIXED: do `signal(ALARM)` immediately.
- FIXED: don't use full optimization for `parser.c` in cygwin (report from Steve Moyle).
- NEW: Erik Alphonse's apply_macros library.
- FIXED: `ord_del_element/3` (Nicos Angelopoulos).
- FIXED: texinfo warnings (Stasinos).
- FIXED: under emacs/win32: prompt if $EMACS=t and buf NULL.
- FIXED: `^C` and `readline` (I hope).
- NEW: `trace` and `notrace`.
- FIXED: make `C-c t` actually trace.
- FIXED: put `[debug]` when in debug mode.
- FIXED: `make install_info` (actual fix is in Yap-4.3.19).

## Yap-4.3.19:

- FIXED: `fflush(NULL)` broken in some machines (Stasinos).
- FIXED: don't flush input streams (Stasinos).
- FIXED: new `statistics/0`.
- FIXED: use 15 bits of precision for floats, instead of the default 6..
- FIXED: check for last file modification in `use_module`.
- FIXED: `get_list` + `unify_local` was being compiled into `glval`, breaking `ENV` vars
- FIXED: `abort` was crashing in Alpha machines.
- FIXED: make `^c-a` work within gc.
- FIXED: handle correctly very deep nested terms while gc marking.
- FIXED: `ArityOfFunctor` was giving trouble with HP-UX cc (Stasinos Konstantinos).
- FIXED: `^c` works with Yap/MINGW32 (not in cygwin).
- FIXED: `^c` a should never core dump.
- FIXED: comparison of variables in sub-terms.
- FIXED: parse +inf, -inf, +nan, -nan as floats and write them accordingly.
- FIXED: comparison was breaking ISO.
- FIXED: use `$(CC)` never `gcc` directly.
- FIXED: support newer versions of readline by moving text to prompt.
- FIXED: upgrade to autoconf 2.5.
- FIXED: `catch` and `throw` should not leave unnecessary choice-points behind.
- FIXED: make catch cleanup queue of findall entries.
- FIXED: change `catch/3` and `throw/1` to use arrays.
- CLEANUP: split `TRAIL_REF`.
- FIXED: give correct type to `FreeBlocks`.
- FIXED: give correct type to alias list.
- FIXED: format `~NN` wasn't implemented (report from Markus Walther).
- DELETED: `shell/1` is now available through system library.
- FIXED: `!/0` in meta-call wasn't cutting.
- FIXED: `MkLongIntTerm` (from Stasinos Konstantinos).
- NEW: Logtalk OO library (from Paulo Moura).
- FIXED: CHR instalation.
- SPEEDUP: avoid unnecessary choice-points with CLPQR.
- NEW: inline `$mod_switch`, `$mod_switch` now uses backtrackable updates to modules.
- NEW: new method for marking timestamps that simplifies gc
- FIXED: bug while collecting multi-assignment variables
- FIXED: make yap modules more compatible with SICStus Prolog
- NEW: `portray_clause/2` (request from Nicos Angelopoulos)
- FIXED: document `absolute_file_name/2`
- FIXED: `absolute_file_name/2` should return absolute path, never user name! (bug report from Nicos Angelopoulos)
- FIXED: in `a:-b:call(X)` `X` belongs to the module `b` (bug report from Nicos Angelopoulos)
- FIXED: make `consult/1` and friends meta-predicates (bug report from Nicos Angelopoulos)
- FIXED: allow `[M:F]` and friends (bug report from Nicos Angelopoulos)
- FIXED: `ensure_loaded/1` can be used as a goal (bug report from Nicos Angelopoulos)
- FIXED: `abolish(VAR)` should abolish all predicates in current module (bug report from Nicos Angelopoulos).
- NEW: `library(system)`, only for Unix system right now.
- FIXED: allow `current_stream/3` to work with third argument known.
- FIXED: always leave enough space so that the hybrid garbage collection may work.
- FIXED: `add_to_path` should not leave choice-points.
- FIXED: don't initialise first occurrences in branches for func outputs.
- FIXED: handle void variables in body.
- NEW: externd C-interface with `StreamToFileNo`, `BufferToString`, and `BufferToAtomList`.
- NEW: support pipes with `open_pipe_stream/2`.
- FIXED: `functor/3` was generating too many deallocates at the end of a clause.
- FIXED: `call_residue/2` should not allow constraints to escape (use `copy_term_no_variables/2` to avoid this).
- SPEEDUP: optimise away `true/0` at the end of a clause.
- FIXED: do not short circuit trail entries.
- FIXED: Patches for memory allocation in Apple's OS/X.
- FIXED: checked whether `mmap` work right in `alloc.c`.
- FIXED: `ASP` from `Y` should have space for `env` size.
- NEW: new garbage collection algorithm.
- FIXED: don't allow importing from the module itself.
- FIXED: force line buffering for text stream.
- FIXED: force no buffering for `user_error`.
- FIXED: flush all streams before writing answer.
- FIXED: `YP_std*` are now streams, so that `yap_flag(user_*)` will change them too.
- FIXED: `nth/3` and `nth0/3` would leave one extra choice-point.
- FIXED: use `Contents` instead of `Uses` to determine live variables.
- FIXED: `cputime` was actually `walltime` in WIN32, ugh (report from Steve Moyle).
- FIXED: regexp library would not compile on recent versions of cygwin.
- FIXED: change first two arguments of `add_vertices/3` for SICStus compatibility (report from Nicos Angelopoulos).
- NEW: `sum_list/2` (request from Nicos Angelopoulos).
- FIXED: `ord_union/2` should not use use `merge/3` but instead `ord_union/3` (report from Nicos Angelopoulos).
- FIXED: `statistics/0` should report to `user_error` (report from Nicos Angelopoulos).
- FIXED: database could copy compiled floats, longs, and bigs to `Heap`, later crashing the garbage collector (report from Nicos Angelopoulos).
- NEW: `if/3` (request from Nicos Angelopoulos).
- SPEEDUP: inline `functor(S) -> Na,Ar`.
- SPEEDUP: inline `functor(Na,Ar) -> S`.
- FIXED: pillow installation path.
- FIXED: allow `yap_flag(user_{},V)`.
- FIXED: allow second argument unbound to `stream_property/2`.
- FIXED: alias change had broke `stream_property/2`.
- FIXED: alias change had broke `tell(user)` and `see(user)`.
- SPEEDUP: inline `arg/3`.
- FIXED: extra clause for `module/1`.
- NEW: `module/3`: SICStus options plus ciao options.
- FIXED: mode/1 should not be defined if we do not know what to do about it.
- NEW: `prolog_flag(version,X)`.
- FIXED: understand `0'\` escape sequences.
- NEW: `atom_concat/2` (idea from ciao).
- NEW: `list_concat/2` in `library(lists)` (idea from ciao).
- NEW: allow profile early reset in garbage collector.
- FIXED: `call_residue` should *unify* back constraints *after* restoring original suspension lists.
- FIXED: include Mandrake's `$(DESTDIR)` patches in Makefiles (by Lenny Cartier).
- FIXED: `close(user_error)` now closes stream currently associated with `user_error`.
- FIXED: `open(user_*,X,Y)` is not special any longer (SICStus compatibility).
- FIXED: `prolog_flag({max,min}_integer,X)` with GMP.
- FIXED: `prolog_flag(bounded,false)` with GMP.
- NEW: `prolog_flag(user_{input,output,error},X)` (request from Nicos Angelopoulos).
- FIXED: allow `close(file_alias)`.
- FIXED: `user_input`, `user_output`, and `user_error` are now aliases, like all the others.
- FIXED: restore `YapLibDir`.

## Yap-4.3.18:

- FIXED: alignment bug with `walltime` in sparc/solaris.
- FIXED: shunting in garbage collector.
- FIXED: restore arithmetic operators was broken.
- FIXED: restore arrays had never been implemented.

## Yap-4.3.17:

- FIXED: recording floating point numbers was broken (report from Ashwin Srinivasan).
- FIXED: restore bitmap `Pred` pointers from calls.
- FIXED: restore masks when adjusting the data base.
- FIXED: handle pointers to `Heap` and `Appls` to `Trail` correctly in `grow()`.
- FIXED: db terms with variables must be adjusted from correct offset (restore db).
- FIXED: atomic terms do not need masks (restore db).
- FIXED: complex terms in db may also have variables (restore db).
- FIXED: functors are never offsets (`sshift`).
- FIXED: check for `NULL` pointers when restoring FreeSpace mm.
- FIXED: make `gcc -mno-cygwin` default in `cygwin` environment.
- FIXED: kill `COMPRESS_DB_TERM` and use new rational tree scheme for DB instead.
- FIXED: use new `rational_tree` scheme in `arrays.c`, `cmmpreds.c`, and `corout.c`.
- FIXED: make `variant/2`, `term_variables/2`, and friends use new `rational_tree` scheme.
- FIXED: make `copy_term/2` use new `rational_tree` scheme.
- FIXED: don't test for age in `unify.c`.
- NEW: `cyclic_term/1` and `acyclic_term/1` in `terms` library.
- FIXED: use `RATIONAL_TREES` scheme to in `unify_with_occurs_check/2`.
- FIXED: `unify_with_occurs_check/2`.
- FIXED: make Yap run under SGI's `gcc -mabi=64` (gcc buggy? Needs testing).
- FIXED: make Yap run under SGI's `cc -64`.
- FIXED: fix alignment bug for 64bits in `AllocCMem`.
- FIXED: make Yap run under HP-UX's cc.
- FIXED: avoid labels before brackets with HP-UX cc.
- FIXED: get rid of huge masks in `dbase.c`.
- FIXED: make Yap run under SGI's cc.
- FIXED: avoid smart comparison in non-GNUCC compilers.
- FIXED: get rid of unused variables.
- FIXED: get rid of warnings with `enum` types.
- NEW: `number_atom/2`.
- FIXED: purge unnecessary `unify_lvar X0` with in `unify_n_voids_last`.
- FIXED: make it compile again under cygwin pure.
- FIXED: documentation for pillow.
- FIXED: use `Yap.spec` and `/usr/share/info` for recent rpms.
- FIXED: `configure` would check for `limits.h` twice.

## Yap-4.3.16:

- FIXED: handle trail segments when growing heap or local (tabulation).
- FIXED: fix backtracking with multi-assignment variables (bug report from Bart Demoen).
- FIXED: only insert into relocation chain if heap pointer.
- FIXED: handle overflows in substitution stack for tabulation.
- FIXED: documentation bug in CHR.
- FIXED: how to include `opt.mavar.h` (bug report from Luis Fernando).
- FIXED: trail overflow while doing gc (bug report from GJVanNoord).
- FIXED: System would lose `[]` because the atom looked like `NULL` (bug report from Rui Camacho).

## Yap-4.3.15:

- FIXED: garbage collector now marks all local variables so that we can do early reset on local variables.
- FIXED: support second quadrant machines in new scheme for large numbers.
- NEW: `ord_setproduct/3` in `library(ordsets)`.
- NEW: garbage collection for tabled computations.
- FIXED: `garbage_collect/0` shouldn't affect gc heuristics.
- NEW: OPTYap's latest tabulation code.
- FIXED: respect debugger printining options.
- FIXED: make sure variables are globalised before spying.
- FIXED: tabling in `autoconf`.
- SPEEDUP: improve variable unification where we know one of the variables is in the heap.
- FIXED: when sweeping garbage collector should check for variables posing as blobs (`USE_OFFSETS`).
- FIXED: reduce overheads in `functor/3`.
- FIXED: `variant` and `subsumes` must check functor and must check for extensions.
- FIXED: activate dorming optimised instructions and fix `glist_void_var`.
- FIXED: performance bug in new multiplication code (only for i386).
- FIXED: exit at `Error()` in `Error()`.
- FIXED: `grow()` had trouble with array ptrs in Trail.
- FIXED: include Stasinos patches for gmp, HP-UX and on documentation.
- FIXED: `recorda_stat_source` was passing 0 instead of tagged 0, also always `initialise ->code`!
- FIXED: accept multiple block declarations and process them as a conjunction.
- FIXED: `call_residue/2`.
- FIXED: block even when you have no - modes.
- FIXED: use `mkstemp()` instead of `tmpnam()` in `alloc.c`.
- FIXED: now I can wake up goals at disjunction, see `merge(A,[2],C), A = [1|B], (B = [2]; B = [3])`. I had to save temporary registers in a term. Check `push_live_regs` and `restore_regs()` for details.
- FIXED: `->p` field of either now points to true.
- FIXED: we must execute woken up goals before `;/2`: force stack checking at either.
- FIXED: present a single delayed goal per variable Done.
- FIXED: make `block/1` and `wait/1` directives.
- FIXED: make `block/1` use `when/2`.
- FIXED: compiling with glibc2.2, gcc-2.96 had small complaints.
- FIXED: `configure` should now work with gmp3.
- FIXED: overflow with extremely large terms in `copy_term`.
- FIXED: unification between `bignums` could fail.
- FIXED: improve `print_message/2`.
- FIXED: make `number_codes` understand `inf` and `nan`.
- FIXED: parse bigints in files.
- FIXED: one should set creep flags whenever adding goals.
- FIXED: debugging messages to `stderr`.
- NEW: simpler scheme for delays.
- FIXED: (`mark_trail`) do not mark second assignment to `mavar` in same choicepoint, helps 5% in mip, zilch in rkf.
- FIXED: make `goal_expansion` and `clause_expansion` logical and multifile.
- FIXED: `stackgrow()` with `biginits`.
- FIXED: compile bigints properly.
- FIXED: `ShowCode` should know about bigint instructions.
- FIXED: `arith.yap` should understand int != bigint.
- FIXED: `==/2` had bugs with attributed variables.
- FIXED: make debugger aware of woken goals.
- FIXED: bug in debugger with single update semantics dynamic clause.
- FIXED: definition of `MAX_WORKSPACE` had been deleted from `alloc.c`??
- FIXED: `frozen/2` and outputting suspended goals.
- FIXED: `BlobTermAdjust` was not always defined.
- FIXED: bad memory allocation in `parser.c` for _ resulted in cryptic error messages.
- FIXED: `//` error in CHR.
- FIXED: syntax error in initialization.
- FIXED: syntax error messages again point to the error.
- FIXED: add extra copyright info about LUM in manual.

## Yap-4.3.14:

- FIXED: gcc/solaris would not compile.
- FIXED: gc instrumentation was still giving noise.
- FIXED: bug without GMP.
- NEW: CHR manual.

## Yap-4.3.13:

- FIXED: `call_residue/2`.
- FIXED: `==` in `configure.in`.
- NEW: document attributed variables and CLP(Q,R).
- NEW: initial support for Apple OS/X, thanks to Paulo Moura for the patch.
- FIXED: hash trouble in IDB (thanks to Stasinos Konstantinos for the report)).
- SPEEDUP: `meta_predicate` database is now in dynamic procedures with logical updates.
- FIXED: module 0 should always be found in DB.
- FIXED: alloc space for `get_num` from trail.
- NEW: `discontiguous` is a valid operator.
- FIXED: `gcd/2` operator would break on negative numbers.
- NEW: support for GMP gnu library and longints.
- NEW: back to blobs in global.
- NEW: new implementation of arithmetic with a function per operator and no switches.
- FIXED: `##` breakage in OS/X cpp (`c_interface.h`. thks Paulo Moura).
- NEW: new arithmetic code.
- NEW: `CHR` (Thanks to Thom Fruewirth).
- NEW: itemization bugs in the manual (Stasinos Konstatinos).
- NEW: add `sequential/0` and `parallel/0` directives.
- FIXED: move `Codes` and `Lists` to `heap_regs` as these variables are in fact supposed to be shared between processes.
- FIXED: `SBA` should be able to store bindings in cell.
- FIXED: `PutAtt` and `GetAtt` might return `NULL` in `SBA`.
- FIXED: `unify` and friends would use uninstantiated variables.
- FIXED: only install `INTERFACE_HEADERS`.
- FIXED: `DO_MATRAIL` had reverse order under `SBA`.
- NEW: `prolog_load_context/2`.
- FIXED: allow reutilising aliases to files.
- FIXED: replace `term_variables` by `variables_in_term` in `pl/*.yap`.
- NEW: dynamic loading support for HP-UX (Stasinos Konstantinos).
- FIXED: help info in `configure.in` and forgotten `$` (Stasinos Konstantinos).

## Yap-4.3.12:

- NEW: configure compilation process from `configure`.
- FIXED: save/restore should set `CurrentModule`.
- FIXED: `InitYaamRegs` should not set `CurrentModule`.
- FIXED: load_dld would crash on NULL argv[0].
- FIXED: get rid of `install_library` and build `libYap.a` by default. Fix minor bugs in `yaplib`.
- FIXED: used `TRAIL` to remember structure-to-structure bindings in utilpreds.c and cmppreds.c (this avoids overflow noticed by GJVNoord).
- FIXED: split yapor_on so that ! is after `yapor_on`. This should prevent cutting to before the root of the tree.
- FIXED: bad handling of `libs` in `load_dl.c` (fix from Stasinos Konstantopoulos).
- FIXED: `free_answer_hash_chain` should untag parent pointer (Ricardo Rocha).
- FIXED: walltime would compile with cygwin (patch from gzk02612@nifty.com).
- FIXED: `try_logical_pred` was doing nasty things to choice-points in parallel mode.

## Yap-4.3.11:

- FIXED: read could fail and not restore the original input stream (noticed by GJ VanNoord).
- FIXED: crappy handling of multi-assignment variables while growing stacks (noticed by GJ VanNoord).
- FIXED: Bad save/restore machine registers in hppa.
- FIXED: Bad initialisation for '`_`' variables.
- FIXED: check null `ENV` in `do_toggle_static_predicates_in_use`, this seems to break HP-UX machines.
- FIXED: Bad default address on SGI machines.
- FIXED: Atom operations were being included too soon.
- FIXED: alignment issue in `LastWTimePtr` with SPARC.
- FIXED: Bind needs `HBREG` in `p_save_cp/exec.c`.
- FIXED: small ints in `term_hash`.
- FIXED: bug in installing CLPQR in `Makefile.in` (noticed by Luis Castro and GJ VanNoord).

## Yap-4.3.10:

- FIXED: install info by default in `/usr/share/info`.
- NEW: `MULTI_ASSIGNMENT_VARIABLES` should work with tabling and or-parallel execution.
- FIXED: small glitches with lcc.
- FIXED: `walltime` in parallel system.
- FIXED: zombies in ACOW.
- NEW: CLPR is now in the YAP distribution.
- NEW: sequential tabling can do stack shifting.
- NEW: sequential tabling uses standard memory management system.
- FIXED: make tracer work with tabling.
- FIXED: make `exec_goal` work with tabling.
- NEW: integrated latest OPTYap.
- NEW: CIAO's pillow library.
- FIXED: `verify_attributes` should follow SICStus order, or else CLPR will break in `critical,go2` :-(.
- FIXED: debugger was getting confused by modules that import predicates that are also defined in the module.
- FIXED: `=..` was messing with constraints, make it `SDerefHead`.
- NEW: print `$VAR("string")` as string.
- NEW: `write_term(X,[write_depth(X)])` is a legal option in SICStus.
- NEW: `write_term(X,[portrayed(X)])` is a legal option in SICStus.
- FIXED: debugger would get confused with undefined procedures.
- FIXED: DB compression bug for lists with rational trees on.
- FIXED: the blackboard routines are meta-predicates!
- FIXED: initialization should be performed on correct module.
- FIXED: make `initialization/1` an operator.
- NEW: `print_message` and `portray_message`.
- FIXED: do proper meta-predicate processing for `user:a :- meta(...)`.
- FIXED: do term expansion from top level and for `end_of_file` in consult.
- FIXED: don't do grammar expansion if term expansion succeeds.
- NEW: `yap_flag(toplevel_hook,_)`: this is a goal to be executed before prompting at the top-level.
- NEW: `variant/2`.
- FIXED: `term_hash` was not documented and in the wrong modules.
- NEW: first try at ugraphs module.
- NEW: SICStus compatible `module/1` and `yap_flag(typein_module,_)`.
- NEW: SICStus compatible `prolog_flag/2` and `prolog_flag/3`.
- FIXED: for SICStus compatibility primitives module is now prolog module.
- FIXED: corrent consulted file could get confused.
- FIXED: more fixes to top-level and call-residue with attributed variables.
- FIXED: call to `compare_terms` in `optimise_ce` relied on correct `H`. Could corrupt the compiler.
- FIXED: fix a few bugs on presenting floundered goals.
- FIXED: procedures imported into user should be imported by every module (do that by binding the importer to a variable).
- FIXED: do not try to debug over commit.
- FIXED: make top-level more SICStus like on how to present variable bindings.
- NEW: support columns in `format/2` and `format/3`.
- FIXED: `p_number` and friends should check for var before checking for number with corouting support.
- FIXED: init was setting WakeUpCode too late.
- FIXED: `save_program` was not restoring WakeUpCode.
- FIXED: `terms` library.
- NEW: SICStus compatible `prolog_flag/3`.
- FIXED: `\+ \+ nondet1, !, nondet2`.
- SPEEDUP: improved exec path.
- FIXED: hold locks for longer in `i_recorded`.
- CLEANUP: avoid references to corouting data structures in non-corouting code.
- NEW: new hashing function for IDB.
- FIXED: make `profile_data` understand modules.
- FIXED: first argument for profile_data was inconsistent.
- FIXED: broken trail resetting in `p_read` (thks G.J. VanNoord).
- CLEANUP: ANSI-C code cleanup (thks S. Konstantopoulos).
- CLEANUP: new `Atom.h.m4` file splits some stuff from `Yatom.h.m4`.
- CLEANUP: `linkblk` with one less argument and faster code (hopefully).
- FIXED: get rid of `AtomBase`.
- FIXED: keep ordering between `MkFunctor` and friends.
- FIXED: `PreviousHeap` is trash.
- FIXED: too many calls to `MkFunctor` in `GetPred`.

## Yap-4.3.9:

- FIXED: VC++ compilation was broken.
- FIXED: handle trail overflows in Windows.
- FIXED: general fixes as cygnus compilation was broken.
- FIXED: `yap.exp` got out of sync.
- FIXED: YAP would include too many headers such as `sys/time.h` and `sys/wait.h` breaking `-mno-cygwin`.
- FIXED: don't trust in `string.h` to initialise `NULL`, this seems to cause weird problems in `gcc -mno-cygwin`.
- FIXED: lack of heap in assembler shouldn't force compiler to restart.
- FIXED: C-stack would overflow with `PermVar`, make this function non-recursive.
- FIXED: hint `growheap` on the least heap it needs.
- FIXED: expand stack on overflow while parsing and overflow while creating the var table.
- FIXED: move `ParserStack` to `Trail` so that we can read in very large terms.
- FIXED: recursion of `c_optimise` would break for very large clauses, replaced it by iteration.
- CLEANUP: replace defined for `enum` in `Yatom.h.m4`.
- FIXED: bug in compiled terms with DBRefs (same field was used for `CodePtr` and `RefPtr`).
- FIXED: guarantee correct locking for `PreAllocCodeSpace()`.
- FIXED: another typo in `charsio`.
- FIXED: always allow asserts but careful, for now system will only recover some space at top-level.
- FIXED: In `yap.c` read `false` before someone hides it ;-).
- CLEANUP: get rid of `AtomLive` and of `AtomFalse`.
- FIXED: `erase/1` and `erased/1` now complain on bad arguments.
- FIXED: ANALYST would not compile.
- FIXED: go round bad `FILENAME_MAX` in HPUX (Stasinos Konstantopoulos).
- CLEANUP: use `sed` instead of symbolic links in `make depended` (Stasinos Konstantopoulos).
- FIXED: don't check if someone is looking at an environment while asserting.
- FIXED: gc always assumed an immediate `DBRef`.
- FIXED: `!` now cuts if `!=` instead of `<` (fixed cut_by).
- FIXED: __hpux to __hpux (Stasinos Konstantopoulos).
- FIXED: `makedepend` works again (Stasinos Konstantopoulos).
- FIXED: compile under hpux cc (Stasinos Konstantopoulos).
- NEW: locking for internal data base.
- FIXED: bad cast in `DBProp`.

## Yap-4.3.8:

- FIXED: previous change to `!` was wrong.
- FIXED: `YAP_ARRAYS` was still being used in `arrays.c` and `sbaamiops.h`.
- FIXED: small glitches in the manual.
- NEW: change work dir from Yap4 to Yap-4 (that's what everyone else does).
- NEW: `make install_info`.
- NEW: `yap.spec` and automatic generation of rpms.

## Yap4.3.7:

- FIXED: fix SBA bug in `or.cuts.h`.
- NEW: cut now looks for `==`, not `<`.
- NEW: `FunctorList` is now special.
- FIXED: Looking up "`.`" was broken.
- FIXED: `halt/1` would not send out the error code.
- NEW: allow executable Prolog files that call YAP (option `-L`).
- FIXED: bad overflow handling when compiling very large terms.
- FIXED: bugs in `charsio` at `open_chars_stream` and `number_to_chars`.
- FIXED: search for `library()` did not use env var `YAPLIBDIR`.
- NEW: parallel locking for MIPS machines.
- NEW: parallel locking for Alpha machines.
- FIXED: In OPTYAP UNLOCK should be machine dependent.
- FIXED: In linux, SBA would mess up with DB because MBIT was in `binding_array` addresses. Fix that and include a check when we allocate BA space.
- NEW: Protect DB updates and use with immediate update semantics.
- FIXED: get rid of the stuff on searching whether a predicate is in use for YAPOR, as it wouldn't work.
- FIXED: disallow asserting and abolishing static procedures in YAPOR.
- NEW: allow asserting database references as arguments for dynamic procedures.
- FIXED: consult and friends are now directives (this should avoid trouble with YAPOR).
- FIXED: change `configure.in` for Alpha/Linux.
- FIXED: change YAPOR not to try to do parallel execution of consult.
- FIXED: protect goals from `save_program/2` and also make sure they don't fail.
- FIXED: `[a]` in top level should be executed as a query.
- CLEANUP: get rid of `c_csult_stream`.
- FIXED: fix predicates that depended on `current_stream` returning user name for file.
- FIXED: `close/1` and `close/2` should only close atomic filenames in YAP mode, and should not depend on current_stream/3 returning the original name.
- FIXED: `current_stream` should return real name, not user name.
- CLEANUP: add consult/reconsult mode and file name to consult stack.
- FIXED: force indexing immediately after consult in YAPOR. This guarantees the system will not get into trouble later trying to generate indexing code for a predicate while someone is entering it.
- FIXED: bad init interface with YAPOR.
- NEW: support partial locking for predicates.
- FIXED: wrong include path in regex's `Makefile.in`.
- FIXED: `bb_new` was doing a broken property insert.
- FIXED: `save_program` now restores `SpyCode` so that we can restart saved states with spying data.
- FIXED: `YapInit` wasn't using stack size info from saved states.

## Yap4.3.6:

- FIXED: `YapRunGoal` wasn't saving/restoring registers properly, thus breaking the alpha platform.
- FIXED: could not find saved state.
- FIXED: bad substitution in saved states.
- NEW: `-l` option for YAP (consult a Prolog file).
- CLEANUP: `-l` option for YAPOR is now `-sl`.
- CLEANUP: small cleanups in yap.c.

## Yap4.3.5:

- NEW: add `yap_libdir`.
- NEW: add splay trees.
- NEW: add AVL trees.
- FIXED: asserting static predicates would not store the right source.
- FIXED: `assert` would loop with `assert((H:-b))`.
- FIXED: GC bug would not process direct pointers from local or trail to lists in code space.
- NEW: change directory structure.
- NEW: support locking for arrays.
- NEW: support locking for operators.
- NEW: support locking for values.
- FIXED: bad comparison with `BB` in `write_val` (SBA).
- NEW: support locking on alloc/free.
- NEW: support locking on blackboard.
- NEW: support locking for individual atoms (protects the property list).
- NEW: support locking the atom table.
- NEW: sequential code should now compile empty locks.
- FIXED: YAP again compiles and runs under AIX4.1.
- FIXED: support creating YAP DLL with VC++.
- FIXED: VC++ didn't understand `S_ISDIR()`.
- FIXED: small fixes to `yap.tex`.
- FIXED: unsigned/sign comparison warnings in VC++.

## Yap4.3.4:

- FIXED: IRIX6 is now set up load DLLs.
- FIXED: Yap4.3.3 had broken register handling in `c_interface.c`.
- FIXED: bug in `library/regex/Makefile.in`.
- FIXED: FreeBSD/ELF is now set up to load DLLs.
- FIXED: `in_limbo` should now be correct.
- FIXED: YAPOR would not compile because of macros.

## Yap4.3.3:

- FIXED: recover space after every parse/compile in new `yap.c`.
- FIXED: ignore `getcwd` under simplescalar.
- FIXED: only include standard files after YAP headers.
- FIXED: save and restore registers correctly under c-interface.
- NEW: add `YapWrite` to C-Interface.
- FIXED: mmapped arrays do not compile with `simplescalar`.
- FIXED: force saved states to look up YAP in YAPBINDIR.
- FIXED: quoted strings go back to ISO.
- FIXED: `-DYAP_ARRAYS` is no longer an option.
- FIXED: get rid of a few of ANSI-C old-style warnings from lcc.
- FIXED: `TrueFileName` had been broken.
- FIXED: Yap now configures and compiles with lcc 4.1/Linux.
- FIXED: port yap to compile under cygwin 1.1.0/mingw32 and to support winsock2. The new version also supports `CreateWaitableTimer`.
- FIXED: force yap to follow environment variable `YAPLIBDIR`.
- FIXED: force yap to look for dlls in library.
- FIXED: replace `strcat` and `strcpy` by `strncat` and `strncpy`.
- FIXED: search for saved states in library.
- FIXED: `^c-a` in MINGW32.
- CLEANUP: `^C` handling.
- NEW: creating and loading dll now works in YAP/WIN.
- NEW: compile core YAP as a dll under MINGW32.
- NEW: `yap.c` is now external to YAP.
- NEW: understand Unix paths under WIN32 and MINGW32.
- FIXED: make sure you only start compiling objects after having all headers ready.
- FIXED: Debugger (`$spycalls`) should module switches and consulted the table of imported predicates.
- FIXED: Compilation bug and warnings under vc++.
- FIXED: `YAP_ARRAYS` required `TERM_EXTENSIONS` to compile.
- FIXED: compile under cygwin's `gcc -mno-cygwin`, so that YAP won't need the cygwin dll (MINGW32).
- FIXED: `save.c` should reinitialise user streams.
- FIXED: `predentries` for functions may change address in `save.c`.
- FIXED: `SimpleSim` does not implement `getcwd`.
- FIXED: `tracer.c` had a C++ comment.
- FIXED: `ttyname` might return `NULL`, at least in `SimpleSim`.
- FIXED: `reconsult` was broken.
- FIXED: bracket messages for syntax errors.
- FIXED: scanner would break if `AllocScannerSpace` failed.
- FIXED: bad checking of `eof_action` in open.
- FIXED: mistake in compiling `/\`.
- FIXED: extra clauses in `environ`.
- FIXED: checking list of operators was wrong in `op/3`.
- FIXED: missing variable in error message.
- FIXED: reset `CreepFlag` in `Error`.
- FIXED: wrong error in `name(int(X),_)`.
- FIXED: fix writing "`\`" when writing strings with no character escapes.
- NEW: add `yap_flag(write_strings,X)` as in Ciao.
- NEW: add `StringToBuffer` routine to the c-interface.
- NEW: add routines for allocating and releasing database space to the c-interface.
- FIXED: change type for `unify` in `CInterface`.
- FIXED: `PlUnGetc` should return `int`, not `Int`.
- FIXED: get rid of C++ comment in `save.c`.

## Yap4.3.2:

- FIXED: Yap can now use `shm` for memory allocation.
- NEW: Yap can use `malloc` if `mmap`, `shm`, and `sbrk` failed.
- FIXED: `sbrk` allocation should be working again.
- CLEANUP: get rid of unused functions in old `alloc.c`.
- CLEANUP: in `Yap.h.m4` make clear when you are in second quadrant.
- CLEANUP: keep table with all c-predicates. `restore` now does not need to reinitialise functions.
- FIXED: in `alloc.c`, handle cases where `/dev/zero` fails properly.
- CLEANUP: move atoms and functors into `heap_codes`.
- CLEANUP: move module info to `heap_codes`.
- FIXED: `save.c` would not restore properly `bfunc` instructions. Had to add a p field for these instructions.
- FIXED: `save.c` was not always restoring `pp->OpcodeOfPred`.
- FIXED: reset opcode-op hash-table in new calls to `InitReverseLookupOpcode`.
- FIXED: check if emulator shifted when recovering saved states.
- NEW: `charsio`, SICStus compatible reading to and writing from strings.
- FIXED: uncaught instantiation errors in eval routines.
- NEW: `yap_flag(character_escapes,{on,off})`.
- CLEANUP: get rid of `config.c`.

## Yap4.3.1:

- FIXED: `$call` and `$spied_call` used with one less argument by debugger.
- FIXED: bug in `repeat` from top level.
- FIXED: `MAX_DEPTH` was set too high.
- FIXED: use actual definition of `repeat`.
- FIXED: use `<` to compare cps for `!`, not `==` because of `(! ->)`.
- FIXED: `$set_depth_limit` should work with Integer, not Int.
- FIXED: Allow Linux to compile without `getrusage` but using times (problem with glibc/kernel).

Yap4.3.0 has been released.

# Changes in YAP4.2

## Yap4.2.1:

- FIXED: up release number.
- FIXED: swap order of first authors in the manual.
- NEW: more patches for OPTYap.
- FIXED: not all Linuxen that have `fpu_control.h` understand `_FPU_SETCW`.

## Yap4.2.0pl18:

- FIXED: `DebugPutc`.
- FIXED: SBA must initialise or set public permanent variables in the SBA.
- FIXED: get rid of a Prolog definition for `number_codes`.
- FIXED: `YOUNGER` out of OPTYap and renamed `YOUNGER_CP`.
- FIXED: don't use offsets to local in SBA.
- FIXED: make `DelayedB` and `TopB` actual choicepointers to support SBA.
- FIXED: memory allocation for FreeBSD.
- RW Locks are now in YAP (unused yet).
- FIXED: dynamic arrays were getting too complex, allow the heap to point to the global stack and change garbage collector to handle it. YAP_ARRAYS is now compatible with everything ;-) and can stop being an option.
- FIXED: cut used `<` instead of `!=`.
- NEW: new YapOr code from Ricardo.
- FIXED: a few complaints with Solaris.
- NEW: generate exceptions in ISO mode for HP-UX.
- FIXED: `use_module` relies on `ensure_loaded`, which is now a directive.
- FIXED: 64/32 bit errors in Alpha.
- FIXED: `SEG_SIZE` is pre-defined in HP platform.
- FIXED: should call `Error` only after leaving interrupt handler, otherwise `sigsetjmp` will overwrite registers.
- FIXED: fill `CharConversionTable` with null chars.
- FIXED: warning in PowerPCs.

## Yap4.2.0pl17:

- FIXED: more improvements to `Eval`.
- NEW: `predicate_property(X,public)`.
- NEW: `public/1` directive, handling of source was cleaned up (it used to be broken if one would switch between source and no-source).
- NEW: special meta-call handling for ISO mode. Reduce amount of testing for other cases.
- CLEANUP: complete cleanup of `eval`. No more duplicate code, no more `reg` and `fli`.
- SPEEDUP: move `get_spy_creep` to `yap_flags`. This speeds up execute a bit.
- NEW: `strict_iso` mode.
- CLEANUP: `InitEval`.
- FIXED: arithmetic should be consistent even after an error.
- NEW: implement ISO exception handling for operations between floating-point numbers in Linux.
- NEW: handle floating point exceptions.
- CLEANUP: get rid of `EQUAL_FLOATS` and `EQUAL_LONG_INTS` as they weren't used any longer (and they were wrong anyway).
- NEW: add `e`, I've always liked this constant better than `pi`.
- FIXED: get a better `pi`.
- FIXED: fix `round` and friends for ISO mode.
- NEW: add `xor` (#) and `sign`.
- FIXED: get rid of finite, change integer the limits in YAP.
- FIXED: define `atanh` and friends for VC++ environments.
- FIXED: Get `PlGetChar()` back in, as users may want a simple interface to the current input for their own dubious purposes.
- NEW: `yap_flag(discontiguous_warnings, single_var_warnings, redefine_warnings)` as in SICStus. This should eventually replace style_check and no_style_check.
- FIXED: do not mark or sweep environments twice. This fixes Bart's YAP GC performance bug (as mentioned in comp.lang.prolog!).
- NEW: do variable shunting, not that it helps very much.
- FIXED: save should only save as many registers as it needs, and the ones it does should be adjusted when restoring.
- NEW: `stream_select/3`.
- NEW: `save/2`.
- NEW: `char_conversion/2` and `current_char_conversion`. Add ISOGetc for this, change scanner for having two getcs (one within strings, the other elsewhere).
- FIXED: was recording source for optimised clauses, not just source for module preprocessed clause.
- CLEANUP: add specialised versions to `PlGetc()`: Sockets, EOF, Readline, and Console.
- CLEANUP: got rid of `PlGetChar()`.
- CLEANUP: replaced `PlPutc()` by specialised versions for each type of stream: File, Console, Socket, Socket+Console, and Null.
- CLEANUP: got rid of `PlPutChar()`.
- FIXED: ISO compatible mode for `floor` and friends.
- FIXED: YAP would crash with `INTEGER mod 0`.
- FIXED: miscellaneous error handling in `eval`.
- FIXED: `number_chars` and friends should be compatible with scanner.
- FIXED: `stream_property` should not work with aliases.
- NEW: `char_code/2`.
- FIXED: ISO mode activates `fileerrors`.
- FIXED: avoid using `atom_chars` within the system.
- FIXED: `number_chars(X,I)` and `number_codes/2` with bad I should give error in ISO mode.
- FIXED: make ISO `abolish/1` succeed for undefined procedures.
- FIXED: `number_chars` and `atom_chars` should be ISO compatible in ISO mode.
- FIXED: errors in `call` should throw ISO errors.
- FIXED: `functor/3` should now have standard ISO behaviour on errors.
- FIXED: `assert(X)` would loop.
- FIXED: `char_conversion/2` is now also a directive.
- FIXED: `ensure_loaded/1` should be directive and not a built-in.
- FIXED: `current_predicate/1` should not show system predicates and should be module aware.
- FIXED: `utilpred.s` now compiles with `-DEUROTRA`.
- FIXED: `abolish/1` had several nasty bugs, especially in ISO mode.
- CLEANUP: got rid of nasty `config.cache` in main directory.
- FIXED: `op/3` and `set_prolog_flag/2` are directives.

## Yap4.2.0pl16:

- FIXED: `retractall` was broken.

## Yap4.2.0pl15:

- FIXED: in `catch/3` set module to original module before handling a ball.
- SPEEDUP: improve testing with DEPTH_LIMIT.
- FIXED: `DEPTH_LIMIT` should only stop code running under `depth_bound_call/2`.
- FIXED: bug in parse_args (fix from Stasinos Konstantopoulos <konstant@let.rug.nl>).
- FIXED: `copy_term/2` should now be able to copy constraints.
- FIXED: faster version of `copy_term/2` should now handle rational trees.
- NEW: generate ps version of manual with make ps.
- FIXED: disable save term optimisation for extensions, as we may not have an S ready.
- CLEANUP: always use '`$execute`' instead of call internally.
- CLEANUP: get rid of '`$user_call`' as it should the same as '`$execute`'.
- NEW: separate between the standard catch, that uses the full meta-call, and a system catch, that uses `$execute0` and `$mod_switch` and that should be only used deep within the bowels of the system.
- FIXED: expanded head variables of meta_predicates should not be expanded by inner meta-calls.
- FIXED: `HAVE_STAT` was not being generated correctly by `autoconf`.
- NEW: `timeout:time_out`.
- FIXED: make sure catch handlers are processed from within user.
- FIXED: processing of style_check by `yap_flag(language,_)`.
- FIXED: `discontiguous` should now be module aware.
- FIXED: preprocess calls for meta-predicates from top-level.
- FIXED: simplify code that handles the fact that modules from primitives can be called from anywhere.
- FIXED: `$module_expansion` could be called with wrong number of arguments.
- FIXED: separate '$execute', the low-level mechanism for meta-call, from '$user_call', that must study meta-predicates.
- FIXED: `README.VC`.

## Yap4.2.0pl14:

- FIXED: allow big flags.
- FIXED: typos in `yap.tex`.
- NEW: `yap_flag(host_type,X)`, where `X` comes from `configure`.
- NEW: more cleanups for autoconf.
- FIXED: more cleanups for `autoconf`.
- NEW: use `-DBP_FREE` by default for X86 machines.
- FIXED: make `predicate_property` more SICStus Prolog compatible.
- NEW: language mode now changes action over dynamic and over directives.
- NEW: initial DLL support for WIN32.
- FIXED: optimise arithmetic for asserted clauses.
- FIXED: calling garbage collector from within a C-backtrackable built-in should also have the extra arguments to the choice-point ready.
- NEW: YAP should now be able to load DLLs in WIN32.
- FIXED: YAP will now stop creeping after an abort.
- FIXED: meta-call within the debugger was externally visible.
- FIXED: small ANSI-C compatibility thingies.
- FIXED: `writeq('aaa===\\''====')` now outputs properly.
- NEW: `yap_flags(update_semantics,logical_assert)` if you only want to use logical update semantics for asserted code.
- NEW: `yap_flags(language,{cprolog,sicstus,iso})`.
- FIXED: do not test for worken goals before !, it slows down execution too much.
- NEW: improve the performance of `==/2`.
- FIXED: compile without COROUTINING.
- FIXED: manual would not compile.

## Yap4.2.0pl13:

- FIXED: `term_expansion` should be called in user module.
- FIXED: include new operation `sderef_op` when we want to know what a constrained variable is bound to.
- FIXED: `try_logical_pred` depended on `B`, but `B` might have been cut. Use trail for the moment.
- FIXED: call of `project_attributes`.
- NEW: blackboard routines `bb_get`, `bb_put`, `bb_delete`, `bb_update`, and `yap_flag(n_of_integer_keys_in_bb,INT)`. Includes a new file, bb.c.
- NEW: `yap_flag(n_of_integer_keys_in_db,INT)`: dynamically set the number of entries for the hash table used in looking up integer keys for the data-base.

## Yap4.2.0pl12:

- NEW: `README.VC` for VisualC++ users.
- FIXED: several small changes for VisualC++.
- FIXED: `_WIN32` requires `LOWTAGS` (`0x3000000` kind of address) for garbage collection to work.
- FIXED: `UnifyBound` was not handling extensions right.
- FIXED: had wrong definition for non-gcc `EXTRA_CBACK_ARG`.
- FIXED: make Yap compile under VisualC++ 6.0 again.
- FIXED: `exit_yap` would not exit.

## Yap4.2.0pl11:

- FIXED: `multifile` was not complaining on missing declaration.
- FIXED: multifile declarations were not module aware.
- CLEANUP: `assert/1` and `dynamic/1`.
- FIXED: for the nth time tried to make modules SICStus compatible :-(.
- NEW: integrated latest version of YAPOR (SBA and ACOW still do not work).

## Yap4.2.0pl10:

- FIXED: could have a bad cut in `call(X->Y)`.
- FIXED: add `ord_intersect/3` again (same as `ord_intersection/3`).
- FIXED: `save_program/2` would not set prompt correctly.
- FIXED: bug in `stack_shifter` after `gc` (was shifting global pointers).
- FIXED: `save/1` was broken with coroutining.
- FIXED: `use_module/2` should handle lists of files.
- FIXED: `COROUTINING` depended on `DEBUG` code.

## Yap4.2.0pl9:

- FIXED: `list_to_assoc/2`.
- FIXED: ANALYST should compile again.
- FIXED: `ensure_loaded` and `use_module` are not directives!
- FIXED: bug in cleaning up for logical update semantics.
- FIXED: cuts will now call suspended goals.
- FIXED: debugger should now step through meta-predicates correctly.
- FIXED: `trust_logical_pred` did not release trail entry correctly.
- FIXED: `recordedp` might be create a new key in a different mode from the one used to create the dynamic procedure.
- FIXED: don't go through `$undefp` for dynamic procedures.
- FIXED: bugs in asserting dynamic procedures from compiled clauses.
- FIXED: buglets with `multifile/1`.
- FIXED: do not open directories except as binary files.
- NEW: library `random`.
- NEW: assoc now has `ord_list_to_assoc/2` and `get_assoc/5`.
- NEW: compatibility module terms for `term_utils`.
- NEW: `ordsets` now has `ord_union/4` and `ord_del_element/3`.
- NEW: add `public/1` directive but currently this does nothing.
- FIXED: be more precise about which files you have consulted.
- FIXED: `use_module/2` should not handle lists of files.
- FIXED: compare would stop whenever it would find two numbers, even if they were equal.
- NEW: attributed variables.
- FIXED: coroutining would break `\=/2`.
- NEW: `ord_add_element/1` in `ordsets`.
- NEW: `empty_assoc/1` in `assoc_lists`.
- CLEANUP: compile under lcc4.1/Linux.
- FIXED: storing compressed rational trees on DB was buggy.
- FIXED: `$unknown(_:_)` should not give an error.
- FIXED: `ord_intersect/3` now is `ord_intersection/3`.
- FIXED: recursive `do_goal` would corrupt coroutining information.
- FIXED: handle possible overflows in quoted strings.
- CLEANUP: move `.pl` library files to `.yap`.
- CLEANUP: get rid of unused `SusRecTop` and `SusRecBase`.
- CLEANUP: move `HeapUsed`, `HeapMax`, and `HeapTop` to `Heap`.
- FIXED: add `MMAP_ADDR` for WIN32.

## Yap4.2.0pl8:

- NEW: `user:goal_expansion/3`.
- SPEEDUP: use separate table for integer keys to data base. Table size can be configured with `-DMAX_DB_INT_KEYS=`.
- SPEEDUP: increase the size of `HashTable`, which was ridiculously small.
- CLEANUP: allocate `heap_regs` as heap start.
- SPEEDUP: avoid calculation for compile-time keys.
- NEW: `get_float`.
- NEW: change the way functors of processed.
- CLEANUP: got rid of disgusting GeneralRef type, it has been replaced by Integer.
- FIXED: `unknown_error` should not complain if `print` is called with undefined portray.
- FIXED: delay cuts that go through embeddeded c-calls. This requires two extra registers, `DelayedB` and `TopB`.
- CLEANUP: `LockPred` wasn't being used any longer.
- FIXED: fact for `true` was not being asserted.
- NEW: now long ints and floats are tagged.
- FIXED: `array/2` was a safe predicate that could call `gc()`.
- FIXED: `growstack` in `cclause` should also call `gc()`.

## Yap4.2.0pl7:

- FIXED: 8 bit characters would be mangled by char->Int conversion in `StringToList`.
- NEW: Garbage collection should now work for a total space of 1GB on second quadrant (use `low_tags`).
- FIXED: `ExtendWorkSpace` would not always guarantee aligned size.
- NEW: `call_with_args/n`, meta-call with variable arity (up to 10).
- FIXED: `array/2` overflow had not been fixed properly.
- FIXED: `sort` and friends would not handle overflow properly.
- FIXED: improve manual include small bugs, compatibility stuff.
- SPEEDUP: replace `opcode(_index_pred)` with `INDEX_OPCODE`.
- SPEEDUP: replace `opcode(_undef_p)` with `UNDEF_OPCODE`.
- FIXED: only optimise common_expressions up to level 5.

## Yap4.2.0pl6:

- FIXED: coroutining had been broken when initialisation was reordered.
- ISO: `predicate_property` of static predicates now returns `static`, instead of `compiled`.
- FIXED: if `format/2` ~s would complain for empty strings.
- FIXED: bug with too large arrays.
- NEW: `term_hash/2` and `term_hash/4`.
- FIXED: allow modules in bodies of DCGs.
- FIXED: get rid of modules in head before they hit DCGs.
- FIXED: `current_predicate` with modules.
- FIXED: `$undefined/1` should never collapse.
- FIXED: `listing` would collapse because of `:/2`. `:/2` is not an undefined procedure now.
- FIXED: in saved states replace `$*` by "`$@`".
- NEW: `user:unknown_predicate_handler/3` from SICStus.
- FIXED: declare `findall/4` a meta_predicate.
- FIXED: switch third and fourth argument to `findall/4` to obtain SICStus compatibility.
- FIXED: `unknown/2` should know about modules.
- FIXED: speedup handling of unknown predicates in meta-calls.
- FIXED: speedup `depth_bound_call(A,D)` by using `$execute`.
- FIXED: add chapter on modules to manual.
- FIXED: meta_predicates from same module were not being expanded.
- FIXED: modules use current module for meta predicate.
- REVERSE: default meta_predicates back to user.

## Yap4.2.0pl5:

- FIXED: `meta_predicate` should be a directive, not a standard predicate.
- FIXED: all default meta_predicates should belong to user, not primitives.
- FIXED: give errors when not finding libraries.
- FIXED: `load_module/1` and `load_module/2` are now directives.
- FIXED: `load_module/2` would not accept libraries and had bad error handling.
- FIXED: `catch/3` did not have a meta_predicate declaration.
- FIXED: meta predicates were not being expanded correctly.
- FIXED: saved state script was not passing arguments to Yap.
- FIXED: go around gcc bug in `current_op` for hpux machines.
- FIXED: top level abort would crash in hp machines (`TR` was overwritten).
- FIXED: error messages for `op/3`.
- FIXED: `ord_member/2` in `ordsets`.

## Yap4.2.0pl4:

- NEW: the evil `recordaifnot/3` and `recordzifnot/3` are now in the manual.
- FIXED: include `ord_union/2` and `ord_member/2` in `ordsets`.
- FIXED: complain about `_:G`.
- FIXED: allow modules in heads for `assert` and friends.
- FIXED: allow modules in multifile and dynamic declarations.
- FIXED: send error messages in `modules.yap` to `user_error`.
- FIXED: get rid of error message in `eraseall`.
- NEW: `term_variables/2`.
- FIXED: directives had broken `ensure_loaded/1` for `use_module/1`.
- NEW: small performance improvements in unification routines (`UnifyGlobalCells`).

## Yap4.2.0pl3:

- FIXED: small performance improvements in unification routines.
- FIXED: logical_update semantics were broken in pl2.
- FIXED: `findall` and friends were broken in pl2.
- FIXED: `bind_global` within `unify_struct`.

## Yap4.2.0pl2:

- NEW: static arrays of DB terms.
- NEW: `close_static_array` and `resize_static_array` now work over mmapped files.
- FIXED: rename `delete_static_array` to `close_static_array`.
- FIXED: improve the manual a little bit. Add info in README to Manual.
- FIXED: support for ISO-style `atom_chars/2` and `number_chars/2`.
- NEW: ISO `include/1` directive.
- ISO: `ensure_loaded/1` is now a directive (and it cannot be called as a procedure).
- NEW: `discontiguous/1` directive.
- NEW: process `multifile/1` as a directive.
- FIXED: give warning if multifile procedures are used before multifile declaration.
- FIXED: `multifile` was very severy broken.
- FIXED: `initialize/1` now follows ANSI semantics. We have `prolog_initialize/1` for SICStus Prolog code.
- FIXED: don't explode if the compiler finds too many variables or if there is not enough code space to store our code.
- NEW: ISO quoted character sequences (note that this means that '`\+`' will break now).
- FIXED: remove limit on size of strings and quoted atoms.
- FIXED: `[ ]` is now parsed as `[]`, like other Prologs do.
- FIXED: read-in clauses predicated by modules (mod:clause).
- FIXED: gcc/HP-UX would generate incorrect code for PredForCode. Use an extra temporary (at) and the probably goes away.
- NEW: add "`make install-info`", "`make info`" and "`make html`".
- FIXED: create a README file mentioning the license, get rid of the INSTALL file for now.
- FIXED: don't shadow `S`, `CP`, `HB` in hppa. They have their own registers.
- FIXED: change x86 back to base address `0x10000000` and `tags` back to `opstags` for Linux.

## Yap4.2.0pl1:

- FIXED: works(?) in HP/UX.
- NEW: `update_array` for dynamic arrays.
- FIXED: works in FreeBSD.
- FIXED: improvements and additions to configuration scripts.
- NEW: port to Visual C++ (_MSC_VER).
- NEW: major improvements and bug fixes to YAPOR.
- CLEANUP: `_REG` to `_`.
- NEW: arrays of bytes and of unsigned bytes.
- FIXED: worked a bit on manual.
- NEW: `resize_static_array/3`.
- NEW: `delete_static_array/1`.
- FIXED: ACOW in YAPOR.
- FIXED: Error after Error would not notice there was no place to cut back to.
- FIXED: SBA in YAPOR.
- NEW: `version/0` and `version/1`. Deleted `yap_version/1`.
- NEW: `is_mutable/1`.
- FIXED: recent bug in dif.
- SYNCH: with Ricardo Rocha's optyap. SBA is broken.
- FIXED: `reverse_opcode_lookup` table.
- NEW: YAP as a library:
  - New functions provide an interface for initialising and calling Yap from external environments. Note that Yap is still a big chunk.
  - Restoring embedded C-functions is now performed by `restore_heap` together with `InitStaff`.
  - The code to restore a clause has been updated to use `yamop` and `GONEXT`. The same code does both indices and clauses.
  - All macros that adjust pointers are now functions, and type-check their arguments.
  - All functions that restore a stack (from restore, `growheap` and `growlocal`) have now been merged in a general function in `grow.c`. This decreases efficiency slightly, but should improve maintainability.
  - `InitStaff()` now has an argument saying whether we are calling from boot or from restore. Note that most Prolog executions will actually call `InitStaff()` twice.
  - initialisation code in `yap.c` was simplified. Several functions and variables were moved out to `init.c`.
  - routines that start new goals were moved out of `cdmgr.c` to `exec.c`.
- FIXED: all clauses should terminate with `_Ystop`, but we just did `emit_op` instead of `a_e`.
- NEW: `save_program/2`.
- NEW: `save_program/1`. Default startup is now through `save_program`.
- FIXED: `break` should not remove choice-points.
- FIXED: allow `(call(X), X)` to possibly succeed. It is unclear whether that conforms to the ISO standard, but there is the excuse it is SICStus compatible.
- FIXED: `$undefp` would call a bad `$user_call`.
- FIXED: bad calculations for `walltime`.
- FIXED: bug with `depth_bound_call` for `not` and `\+`.
- FIXED: `execute_goal` would not recover registers correctly.
- NEW: SICStus compatibility predicates including `incore/1`, `callable/1`, and `simple/1`.
- NEW: add arity as an extra argument to `_struct` functions.
- FIXED: uninitialised profiling counters.
- FIXED: OPTYap had broken `unknown=error`.
- FIXED: small bug in assembling index code.
- FIXED: `growheap` would not fix trail properly.
- NEW: logical update semantics for internal data-base.
- CLEANUP: indexed code also has a tag.
- FIXED: p`utenv/2` must allocate static memory.
- FIXED: remove duplicate clauses in `environ/2`.

## Yap4.2.0:

- NEW: YAP4.2.0 is out.
- REMOVED: file `RELEASE.NOTES`.

# Changes in YAP4.1

## Yap4.1.19:

- FIXED: `phrase/3` had bad call to `$t_body`.
- FIXED: warnings on alpha.
- FIXED: make YAP compile on SGI's cc.
- ISO-YAP: accept `0o` notation for octal integers.
- FIXED: `rcdifnot` would try to unify with `NULL` return pointer.
- FIXED: `when/3` did not link Done variables.
- FIXED: bad copying of arguments in co-routining.
- NEW: first cut at SBA or-parallel execution.
- FIXED: YAP version is now in Makefile.
- NEW: `alarm/3` (see manual).
- FIXED: `errno` handling is in `io.h`.

## Yap4.1.18:

- FIXED: debugger would not work after change to call.
- FIXED: do not trace `!G` within debugger.

## Yap4.1.17:

- FIXED: error handler for floats was too enthusiastic in `format/3`.
- FIXED: accept list of dynamic predicates.
- NEW: merge new version of Ricardo Rocha's OPTYAP including support for tabulation.
- NEW: improve performance of `call`.
- FIXED: trail overflow in heap gc (`store_ref_in_dbtable`).
- FIXED: close `fd` if `mmap` fails.
- FIXED: `IsPrimitiveTerm` would succeed on suspended variables.
- FIXED: small bug in socket_select.
- FIXED: garbage collector would follow old values of multi-assignment variables even if they were not heap pointers.
- FIXED: garbage collector was following list of suspended goals as if a variable.
- FIXED: `call/1` was not importing modules correctly.
- NEW: A library. Right now it just consists of several files copied from the Edinburg Prolog library, with little or no change. To use it, you must do "`make install`" or have `LIBDIR` in the Makefile set to the YAP source directory.
- FIXED: garbage in debugger.
- FIXED: fix writing `\+ (a,b)` properly.
- NEW: get rid of addresses for the `unify()` routines. Unify now receives values, as it should, instead of addresses.
- NEW: get rid of the representant stuff for coroutining. Instead of trying to find out if we bound an external variable, from now on we must guarantee that we pass a non-dereferenced external variable (e.g. argument) to the unification routine, otherwise delayed variables may not wake up.
- FIXED: get rid of `bind_variable`.
- FIXED: `exit_yap` was not working (`halt`).
- FIXED: write version number when booting from a saved state.

## Yap4.1.16:

- FIXED: don't crash if you're not booting from the standard file (`SavedInfo` should not assume `LookupAtom` works).
- FIXED: prompt (again).
- FIXED: debugging dynamic or source mode procedures would ignore depth limits.
- FIXED: `-DBP_FREE` could lose program counter, if changed by `ErCl` or `ErDBE`.
- FIXED: global registers could be smashed by the compiler within error handlers (SGI).
- FIXED: fix a bug on and thus enable garbage collection of code space.
- FIXED: bug in `cut_by_y`.
- FIXED: be less optimistic about when to expand the trail after a `sigsegv`.

## Yap4.1.15:

- FIXED: disable garbage collection of code space.
- FIXED: `growstack` did not know `OldH`.
- FIXED: be conservative about new variables in branches (`active_branch`).
- NEW: change code to Artistic license.
- FIXED: include `errno.h` in socket code.
- FIXED: `strcpy` of `NULL` pointers in `sysbits.c`.
- FIXED: writing `\+ (a,b)` would not output middle space, confusing the parser.
- NEW: initial support for the SBA model (parallelism).
- FIXED: make the system more robust when it can't get more memory.
- FIXED: `recorded` with unbounded key was crashing.
- CLEANUP: use `derefa` when we know the possible address for a variable. This avoids reading a memory cell twice.
- CLEANUP: make sockets a special stream, make actual reading and writing on sockets work, unify all close operations on sockets, update iopreds to take special care of sockets. Still not working: ungetc on sockets, eof has not been tested.
- CLEANUP: conditions on c-interface.
- FIXED: growheap could be called with wrong local stack pointer.
- NEW: `always_prompt_user/0`, for those who hide behind pipes and sockets.
- FIXED: bug in `frozen/2` and friends.
- CLEANUP: use Prolog terms in coroutining, avoid `NULL` pointers.
- FIXED: save/restore was breaking corouting.
- FIXED: `readline` does not work under parallel execution.
- CLEANUP: cleanup some constructs so that YAP will compile under `lcc` again.
- CLEANUP: follow choicepoint ordering whenever possible.
- FIXED: incorrect detection of overflows in `index.c`.

## Yap4.1.14:

- FIXED: `texi2dvi` failed on the manual because of incorrect placement of `@*`.
- FIXED: `RECOVER_MACHINE_REGS` for MIPS in `Regs.h` had somehow lost an `E`!
- FIXED: expand stacks if effectiveness of garbage collection is below 20%.
- FIXED: YAP was not checking for excessive number of labels while assembling.
- FIXED: get rid of `no` in sequential init.
- FIXED: bug in checking modules for `abolish` and friends.
- FIXED: with `readline`, prompt even if `stderr` is not a `tty`. Also make sure prompt goes to `stderr`, not to `stdout`.
- NEW: SICStus Prolog compatible socket interface (see manual, still experimental).

## Yap4.1.13:

- FIXED: Cygnus `getrusage` does not work under WIN95.
- FIXED: extraneous `push` in compiling `bvmap` for either.
- FIXED: long printf in `heapgc.c`.
- FIXED: extraneous `printf` in `dbase.c`.
- NEW: sync until leftmost in YAPOR.
- NEW: sequential predicates in YAPOR.
- FIXED: YAPOR in OPTYap now runs queens.

## Yap4.1.12:

- FIXED: make sure that when you backtrack to an erased clause you don't get caught by dangling pointers.
- FIXED: check args to arithmetic comparisons are not free.
- FIXED: make sure you only mark an env var as initialised if the instruction refers it for the first time.
- FIXED: Error handler depended on pointer to freed code.
- FIXED: always fully gc clean the last environment.
- FIXED: new dbref gc cleaner could mess with dbqueues.
- FIXED: test if YAP can allocate more memory.
- FIXED: YAP now makes procedures dynamic after first assert.
- FIXED: because of disjunctions, variables in clauses do not always grow linearly. Change compiler to informe gc of actual live variables in an environment at any point, not including variables outside the current branch (even if at ancestor's branches). Take special care with optimised if-then-elses.
- NEW: speedup `compact_heap`.
- FIXED: `CheckDBOverflow` in `MkDBTerm` would not reset variables, as it should.
- FIXED: recover `HB` in gc.
- NEW: Integer macros for integers that may overflow.
- NEW: jump across unmarked cells in downward pass.
- NEW: simplify marking longints and doubles.
- NEW: small performance improvement in meta-call.
- FIXED: make toggle preds robust to meta-calls.
- FIXED: bad error handling in evaluable predicates.
- NEW: upgrade YAPOR to most recent OPTYAP.
- CLEANUP: use the `RESET_VARIABLE` macro to reset a variable.
- FIXED: `ITERATIVE_DEEPENING` option is now called `DEPTH_LIMIT`.
- NEW: simplified autoconf script and Makefile.
- FIXED: YAPOR now compiles again and reaches top-level.
- CLEANUP: make assembly built-ins accessible as standard predicates. This makes meta-calls somewhat less bulky.
- FIXED: YAP could crash while reading in binary files. The problem was that the hash function could return an offset < 0.
- NEW: in GC check if db terms are in use, and if not reset counters. Further reclaim immediately space for terms erased and not in use (current implementation uses an inefficient unbalanced binary tree).
- NEW: in GC untrail unmarked bindings and reset the pointers.

## Yap4.1.11:

- NEW: after several requests, added `assert_static` and friends.
- FIXED: bug in adding spaces while writing `X is $VAR(2)+...`
- NEW: stream aliases.
- FIXED: `^C-a` now works on `PUSH_REGS` (eg, X86).
- FIXED: `catch` could remove other valid catches.
- FIXED: several cases of non-compatible ISO error handling.
- FIXED: `current_input` and `current_output` would fail for instantiated arguments.
- FIXED: writing `$VAR(X)` terms could core dump miserably.
- FIXED: initialisation was not protected by a `catch/3`.
- FIXED: system would exit after trying to compile Numeric or DBRef goal.
- NEW: improve performance of arithmetic comparisons by inserting them as ops in abstract machine.
- FIXED: meta-call would get lost in `call((X,Y))`. Callable checking is now ISO (almost).
- FIXED: recursive compare was not catching `term_exts` on second argument to comparison.
- FIXED: compilation warning on printing Int in alpha.
- FIXED: gc would mark terms accessible only from the trail. Change so that these pointers are only relocated, and remove dangling pointers from the trail.

## Yap4.1.10:

- FIXED: get rid of `ExecuteProlog` as used by `print/1`, execute_goal can do the same.
- FIXED: `execute_goal` should survive garbage collection and/or stack shifting.
- FIXED: `$undefined` succeeded for predicates written in assembly.
- FIXED: provide 16 registers (`ARG1` to `ARG16`).
- FIXED: some changes to make YAP work without `ALIGN_LONGS`.
- FIXED: old timing bug.
- FIXED: bug in generating cut.
- FIXED: don't crash if have several errors on the same expression.
- FIXED: use `strerror` instead of `sys_errlist`.
- FIXED: make system more resilient to small ints.
- FIXED: system should be more resilient when allocating large chunks of memory.
- FIXED: `X is cputime` should have no rounding problems.
- FIXED: silently fail on wrong array accesses.
- FIXED: `true` was not seen as built-in.
- FIXED: `DEPTH` was not always saved correctly in `execute_prolog`.

## Yap4.1.9:

- FIXED: bug in scanner.
- FIXED: bug in allocating large chunks of memory under NT, and change to allow YAP to at least run under WIN95/98 (memory allocation and timing are not working yet for WIN98).

## Yap4.1.8:

- FIXED: random would only work in Linux.
- FIXED: better names for `array_element/3` and `update_array/3`.
- FIXED: array access now does boundary checking, and fails if you try to access an undefined reference.
- NEW: profiling now counts calls to non-profiled predicates, included system built-ins.
- FIXED: profiling now does not need to disable indexing.
- FIXED: `predicate_property` was returning just the name for unbound calls.
- NEW: `putenv/2`. If you want to start shell scripts.
- NEW: YAP now supports 8 bits char sets. The default is iso-latin.
- NEW: `call_residue/2` now available.
- FIXED: serious bug in `can_unify`: `HB` was not set to `H`. Should be no problem with `B`.
- FIXED: `trim_trail` is not compatible with Multi-Assignment variables.
- FIXED: under a few cases code could have problems if some was using a dynamic clause and retracted it.
- NEW: improve absmi for coroutining.
- FIXED: bug in `statistics(runtime,T)`.
- NEW: `statics(walltime,T)` and internal `walltime()` function.
- FIXED: changed code that assumed `dir_separator` could only be a single character. Some MS-DOS systems accept both slash and backslash.
- FIXED: for compatibility with other Prologs, YAP now changes directory to the directory containing the file it is consulting. Don't need to create an `init.yap` any longer.
- NEW: `getcwd/1`.
- FIXED: disallow integer as argument to `cd/1` and friends.
- FIXED: `rand` should depend on `MAX_RAND`; document `srandom`.
- NEW: `environ` now allows access to a process' environment.

## Yap4.1.7:

- FIXED: bug in `read_term/singletons`. I incorrectly assumed variables were being allocated in order.
- FIXED: too much space was being allocated for 64 bit architectures.
- FIXED: error handling in data base could collapse.
- FIXED: `ASP` for `growheap` could be wrong.
- FIXED: `growheap` and `growstack` forgot about dangling pointers in the trail.
- FIXED: increase margins as garbage collections happens.
- FIXED: make `recorded` and friends restartable for the case there is no space left to copy the new term.
- FIXED: make memory allocation routine more generic, try to use temporary files when `/dev/zero` is not available, control whether we are fetching the right addresses, and close open mmaped stream.
- FIXED: make sure we always have an error handler in the debugger.
- FIXED: GC should now work with named dynamic arrays and array extensions. Access to named dynamic arrays now goes through the trail.
- FIXED: make `arg/3` silently fail on negative or 0 first arguments. Breaks the ISO standard, but seems to be compatible with other Prologs.
- FIXED: dequeue could leave dangling pointers to the data-base.
- FIXED: bad error handling in arithmetic built-ins.
- FIXED: `absolute_file_name/2` was buggy.
- NEW: extend C-interface to allow calling back Prolog.
- FIXED: moved to version 98.
- FIXED: variable `ppc` was causing trouble with Rhapsody.
- FIXED: GC should now work with coroutining.
- FIXED: coroutining had bug with reference chains.
- FIXED: error handler called unexisting procedure `$close/2`.
- FIXED: small bug in `unknown/2`.
- CLEANUP: improve meta-call performance by avoiding unnecessary choice-points.
- FIXED: assert and source mode are now aware that modules call meta-calls.
- FIXED: libraries should be checked for existence before checking for the files themselves.
- NEW: dynamic loader now works in Linux/Alpha and in Digital Unix/Alpha! Fixed bugs where YAP would corrupt global variables allocated by external functions.
- FIXED: `BP_FREE` didn't do callee save for `PREG`, possibly corrupting the caller. Core dumped `print/1` on X86.
- CLEANUP: separate error handling into separate files.
- FIXED: `RATIONAL_TREES` should now work in all built-ins.
- FIXED: make sure the GC does not follow invalid trail entries.

## Yap4.1.6:

- NEW: `execute_goal(Goal)` function allows calling Prolog from C. Still under testing, and not yet officially in the interface. Note that execute_goal will destroy all X arguments, and that it only keeps the first solution (it performs an implicit cut).
- FIXED: complaints while compiling YAP in WIN/NT platform.
- FIXED: debugger got confused when quasi-skipping through inline builtins.
- FIXED: `DEPTH_BOUND_CALL` was not restoring depth for `retry_c`.
- NEW: compilation flag `LOW_LEVEL_TRACER`, if this flag is defined, enables detailing execution. Use start_low_level_trace and stop_level_trace, or T from interrupt to access this functionality.
- CLEANUP: overflows are now processed within the emulator, not back in the caller.
- FIXED: memory allocation during boot could crash returning `NULL` pointer, system would then crash.
- ISO-YAP: many new predicates, major rewrite of manual.
- FIXED: debugger should now understand better immediate update semantics (eg, dynamic predicates).
- ISO-YAP: all error handling is now ISO style.
- FIXED: could not write `MIN_INT`.
- ISO-YAP: add `Z is float_integer_part(X)`.
- ISO-YAP: add `Z is float_fractional_part(X)`.
- ISO-YAP: `arg/3` now generates errors.
- ISO-YAP: abolish/1 now does errors the YAP way, and only abolishes dynamic procedures. Use `abolish/2` to clear static procedures.
- Break `boot.yap` file into smaller files.
- YAP now compiles well under Linux/Alpha.
- X now is called `XREGS` to avoid problems with Linux/Alpha includes.
- Abort now jumps to before the absmi emulator and then does a long cut. This should simplify YapOr, and allow for restricting toplevels.

## Yap4.1.5:

- FIXED: `MAX_INT` on `Tags_LowTag` was wrong.
- NEW: first cut of profiling. Right now, Currently, for static predicates, profiling disables indexing. That should be fixed in the next version.
- NEW: source mode debugging is active. Compile with "`:- source`" and debug/step through all your builtins!
- FIXED: major bug in `cut_by`, since early 4.1 :-(. Affects debugging.
- NEW: fetch first op from pred before jumping.
- NEW: use `SREG` to cache `A1` for switches and tries.
- FIXED: warning messages for SGI CC.
- FIXED: warning messages for alphas.
- NEW: optimise `switch_on_list` for the list case.
- NEW: WAM registers optimised for MIPS.
- FIXED: shadow `CP` and `HB` on sparcs. They need every bit of performance we can get them.
- FIXED: famous curprio bug in parser, from now on parser backtracks cleanly.
- NEW: Got rid of `SREG` for call-type instructions.
- NEW: `CPREG` in `absmi` for Suns.
- CLEANUP: got rid of obsolete absmi regs.
- FIXED: small bug in the Prolog code for `unknown/2`.
- NEW: Small speed improvements for complex absmi instructions.

## Yap4.1.4:

- NEW: `read_term/3` and new syntax_error option to `yap_flag`.
- FIXED: got rid of fast predicates from compiler.
- NEW: Makefile now generates a bootable save state as YAP default.
- NEW: started working on manual for 4.1. Fixed info format so that it will generate info files. Add several missing built-ins to manual.
- NEW: bootable saved states with arguments, accessible though `unix(argv(L))`.
- NEW: optimised code for tests (`var/1` and friends) and arithmetic (`is/2`).
- NEW: much faster code for `/\`, `\/`, `>>` and `<<`.
- FIXED: debugger does not go into `recorded/3` and friends.

## Yap4.1.3:

- NEW: unix(argv(X)).
- FIXED: `abs` complains if `int != Int`.

## Yap4.1.2:

- NEW: saved states now search for `$BINDIR/yap.exe` to boot.
- FIXED: bugs with handling errors.
- FIXED: got rid of `$recorded/3` for now.
- NEW: generate specialised code for `OR`, `AND`, S`HIFT LEFT`, and `SHIFT RIGHT`.
- FIXED: `statistics(runtime,_)` now does not count GC time, as in other Prologs. `statistics(cputime,_)` counts everything.
- FIXED: time is returned as an integer, not as a float.

## Yap4.1.1:

- CLEANUP: get rid of warnings under Cygnus GCC.
- FIXED: Use Windows memory allocation routine, now YAP can recover from saved states for smaller stacks.
- CLEANUP: don't use the UNIX `define`. Use instead `configure` to say exactly which UNIX feature you need.
- FIXED: compiler would not handle correctly unsafe variable from disjunctions.
- FIXED: force indexing to ask for more stack if stack runs out. This should help if you have really many clauses.
- CLEANUP: clean all error code from C to use the new `Error()` routine.
- NEW: use `throw/1` to send system errors.
- NEW: `catch/3` and `throw/1`.
- NEW: `load_foreign_file/3` for SunOS4 (tested) and AIX (compiles).

## Yap4.1.0:

- NEW: memory mapped arrays.
- NEW: make garbage collector expand stack quickly to avoid excessive number of GCs.
- NEW: do the same for heap overflow detector.
- CLEANUP: cleanup readline code for not using `strcpy`, `strlen` and friends. Current code was broken for very large input strings.
- NEW: `sort` and friends implemented in C.
- NEW: Removed 256B limitation on atom size while parsing.
- CLEANUP: Change `AllocCodeSpace` to return `NULL` on code failure, make `cclause()` call growstack on stack failure.
- NEW: Static Arrays!
- Split previous support for arrays and co-routines. We now have `TERM_EXTENSIONS` to control extensions to unification. Tried to redesign the extensions so that they would be modular, the file `TermExt.h.m4` shows how to implement an extension.
- Got rid of `lock_pred` and friends. Usage of static predicates is now detected when compilation starts, or when assert is used.
- Got rid of hash table in `optimise_ce`, it wasn't working.
- Current predicate access:
  - add new argument to call, so that call can recognise which predicate it is working on.
  - add extra argument to `try` and frieds, so that they can directly access a predicate.
- Internal cleanup: change `cdmgr.c` and friends so that we now move in a clause through the Clause structure. Get rid of ptrs, except for `save.c`.
- Changes to immediate update semantics implementation:
  - Entries are now removed from the chain immediately, instead of only when they are physically deleted.
  - Each entry has an age (positive if entry is from `recordz`, negative if from `recorda`).
  - When we backtrack to deleted entries, we search the property list for entries with younger ages.
  - When we erase a clause, we don't place a fail in the clause. Instead, we remove the clause from the chain immediately.
- NEW: MIPS architecture support in `Regs.h` and `absmi.c`.
- X86 Speedups:
  - Force opcode prefetching for simple instructions in X86.
  - Cache `Y` for control instructions in X86.
  - Optimise `Bind()` for X86 by jumping only if we need to trail for cases close to the end of the instruction. This does not seem to improve performance for X86 machines.
  - Cache `SREG` usage.
- Cleanup:
  - Move `AuxSp` and `AuxTop` to `REGS`.
  - Use `Aux` for emulator `PDL`.
- Cleanup: `compiler.h`. Use enum for compiler ops.
- NEW: Indexing:
  - simplify `GC` and `ORP`: instructions do not store intermediate values in global.
  - unnecessary instructions purged.
  - new `try_tail` like `trail_head`, but jumps to atomic code.
  - switch on types insts after backtracking now look like retry and have correct clause information for ORP.
  - `switch_on_type` talks to `switch_on_func` through `S`, and to switch on cons through `A[0]`. `I_R` disappeared.