3 * MODIFIED: Renamed hash_term/2 to term_hash/2. Added hash_term/2 to
4 library(backcomp), so most code should not notice this.
8 * ENHANCED: CHR performance of find_chr_constraint when called with nonvar argument
12 * ENHANCED: CHR performance (minor issues)
16 * FIX: CHR new C file for Windows
18 * FIX: CHR: single chr_support.c C file
22 * ENHANCED: CHR: moved performance critical predicates to C
26 * ENHANCED: CHR user-provided background knowledge (Jon Sneyers)
30 * ENHANCED: CHR compiler performance
32 * ENHANCED: CHR compiler performance
36 * EHANCED: CHR performance: compacted indexing code
40 * ADDED: CHR: chr_constants/1 built-in type for enumerated constants
44 * ENHANCED: CHR: performance improvements (success continuation, Prolog code optimization)
46 * COMPAT: Removed min_list/2 from library(hprolog) as this is now in library lists.
50 * TS: Exploit success continuation information.
54 * TS: Bug fix in continuation optimization.
55 * TS: Fixed singleton variable.
56 * TS: Suppress debug message.
60 * TS: Rewrite Prolog code: common prefix elimination in
61 successive clauses of the same predicate.
62 * TS: Tries stores enabled by default again.
63 * TS: Success and failure continuation optimization for
64 propagation occurrences.
68 * TS: Fix performance bug in locking of guard variables.
69 * TS: Fix performance bug in spurious hash_term call.
73 * TS: Type check constraint declarations.
74 * TS: Trie stores hidden behind `experimental' option.
75 * TS: New option `verbose' prints constraint indices.
76 * TS: Don't compute term_hash for int and natural types.
80 * TS: Avoid trivial warning for declare_stored_constraints.
81 * TS: Bug fix: missing full store was causing compiler to loop.
85 * TS: Bug fix: atomic_constants store was causing compiler
87 * TS: Clean-up and avoid adding additional global_ground store
88 if atomic_constants store covers all cases.
89 * TS: Clean-up and bug fix.
93 * TS: Performance improvement: use new store
94 implementation for multi-argument lookups
95 on manifest ground terms. Should be faster than
100 * TS: Performance improvement: use new store
101 implementation for single-argument lookups
102 on manifest atomics. Should be faster than
103 hashtable. Will be generalized to arbitrary
104 manifest ground lookups and non-manifest
105 atomically typed lookups .
109 * TS: Modified error messages of declare_stored_constraints
110 option, to distinguish between stored, temporarily stored
112 * TS: write/1, writeln/1 and format/2 are now treated as non-binding
114 * TS: Properly inline inthash constraint lookup.
118 * TS: Additional assertion # default(Goal) for the
119 declare_stored_constraints, which specifies that
120 an unconditional simplification rule for the constraint
121 must be added to the end of the program. The Goal
122 parameter specifies the goal of that rule, e.g.
123 true or fail or throw(...). Experimental.
127 * TS: Experimental option declare_stored_constraints for
128 telling the compiler to warn for stored constraints
129 that are not asserted to be stored. Use the
130 :- chr_constraint f(...) # stored.
131 notation for asserting that a constraint is expected to
136 * TS: Inline constraint lookup.
138 * TS: Precompile term hashing.
142 * TS: Code cleaning was hampered by line numbers.
143 Reported by Mike Elston.
147 * PVW: Bug fix in observation analysis.
148 * PVW: Consistency checks of experimental history pragma.
152 * TS: Lessened worst bottlenecks in CHR compiler,
153 in the guard simplification phase.
157 * TS: Experimental dynattr option, for dynamic size attribute terms.
161 * TS: Extended observation analysis (abstract interpretation)
162 to deal with disjunctions. With Paolo Tacchella.
166 * TS: Renamed hprolog:substitute/4 to substitute_eq/4, because of
167 name conflict with library(edit).
171 * TS: Use line numbers in error and warning messages.
175 * TS: Added maintenance of line numbers through CHR compilation
176 as an option: chr_option(line_numbers,on).
180 * TS: Bug fix: setarg/3 instantiation error reported by Mike Elston.
181 Caused by missing suspension argument in debug off, optimize off
186 * LDK: O(1) removal from hashtables, with experimental
187 chr_option(ht_removal,on).
191 * PVW: Bugfixes for optional use of CHR constraints in rule guards.
195 * PVW: Optional use of CHR constraints in rule guards.
199 * TS: Bug fix in compiler_errors.pl.
203 * TS: Bug fix in occurrence subsumption by Jon Sneyers.
207 * TS: New preprocessor feature.
209 * TS: Parametrization of experimental chr_identifier type.
215 * TS: Stronger static type checking.
217 * TS: Omitted buggy FD analysis from bootstrapping process.
223 * TS: Experimental chr_identifier type.
227 * TS: Allow for empty type definitions aka phantom types. These are
228 useful for some type-level tricks. A warning is issued so the
229 user can check whether a phantom type is intended. No other
230 phantom type-specific checks are in place yet.
232 * TS: Fixed static type checking of built-in types.
236 * TS: The dense_int type can now appear on the rhs of type alias
241 * TS: Fixed bug concerning matchings between ground and possibly
242 non-ground arguments.
246 * TS: Fixed a bug in code generation, overeager removal of a clause.
250 * TS: Refactored some code.
254 * TS: Add exception handler to initialize chr_leash in new threads.
258 * TS: Bug fix for programs in debugging mode.
262 * JW: Fixed make clean
263 * JW: Enlarged stacks to make build succeed
267 * JW: Add target ln-install
271 * TS: Fixed wrong arities in not inlined predicates. Mike Elston.
275 * TS: Code clean-up, more inlining, only generate used imports.
279 * TS: Inlining and more specialization of auxiliary predicates.
283 * TS: Fixed bug for constraints without rules in debug mode.
285 * TS: Compiler clean-up
287 * TS: Experimental var_assoc_store.
292 * TS: Various minor code generation improvements, including smaller
297 * TS: Absolutely no lock checking when check_guard_bindings is disabled.
301 * TS: Minor optimizations for (-) arguments.
303 * TS: Important optimization for awakening fewer suspended constraints
307 * TS: Fixed typo in static type checker.
309 * TS: Documented static and dynamic type checking.
313 * TS: Fixed bug (type alias related) in static type checker. Mike Elston.
315 * TS: Added static type checking on variable matching in rule heads.
317 * TS: Added static type checking on CHR constraints in rule bodies.
321 * TS: New (limited) compile time type checking of rule heads.
325 * TS: New experimental robustness feature in debug mode:
326 runtime type checking of CHR constraints.
330 * TS: Minor bug fixes.
334 * TS: Improved performance of ai_observation_analysis,
335 mainly via additional tabling and passive declarations.
339 * TS: Disabled some code only intended for SICStus.
341 * TS: Fixed bug in removal of constraints. Spotted by Leslie De Koninck.
345 * TS: Next fix to tracer. Cconstraints in propagation
346 rules are shown in textual order.
350 * TS: Next few fixes to tracer. Constraints in simpagation rules
351 are now shown on the right side of the backslash.
355 * TS: Synchronization with SICStus version of K.U.Leuven CHR.
357 * TS: First few fixes to tracer. Cconstraints in simplification
358 rules are shown in textual order. Constraint insertions
363 * TS: Termination bug fixed in guard_entailment.
365 * TS: Runtime library predicate run_suspensions is now specialized
366 per constraint, avoiding requirement of fixed suspension layout.
368 * TS: Further update to suspension term layout. Only constraints for
369 which the propagation history is used get a history field.
373 * TS: Ignore propagation rules with trivial body 'true'.
377 * TS: Guard entailment now first simplifies the formula it processes,
378 in order to reduce the number of disjunctions, to obtain a smaller
383 * TS: Bug fix by Jon Sneyers: type aliases now support built-in types.
384 Spotted by Mike Elston.
386 * TS: Small refactorings based on Ciao port experience.
388 * TS: Removed -singleton stylecheck option now that portray_clause
389 prints singleton variables as _.
393 * JW: Make library(chr) load its private stuff silent.
397 * TS: Bug fix: too many guards were locked.
401 * TS: Most runtime library predicates are now specialized
402 per constraint, avoiding generic =.. and lists code.
404 Mayor update to suspension term layout. Layout may now
405 differ from one constraint to the other. Some unused suspension
406 fields (continuation goal and generation number) are omitted.
407 Further analysis can remove more fields.
409 Default store constraints now each have
410 their own global variable: a list of all the suspensions.
411 Removal from this list is now O(1) thanks to setarg/1 and
412 back pointers in the suspension terms. This can cause time
413 time complexity improvements in solvers that always have
414 variable indexing on their constraints.
416 Ground, non-indexed constraints are now removed from
417 their global list store in O(1), as for the default store.
419 Minor bug fixes in a number of places.
423 * TS: Fixed subtle bug in ai_observation analysis,
424 that caused goal sequences to only generate
425 the optimistic default answer pattern, leading
426 to invalid 'not observed' conclusions.
427 * TS: Variable indexing/suspension analysis now ignores functor/3
428 in guards. Could be extended to other built-ins
429 that cause an error when arguments are not
430 properly instantiated.
434 * TS: Renamed global variable id to chr_id in chr_runtime.pl.
437 * JS: Synchronization with experimental version:
438 - minor optimizations, e.g. efficient lookups with statically known
440 - new alternative syntax for passive declarations
441 - new dense_int built-in type + underlying store
442 - new type alias definitions, like in Mercury
445 * BD: small changes in chr_compiler_options.pl and chr_translate.chr
446 affecting only the SICStus port
449 * BD: lots of changes related to porting to SICStus
450 * TS: Now exception/3 hook is only used in SWI-Prolog
454 * TS: Use exception/3 hook to catch undefined
455 global variables of chr_runtime.pl and CHR modules,
456 for multi-threaded programs and saved states.
460 * JW: Fix "make check" path issues.
461 * TS: Removed all is_chr_file tests when loading file.
465 * BD: chr_swi.pl: option(optimize --> :- chr_option(optimize
466 * TS: Removed obsolete experimental optimization option.
467 * TS: Correctly report variable pragmas!
468 * TS: No constraints declared is no longer a special case.
472 * BD: chr_swi.pl - use_module(hprolog added for SICStus port
473 * TS: Removed operator declaration for '::'. No longer used.
477 * TS: Removed chr_constraints declaration again, in favor
478 of only the chr_constraint declaration and modified
479 documentation accordingly.
480 * TS: Modified documentation based on recommendations of Bart Demoen.
481 * TS: Added chr_info/3 predicate to chr_compiler_errors, as suggested by
482 Jon Sneyers. Now print banner on calling compiler.
486 * TS: warnings are now written to user_error stream.
490 * TS: option and constraints declarations are now deprecated. They
491 are replaced by chr_option and chr_constraint(s).
492 * TR: Made an interface for warnings and errors. Errors now implemented
494 * TR: Revised documentation.
497 * BD: chr_translate.chr, chr_translate_bootstrap2.chr
498 mutables "abstracted"
499 * BD: chr_translate_bootstrap1.chr
500 atomic_concat - some duplicate code of it is in more than one file :-(
501 create_get_mutable definitions if-deffed
502 verbosity_on/0 for porting
504 definitions of init_store/2, get_store/2, update_store/2
505 and of make_init_store_goal/make_get_store_goal/make_update_store_goal
506 removed prolog_flag/3 (seemed nowhere used)
507 chr_translate_bootstrap2.chr
508 make_init_store_goal/make_get_store_goal/make_update_store_goal introduced
509 verbosity_on/0 for porting
510 chr_translate_bootstrap.pl
511 atom_concat -> atomic_concat
512 verbosity_on/0 for porting
513 conditional import van library(terms)
515 make_init_store_goal etc. introduced
516 create_get_mutable_ref wherever needed (chr_translate*)
520 * BD: chr_runtime.pl:
522 included contents of chr_debug.pl
524 create_mutable changed into 'chr create_mutable'
525 got rid of explicit inlining and did it by goal expansion
526 inlining also of 'chr default_store'
528 removed :- use_module(chr(chr_debug))
529 module header: version for SICStus
530 * BD: chr_debug.pl: emptied
531 * BD: chr_translate.chr:
532 system specific declarations factored out in insert_declarations
533 changed two atom_concat/3 into atomic_concat/3 (because arg 2 was sometimes an int)
534 * BD: chr_compiler_utility.pl:
535 put atomic_concat/3 there
536 adapted atom_concat_list/2 to use it
537 * BD: chr_swi_bootstrap.pl:
538 introduced chr_swi_bootstrap/2 for ease of porting
539 exported also chr_compile/3
540 porting code for get_time stuff/read_term/absolute_file_name
541 * BD: builtins.pl, a_star.pl, clean_code.pl:
546 * BD: hprolog.pl: removed strip_attributes/2 and restore_attributes/2
549 * BD: chr_swi.pl: Removed code that took Handler for Module (in chr_expand(end_of_file)
550 Added :- chr_option(_,_) with same meaning as option(_,_)
551 is_chr_file: .chr is no longer a recognised suffix
552 added use_module(library(lists))
553 changed calls to source_location/2 into prolog_load_context/2
554 * BD: chr_translate.chr: chr_translate/2: added end_of_file to translated program
555 adapted SICStus compatibility message
556 made :- chr_option(_,_) available
557 changed precedence of + - ? to 980 (these ops are
558 probably not local enough to the module)
562 * TS: Further synchronization with hProlog.
566 * TS: Removed dead code in guard_entailment.chr
567 * TS: Fixed performance bug: now lookup is indexed
568 on maximal number of arguments.
569 * TS: Removed some redundant intermediate predicates
571 * TS: It is now possible to disable the printing
572 of the CHR constraint store per module,
573 through the option toplevel_show_store on/off
574 * TS: Synchronized with hProlog
575 * TS: bug fix in functional dependency analysis
579 * TS: Removed two dead predicates in chr_translate.chr
580 and hooked up the late_storage_analysis
581 that was being bypassed.
582 * TS: Renamed global_term_ref_1 to default_store.
583 * TS: Removed redundant predicate values_ht.
584 * TS: Compiler no longer generates dead code for never stored constraints,
585 i.e. attach/detach predicates.
586 This reduces the generated .pl by about 700 lines.
590 * TS: Two more bug fixes for constraints without
591 active occurrences that trigger.
595 * TS: Small optimization of code for constraints
596 without any active occurrence.
597 * TS: Fixed bug caused by previous bug fix:
598 added only_ground_indexed_arguments/1 test
599 to separate out that meaning from may_trigger/1.
603 * TS: Removed strip_attributes code.
604 * TS: Fixed bug that causes new constraints to be added on triggering.
608 * TS: Two minor bug fixes.
612 * TS: Fixed bug due to overly aggressive inlining of get_mutable_value.
616 * JS: Compiled code is broken, if debug is off and optimize too.
617 Debug off now entails optimize on.
619 * TS: Some fixes of the documentation. Thanks to Bart Demoen
624 * TS: Synchronized with hProlog.
628 * TS: Added missing operator declarations for prefix (?).
632 * JW: import lists into chr_compiler_utility.pl
634 * JW: make message hook for query(yes) detect CHR global variables.
636 * JW: Exported pairlist_delete_eq/3 from pairlist and use this in
637 chr_hashtable_store.pl
641 * TS: Renamed pairlist:delete/3 to pairlist:pairlist_delete/3.
645 * TS: Extended more efficient ground matching code to
646 removed simpagation occurrence code.
650 * TS: New input verification: duplicate constraint declaration
651 now reported as an error. Requested by Mike Elston.
652 * TS: More efficient matching code for ground constraints
653 when matching an argument of a partner constraint with
655 * JS: Bug fix in guard simplification.
659 * TS: Factored out option functionality into separate module.
660 * TS: Factored out utility code into separate module.
664 * TS: Changed chr_show_store/1 to use print/1 instead of write/1.
668 * TS: Removed spurious and conflicting operator definitions
669 for +, - and ? as mode declarations.
673 * TS: Added find_chr_constraint/1 functionality.
677 * TS: Improved compiler scalability: use nb_setval/2 to
678 remember compiled code through backtracking over
679 compilation process instead of assert/1.
680 * TS: Removed spurious comma from file.
684 * TS: Added option to disable toplevel constraint store printing.
685 * TS: Slightly improved hash table constraint store implementation.
689 * JW: Added patch from Jon Sneyers.
693 * TS: Improved head reordering heuristic.
694 * TS: Added support primitive for alternate built-in solver dependency.
698 * TS: Fixed bug that causes wrong output in chr_show_store.
702 * TS: Fixed several bugs in generation of debugable code.
706 * JW: Cleanup integration in SWI-Prolog environment:
707 - Extended SWI-Prolog library ordsets. Renamed ord_delete/3 to
708 ord_del_element/3 and ord_difference/3 to ord_subtract/3 for
709 better compatibility.
710 - Renamed module find to chr_find to avoid name conflict and declared
711 preds as meta-predicate.
712 - Re-inserted and exported strip_attributes/2 and
713 restore_attributes/2 in hprolog.pl. Deleted hprolog: from
715 - Added dummy option declarations to bootstrap compiler.
716 - Fixed path problems in makefile (-p chr=.) and install new
718 - Fixed typo 'chr show_store' --> chr_show_store.
722 * JS: Added guard entailment optimizations and
723 new syntax for type and mode declarations.
727 * TS: Use prolog:message/3 hook to automatically print
728 contents of CHR constraint stores with query bindings
733 * TS: Bugfix in code generation. Reported by Lyosha Ilyukhin.
737 * TS: Updated hashtable stores. They now start small and expand.
741 * JW: Removed chr_pp: module prefixes
742 * JW: Updated Windows makefile.mak (more similar organisation, added check)
746 * TS: Added chr_hashtable_store library.
747 * TS: Added find library.
748 * TS: Added builtins library.
749 * TS: Added clean_code library.
750 * TS: Added binomial_heap library.
751 * TS: Added a_star library.
752 * TS: Added new intermediate bootstrapping step
753 * TS: Synchronized CHR compiler with most recent development version
757 "The new version of the compiler contains several new optimizations, both
758 fully automatic, such as the antimonotny-based delay avoidance (see
759 http://www.cs.kuleuven.be/publicaties/rapporten/cw/CW385.abs.html for
760 the technical report), and enabled by mode declarations (see CHR
761 documentation), such as hashtable-based constraint indexes."
765 * JW: Added chr_messages.pl. Make all debug messages use the print_message/2
766 interface to enable future embedding.
770 * JW: Added chr:debug_interact/3 hook. Defined in chr_swi.pl to void
771 showing constraints first as goal and then as CHR call.
772 * JW: Added chr:debug_event/2 hook. Defined in chr_swi.pl to make the
773 CHR debugger honour a skip command from the Prolog tracer.
777 * JW: Added b (break) to the CHR debugger.
778 * TS: added chr_expandable/2 clause for pragma/2
782 * JW: fixed reference to format_rule/2.
783 * JW: Use select/3 rather than delete/3 in diff/2 in Tests/zebra.pl
784 * TS: CHR translation now leaves CHR store empty
788 * JW: added :- use_module(library(chr)) to all examples.
789 * JW: mapped -O --> option(optimize, full).
790 * JW: introduced file-search-path `chr' for clarity and to enable running
791 make check from the local environment instead of the public installation.
792 * JW: mapped prolog flag generate_debug_info --> option(debug, on)
793 * JW: Replaced the chr -> pl step with term_expansion/2.
794 * JW: Moved insert_declarations/2 to chr_swi.pl
798 * JW: fixed Undefined procedure: chr_runtime:run_suspensions_loop_d/1
799 * TS: Added <space> for creep and shortened debug line prefix to CHR:
803 * JW: Use \+ \+ in chr_compile/3 to undo changes to the constraint
804 pool. Regression test suite using "make check" works again.
808 * TS: Added skip and ancestor debug commands
812 * TS: Added bootstrapping process for CHR compiler using CHR.
813 * TS: CHR compiler now uses CHR.
814 * TS: Fixed bug in compilation of multi-headed simpagation rules.
815 * TS: Cleaned up compiler.
816 * TS: Added analysis + optimization for never attached constraints.
817 * TS: Exploit uniqueness (functional dependency) results to detect
818 set semantics type simpagation rules where one rule can be passive
819 * TS: Compiler generates 'chr debug_event'/1 calls
820 * TS: Rudimentary support for debugging.
821 option(debug,on) causes a trace of CHR events to be printed
825 * JW: Fix operator handling.
829 * JW: Integrated new version from Tom Schrijvers.