3 * CHR: ADDED error value for check_guard_bindings option: throw error on guard binding
5 * CHR: ADDED error value for check_guard_bindings option: throw error on guard binding
9 * CHR: experimental detach code size reduction (bug fix)
13 * CHR: reduce code size of attach and detach predicates (experimental)
17 * CHR: chr_enum/1 (bug fix) and chr_enum/2 (with handler)
21 * CHR: reinstate chr_enum/1
25 * CHR: suppress printing of put_attr/3 at toplevel
29 * MODIFIED: Renamed hash_term/2 to term_hash/2. Added hash_term/2 to
30 library(backcomp), so most code should not notice this.
34 * ENHANCED: CHR performance of find_chr_constraint when called with nonvar argument
38 * ENHANCED: CHR performance (minor issues)
42 * FIX: CHR new C file for Windows
44 * FIX: CHR: single chr_support.c C file
48 * ENHANCED: CHR: moved performance critical predicates to C
52 * ENHANCED: CHR user-provided background knowledge (Jon Sneyers)
56 * ENHANCED: CHR compiler performance
58 * ENHANCED: CHR compiler performance
62 * EHANCED: CHR performance: compacted indexing code
66 * ADDED: CHR: chr_constants/1 built-in type for enumerated constants
70 * ENHANCED: CHR: performance improvements (success continuation, Prolog code optimization)
72 * COMPAT: Removed min_list/2 from library(hprolog) as this is now in library lists.
76 * TS: Exploit success continuation information.
80 * TS: Bug fix in continuation optimization.
81 * TS: Fixed singleton variable.
82 * TS: Suppress debug message.
86 * TS: Rewrite Prolog code: common prefix elimination in
87 successive clauses of the same predicate.
88 * TS: Tries stores enabled by default again.
89 * TS: Success and failure continuation optimization for
90 propagation occurrences.
94 * TS: Fix performance bug in locking of guard variables.
95 * TS: Fix performance bug in spurious hash_term call.
99 * TS: Type check constraint declarations.
100 * TS: Trie stores hidden behind `experimental' option.
101 * TS: New option `verbose' prints constraint indices.
102 * TS: Don't compute term_hash for int and natural types.
106 * TS: Avoid trivial warning for declare_stored_constraints.
107 * TS: Bug fix: missing full store was causing compiler to loop.
111 * TS: Bug fix: atomic_constants store was causing compiler
113 * TS: Clean-up and avoid adding additional global_ground store
114 if atomic_constants store covers all cases.
115 * TS: Clean-up and bug fix.
119 * TS: Performance improvement: use new store
120 implementation for multi-argument lookups
121 on manifest ground terms. Should be faster than
126 * TS: Performance improvement: use new store
127 implementation for single-argument lookups
128 on manifest atomics. Should be faster than
129 hashtable. Will be generalized to arbitrary
130 manifest ground lookups and non-manifest
131 atomically typed lookups .
135 * TS: Modified error messages of declare_stored_constraints
136 option, to distinguish between stored, temporarily stored
138 * TS: write/1, writeln/1 and format/2 are now treated as non-binding
140 * TS: Properly inline inthash constraint lookup.
144 * TS: Additional assertion # default(Goal) for the
145 declare_stored_constraints, which specifies that
146 an unconditional simplification rule for the constraint
147 must be added to the end of the program. The Goal
148 parameter specifies the goal of that rule, e.g.
149 true or fail or throw(...). Experimental.
153 * TS: Experimental option declare_stored_constraints for
154 telling the compiler to warn for stored constraints
155 that are not asserted to be stored. Use the
156 :- chr_constraint f(...) # stored.
157 notation for asserting that a constraint is expected to
162 * TS: Inline constraint lookup.
164 * TS: Precompile term hashing.
168 * TS: Code cleaning was hampered by line numbers.
169 Reported by Mike Elston.
173 * PVW: Bug fix in observation analysis.
174 * PVW: Consistency checks of experimental history pragma.
178 * TS: Lessened worst bottlenecks in CHR compiler,
179 in the guard simplification phase.
183 * TS: Experimental dynattr option, for dynamic size attribute terms.
187 * TS: Extended observation analysis (abstract interpretation)
188 to deal with disjunctions. With Paolo Tacchella.
192 * TS: Renamed hprolog:substitute/4 to substitute_eq/4, because of
193 name conflict with library(edit).
197 * TS: Use line numbers in error and warning messages.
201 * TS: Added maintenance of line numbers through CHR compilation
202 as an option: chr_option(line_numbers,on).
206 * TS: Bug fix: setarg/3 instantiation error reported by Mike Elston.
207 Caused by missing suspension argument in debug off, optimize off
212 * LDK: O(1) removal from hashtables, with experimental
213 chr_option(ht_removal,on).
217 * PVW: Bugfixes for optional use of CHR constraints in rule guards.
221 * PVW: Optional use of CHR constraints in rule guards.
225 * TS: Bug fix in compiler_errors.pl.
229 * TS: Bug fix in occurrence subsumption by Jon Sneyers.
233 * TS: New preprocessor feature.
235 * TS: Parametrization of experimental chr_identifier type.
241 * TS: Stronger static type checking.
243 * TS: Omitted buggy FD analysis from bootstrapping process.
249 * TS: Experimental chr_identifier type.
253 * TS: Allow for empty type definitions aka phantom types. These are
254 useful for some type-level tricks. A warning is issued so the
255 user can check whether a phantom type is intended. No other
256 phantom type-specific checks are in place yet.
258 * TS: Fixed static type checking of built-in types.
262 * TS: The dense_int type can now appear on the rhs of type alias
267 * TS: Fixed bug concerning matchings between ground and possibly
268 non-ground arguments.
272 * TS: Fixed a bug in code generation, overeager removal of a clause.
276 * TS: Refactored some code.
280 * TS: Add exception handler to initialize chr_leash in new threads.
284 * TS: Bug fix for programs in debugging mode.
288 * JW: Fixed make clean
289 * JW: Enlarged stacks to make build succeed
293 * JW: Add target ln-install
297 * TS: Fixed wrong arities in not inlined predicates. Mike Elston.
301 * TS: Code clean-up, more inlining, only generate used imports.
305 * TS: Inlining and more specialization of auxiliary predicates.
309 * TS: Fixed bug for constraints without rules in debug mode.
311 * TS: Compiler clean-up
313 * TS: Experimental var_assoc_store.
318 * TS: Various minor code generation improvements, including smaller
323 * TS: Absolutely no lock checking when check_guard_bindings is disabled.
327 * TS: Minor optimizations for (-) arguments.
329 * TS: Important optimization for awakening fewer suspended constraints
333 * TS: Fixed typo in static type checker.
335 * TS: Documented static and dynamic type checking.
339 * TS: Fixed bug (type alias related) in static type checker. Mike Elston.
341 * TS: Added static type checking on variable matching in rule heads.
343 * TS: Added static type checking on CHR constraints in rule bodies.
347 * TS: New (limited) compile time type checking of rule heads.
351 * TS: New experimental robustness feature in debug mode:
352 runtime type checking of CHR constraints.
356 * TS: Minor bug fixes.
360 * TS: Improved performance of ai_observation_analysis,
361 mainly via additional tabling and passive declarations.
365 * TS: Disabled some code only intended for SICStus.
367 * TS: Fixed bug in removal of constraints. Spotted by Leslie De Koninck.
371 * TS: Next fix to tracer. Cconstraints in propagation
372 rules are shown in textual order.
376 * TS: Next few fixes to tracer. Constraints in simpagation rules
377 are now shown on the right side of the backslash.
381 * TS: Synchronization with SICStus version of K.U.Leuven CHR.
383 * TS: First few fixes to tracer. Cconstraints in simplification
384 rules are shown in textual order. Constraint insertions
389 * TS: Termination bug fixed in guard_entailment.
391 * TS: Runtime library predicate run_suspensions is now specialized
392 per constraint, avoiding requirement of fixed suspension layout.
394 * TS: Further update to suspension term layout. Only constraints for
395 which the propagation history is used get a history field.
399 * TS: Ignore propagation rules with trivial body 'true'.
403 * TS: Guard entailment now first simplifies the formula it processes,
404 in order to reduce the number of disjunctions, to obtain a smaller
409 * TS: Bug fix by Jon Sneyers: type aliases now support built-in types.
410 Spotted by Mike Elston.
412 * TS: Small refactorings based on Ciao port experience.
414 * TS: Removed -singleton stylecheck option now that portray_clause
415 prints singleton variables as _.
419 * JW: Make library(chr) load its private stuff silent.
423 * TS: Bug fix: too many guards were locked.
427 * TS: Most runtime library predicates are now specialized
428 per constraint, avoiding generic =.. and lists code.
430 Mayor update to suspension term layout. Layout may now
431 differ from one constraint to the other. Some unused suspension
432 fields (continuation goal and generation number) are omitted.
433 Further analysis can remove more fields.
435 Default store constraints now each have
436 their own global variable: a list of all the suspensions.
437 Removal from this list is now O(1) thanks to setarg/1 and
438 back pointers in the suspension terms. This can cause time
439 time complexity improvements in solvers that always have
440 variable indexing on their constraints.
442 Ground, non-indexed constraints are now removed from
443 their global list store in O(1), as for the default store.
445 Minor bug fixes in a number of places.
449 * TS: Fixed subtle bug in ai_observation analysis,
450 that caused goal sequences to only generate
451 the optimistic default answer pattern, leading
452 to invalid 'not observed' conclusions.
453 * TS: Variable indexing/suspension analysis now ignores functor/3
454 in guards. Could be extended to other built-ins
455 that cause an error when arguments are not
456 properly instantiated.
460 * TS: Renamed global variable id to chr_id in chr_runtime.pl.
463 * JS: Synchronization with experimental version:
464 - minor optimizations, e.g. efficient lookups with statically known
466 - new alternative syntax for passive declarations
467 - new dense_int built-in type + underlying store
468 - new type alias definitions, like in Mercury
471 * BD: small changes in chr_compiler_options.pl and chr_translate.chr
472 affecting only the SICStus port
475 * BD: lots of changes related to porting to SICStus
476 * TS: Now exception/3 hook is only used in SWI-Prolog
480 * TS: Use exception/3 hook to catch undefined
481 global variables of chr_runtime.pl and CHR modules,
482 for multi-threaded programs and saved states.
486 * JW: Fix "make check" path issues.
487 * TS: Removed all is_chr_file tests when loading file.
491 * BD: chr_swi.pl: option(optimize --> :- chr_option(optimize
492 * TS: Removed obsolete experimental optimization option.
493 * TS: Correctly report variable pragmas!
494 * TS: No constraints declared is no longer a special case.
498 * BD: chr_swi.pl - use_module(hprolog added for SICStus port
499 * TS: Removed operator declaration for '::'. No longer used.
503 * TS: Removed chr_constraints declaration again, in favor
504 of only the chr_constraint declaration and modified
505 documentation accordingly.
506 * TS: Modified documentation based on recommendations of Bart Demoen.
507 * TS: Added chr_info/3 predicate to chr_compiler_errors, as suggested by
508 Jon Sneyers. Now print banner on calling compiler.
512 * TS: warnings are now written to user_error stream.
516 * TS: option and constraints declarations are now deprecated. They
517 are replaced by chr_option and chr_constraint(s).
518 * TR: Made an interface for warnings and errors. Errors now implemented
520 * TR: Revised documentation.
523 * BD: chr_translate.chr, chr_translate_bootstrap2.chr
524 mutables "abstracted"
525 * BD: chr_translate_bootstrap1.chr
526 atomic_concat - some duplicate code of it is in more than one file :-(
527 create_get_mutable definitions if-deffed
528 verbosity_on/0 for porting
530 definitions of init_store/2, get_store/2, update_store/2
531 and of make_init_store_goal/make_get_store_goal/make_update_store_goal
532 removed prolog_flag/3 (seemed nowhere used)
533 chr_translate_bootstrap2.chr
534 make_init_store_goal/make_get_store_goal/make_update_store_goal introduced
535 verbosity_on/0 for porting
536 chr_translate_bootstrap.pl
537 atom_concat -> atomic_concat
538 verbosity_on/0 for porting
539 conditional import van library(terms)
541 make_init_store_goal etc. introduced
542 create_get_mutable_ref wherever needed (chr_translate*)
546 * BD: chr_runtime.pl:
548 included contents of chr_debug.pl
550 create_mutable changed into 'chr create_mutable'
551 got rid of explicit inlining and did it by goal expansion
552 inlining also of 'chr default_store'
554 removed :- use_module(chr(chr_debug))
555 module header: version for SICStus
556 * BD: chr_debug.pl: emptied
557 * BD: chr_translate.chr:
558 system specific declarations factored out in insert_declarations
559 changed two atom_concat/3 into atomic_concat/3 (because arg 2 was sometimes an int)
560 * BD: chr_compiler_utility.pl:
561 put atomic_concat/3 there
562 adapted atom_concat_list/2 to use it
563 * BD: chr_swi_bootstrap.pl:
564 introduced chr_swi_bootstrap/2 for ease of porting
565 exported also chr_compile/3
566 porting code for get_time stuff/read_term/absolute_file_name
567 * BD: builtins.pl, a_star.pl, clean_code.pl:
572 * BD: hprolog.pl: removed strip_attributes/2 and restore_attributes/2
575 * BD: chr_swi.pl: Removed code that took Handler for Module (in chr_expand(end_of_file)
576 Added :- chr_option(_,_) with same meaning as option(_,_)
577 is_chr_file: .chr is no longer a recognised suffix
578 added use_module(library(lists))
579 changed calls to source_location/2 into prolog_load_context/2
580 * BD: chr_translate.chr: chr_translate/2: added end_of_file to translated program
581 adapted SICStus compatibility message
582 made :- chr_option(_,_) available
583 changed precedence of + - ? to 980 (these ops are
584 probably not local enough to the module)
588 * TS: Further synchronization with hProlog.
592 * TS: Removed dead code in guard_entailment.chr
593 * TS: Fixed performance bug: now lookup is indexed
594 on maximal number of arguments.
595 * TS: Removed some redundant intermediate predicates
597 * TS: It is now possible to disable the printing
598 of the CHR constraint store per module,
599 through the option toplevel_show_store on/off
600 * TS: Synchronized with hProlog
601 * TS: bug fix in functional dependency analysis
605 * TS: Removed two dead predicates in chr_translate.chr
606 and hooked up the late_storage_analysis
607 that was being bypassed.
608 * TS: Renamed global_term_ref_1 to default_store.
609 * TS: Removed redundant predicate values_ht.
610 * TS: Compiler no longer generates dead code for never stored constraints,
611 i.e. attach/detach predicates.
612 This reduces the generated .pl by about 700 lines.
616 * TS: Two more bug fixes for constraints without
617 active occurrences that trigger.
621 * TS: Small optimization of code for constraints
622 without any active occurrence.
623 * TS: Fixed bug caused by previous bug fix:
624 added only_ground_indexed_arguments/1 test
625 to separate out that meaning from may_trigger/1.
629 * TS: Removed strip_attributes code.
630 * TS: Fixed bug that causes new constraints to be added on triggering.
634 * TS: Two minor bug fixes.
638 * TS: Fixed bug due to overly aggressive inlining of get_mutable_value.
642 * JS: Compiled code is broken, if debug is off and optimize too.
643 Debug off now entails optimize on.
645 * TS: Some fixes of the documentation. Thanks to Bart Demoen
650 * TS: Synchronized with hProlog.
654 * TS: Added missing operator declarations for prefix (?).
658 * JW: import lists into chr_compiler_utility.pl
660 * JW: make message hook for query(yes) detect CHR global variables.
662 * JW: Exported pairlist_delete_eq/3 from pairlist and use this in
663 chr_hashtable_store.pl
667 * TS: Renamed pairlist:delete/3 to pairlist:pairlist_delete/3.
671 * TS: Extended more efficient ground matching code to
672 removed simpagation occurrence code.
676 * TS: New input verification: duplicate constraint declaration
677 now reported as an error. Requested by Mike Elston.
678 * TS: More efficient matching code for ground constraints
679 when matching an argument of a partner constraint with
681 * JS: Bug fix in guard simplification.
685 * TS: Factored out option functionality into separate module.
686 * TS: Factored out utility code into separate module.
690 * TS: Changed chr_show_store/1 to use print/1 instead of write/1.
694 * TS: Removed spurious and conflicting operator definitions
695 for +, - and ? as mode declarations.
699 * TS: Added find_chr_constraint/1 functionality.
703 * TS: Improved compiler scalability: use nb_setval/2 to
704 remember compiled code through backtracking over
705 compilation process instead of assert/1.
706 * TS: Removed spurious comma from file.
710 * TS: Added option to disable toplevel constraint store printing.
711 * TS: Slightly improved hash table constraint store implementation.
715 * JW: Added patch from Jon Sneyers.
719 * TS: Improved head reordering heuristic.
720 * TS: Added support primitive for alternate built-in solver dependency.
724 * TS: Fixed bug that causes wrong output in chr_show_store.
728 * TS: Fixed several bugs in generation of debugable code.
732 * JW: Cleanup integration in SWI-Prolog environment:
733 - Extended SWI-Prolog library ordsets. Renamed ord_delete/3 to
734 ord_del_element/3 and ord_difference/3 to ord_subtract/3 for
735 better compatibility.
736 - Renamed module find to chr_find to avoid name conflict and declared
737 preds as meta-predicate.
738 - Re-inserted and exported strip_attributes/2 and
739 restore_attributes/2 in hprolog.pl. Deleted hprolog: from
741 - Added dummy option declarations to bootstrap compiler.
742 - Fixed path problems in makefile (-p chr=.) and install new
744 - Fixed typo 'chr show_store' --> chr_show_store.
748 * JS: Added guard entailment optimizations and
749 new syntax for type and mode declarations.
753 * TS: Use prolog:message/3 hook to automatically print
754 contents of CHR constraint stores with query bindings
759 * TS: Bugfix in code generation. Reported by Lyosha Ilyukhin.
763 * TS: Updated hashtable stores. They now start small and expand.
767 * JW: Removed chr_pp: module prefixes
768 * JW: Updated Windows makefile.mak (more similar organisation, added check)
772 * TS: Added chr_hashtable_store library.
773 * TS: Added find library.
774 * TS: Added builtins library.
775 * TS: Added clean_code library.
776 * TS: Added binomial_heap library.
777 * TS: Added a_star library.
778 * TS: Added new intermediate bootstrapping step
779 * TS: Synchronized CHR compiler with most recent development version
783 "The new version of the compiler contains several new optimizations, both
784 fully automatic, such as the antimonotny-based delay avoidance (see
785 http://www.cs.kuleuven.be/publicaties/rapporten/cw/CW385.abs.html for
786 the technical report), and enabled by mode declarations (see CHR
787 documentation), such as hashtable-based constraint indexes."
791 * JW: Added chr_messages.pl. Make all debug messages use the print_message/2
792 interface to enable future embedding.
796 * JW: Added chr:debug_interact/3 hook. Defined in chr_swi.pl to void
797 showing constraints first as goal and then as CHR call.
798 * JW: Added chr:debug_event/2 hook. Defined in chr_swi.pl to make the
799 CHR debugger honour a skip command from the Prolog tracer.
803 * JW: Added b (break) to the CHR debugger.
804 * TS: added chr_expandable/2 clause for pragma/2
808 * JW: fixed reference to format_rule/2.
809 * JW: Use select/3 rather than delete/3 in diff/2 in Tests/zebra.pl
810 * TS: CHR translation now leaves CHR store empty
814 * JW: added :- use_module(library(chr)) to all examples.
815 * JW: mapped -O --> option(optimize, full).
816 * JW: introduced file-search-path `chr' for clarity and to enable running
817 make check from the local environment instead of the public installation.
818 * JW: mapped prolog flag generate_debug_info --> option(debug, on)
819 * JW: Replaced the chr -> pl step with term_expansion/2.
820 * JW: Moved insert_declarations/2 to chr_swi.pl
824 * JW: fixed Undefined procedure: chr_runtime:run_suspensions_loop_d/1
825 * TS: Added <space> for creep and shortened debug line prefix to CHR:
829 * JW: Use \+ \+ in chr_compile/3 to undo changes to the constraint
830 pool. Regression test suite using "make check" works again.
834 * TS: Added skip and ancestor debug commands
838 * TS: Added bootstrapping process for CHR compiler using CHR.
839 * TS: CHR compiler now uses CHR.
840 * TS: Fixed bug in compilation of multi-headed simpagation rules.
841 * TS: Cleaned up compiler.
842 * TS: Added analysis + optimization for never attached constraints.
843 * TS: Exploit uniqueness (functional dependency) results to detect
844 set semantics type simpagation rules where one rule can be passive
845 * TS: Compiler generates 'chr debug_event'/1 calls
846 * TS: Rudimentary support for debugging.
847 option(debug,on) causes a trace of CHR events to be printed
851 * JW: Fix operator handling.
855 * JW: Integrated new version from Tom Schrijvers.