3 * CHR: experimental detach code size reduction (bug fix)
7 * CHR: reduce code size of attach and detach predicates (experimental)
11 * CHR: chr_enum/1 (bug fix) and chr_enum/2 (with handler)
15 * CHR: reinstate chr_enum/1
19 * CHR: suppress printing of put_attr/3 at toplevel
23 * MODIFIED: Renamed hash_term/2 to term_hash/2. Added hash_term/2 to
24 library(backcomp), so most code should not notice this.
28 * ENHANCED: CHR performance of find_chr_constraint when called with nonvar argument
32 * ENHANCED: CHR performance (minor issues)
36 * FIX: CHR new C file for Windows
38 * FIX: CHR: single chr_support.c C file
42 * ENHANCED: CHR: moved performance critical predicates to C
46 * ENHANCED: CHR user-provided background knowledge (Jon Sneyers)
50 * ENHANCED: CHR compiler performance
52 * ENHANCED: CHR compiler performance
56 * EHANCED: CHR performance: compacted indexing code
60 * ADDED: CHR: chr_constants/1 built-in type for enumerated constants
64 * ENHANCED: CHR: performance improvements (success continuation, Prolog code optimization)
66 * COMPAT: Removed min_list/2 from library(hprolog) as this is now in library lists.
70 * TS: Exploit success continuation information.
74 * TS: Bug fix in continuation optimization.
75 * TS: Fixed singleton variable.
76 * TS: Suppress debug message.
80 * TS: Rewrite Prolog code: common prefix elimination in
81 successive clauses of the same predicate.
82 * TS: Tries stores enabled by default again.
83 * TS: Success and failure continuation optimization for
84 propagation occurrences.
88 * TS: Fix performance bug in locking of guard variables.
89 * TS: Fix performance bug in spurious hash_term call.
93 * TS: Type check constraint declarations.
94 * TS: Trie stores hidden behind `experimental' option.
95 * TS: New option `verbose' prints constraint indices.
96 * TS: Don't compute term_hash for int and natural types.
100 * TS: Avoid trivial warning for declare_stored_constraints.
101 * TS: Bug fix: missing full store was causing compiler to loop.
105 * TS: Bug fix: atomic_constants store was causing compiler
107 * TS: Clean-up and avoid adding additional global_ground store
108 if atomic_constants store covers all cases.
109 * TS: Clean-up and bug fix.
113 * TS: Performance improvement: use new store
114 implementation for multi-argument lookups
115 on manifest ground terms. Should be faster than
120 * TS: Performance improvement: use new store
121 implementation for single-argument lookups
122 on manifest atomics. Should be faster than
123 hashtable. Will be generalized to arbitrary
124 manifest ground lookups and non-manifest
125 atomically typed lookups .
129 * TS: Modified error messages of declare_stored_constraints
130 option, to distinguish between stored, temporarily stored
132 * TS: write/1, writeln/1 and format/2 are now treated as non-binding
134 * TS: Properly inline inthash constraint lookup.
138 * TS: Additional assertion # default(Goal) for the
139 declare_stored_constraints, which specifies that
140 an unconditional simplification rule for the constraint
141 must be added to the end of the program. The Goal
142 parameter specifies the goal of that rule, e.g.
143 true or fail or throw(...). Experimental.
147 * TS: Experimental option declare_stored_constraints for
148 telling the compiler to warn for stored constraints
149 that are not asserted to be stored. Use the
150 :- chr_constraint f(...) # stored.
151 notation for asserting that a constraint is expected to
156 * TS: Inline constraint lookup.
158 * TS: Precompile term hashing.
162 * TS: Code cleaning was hampered by line numbers.
163 Reported by Mike Elston.
167 * PVW: Bug fix in observation analysis.
168 * PVW: Consistency checks of experimental history pragma.
172 * TS: Lessened worst bottlenecks in CHR compiler,
173 in the guard simplification phase.
177 * TS: Experimental dynattr option, for dynamic size attribute terms.
181 * TS: Extended observation analysis (abstract interpretation)
182 to deal with disjunctions. With Paolo Tacchella.
186 * TS: Renamed hprolog:substitute/4 to substitute_eq/4, because of
187 name conflict with library(edit).
191 * TS: Use line numbers in error and warning messages.
195 * TS: Added maintenance of line numbers through CHR compilation
196 as an option: chr_option(line_numbers,on).
200 * TS: Bug fix: setarg/3 instantiation error reported by Mike Elston.
201 Caused by missing suspension argument in debug off, optimize off
206 * LDK: O(1) removal from hashtables, with experimental
207 chr_option(ht_removal,on).
211 * PVW: Bugfixes for optional use of CHR constraints in rule guards.
215 * PVW: Optional use of CHR constraints in rule guards.
219 * TS: Bug fix in compiler_errors.pl.
223 * TS: Bug fix in occurrence subsumption by Jon Sneyers.
227 * TS: New preprocessor feature.
229 * TS: Parametrization of experimental chr_identifier type.
235 * TS: Stronger static type checking.
237 * TS: Omitted buggy FD analysis from bootstrapping process.
243 * TS: Experimental chr_identifier type.
247 * TS: Allow for empty type definitions aka phantom types. These are
248 useful for some type-level tricks. A warning is issued so the
249 user can check whether a phantom type is intended. No other
250 phantom type-specific checks are in place yet.
252 * TS: Fixed static type checking of built-in types.
256 * TS: The dense_int type can now appear on the rhs of type alias
261 * TS: Fixed bug concerning matchings between ground and possibly
262 non-ground arguments.
266 * TS: Fixed a bug in code generation, overeager removal of a clause.
270 * TS: Refactored some code.
274 * TS: Add exception handler to initialize chr_leash in new threads.
278 * TS: Bug fix for programs in debugging mode.
282 * JW: Fixed make clean
283 * JW: Enlarged stacks to make build succeed
287 * JW: Add target ln-install
291 * TS: Fixed wrong arities in not inlined predicates. Mike Elston.
295 * TS: Code clean-up, more inlining, only generate used imports.
299 * TS: Inlining and more specialization of auxiliary predicates.
303 * TS: Fixed bug for constraints without rules in debug mode.
305 * TS: Compiler clean-up
307 * TS: Experimental var_assoc_store.
312 * TS: Various minor code generation improvements, including smaller
317 * TS: Absolutely no lock checking when check_guard_bindings is disabled.
321 * TS: Minor optimizations for (-) arguments.
323 * TS: Important optimization for awakening fewer suspended constraints
327 * TS: Fixed typo in static type checker.
329 * TS: Documented static and dynamic type checking.
333 * TS: Fixed bug (type alias related) in static type checker. Mike Elston.
335 * TS: Added static type checking on variable matching in rule heads.
337 * TS: Added static type checking on CHR constraints in rule bodies.
341 * TS: New (limited) compile time type checking of rule heads.
345 * TS: New experimental robustness feature in debug mode:
346 runtime type checking of CHR constraints.
350 * TS: Minor bug fixes.
354 * TS: Improved performance of ai_observation_analysis,
355 mainly via additional tabling and passive declarations.
359 * TS: Disabled some code only intended for SICStus.
361 * TS: Fixed bug in removal of constraints. Spotted by Leslie De Koninck.
365 * TS: Next fix to tracer. Cconstraints in propagation
366 rules are shown in textual order.
370 * TS: Next few fixes to tracer. Constraints in simpagation rules
371 are now shown on the right side of the backslash.
375 * TS: Synchronization with SICStus version of K.U.Leuven CHR.
377 * TS: First few fixes to tracer. Cconstraints in simplification
378 rules are shown in textual order. Constraint insertions
383 * TS: Termination bug fixed in guard_entailment.
385 * TS: Runtime library predicate run_suspensions is now specialized
386 per constraint, avoiding requirement of fixed suspension layout.
388 * TS: Further update to suspension term layout. Only constraints for
389 which the propagation history is used get a history field.
393 * TS: Ignore propagation rules with trivial body 'true'.
397 * TS: Guard entailment now first simplifies the formula it processes,
398 in order to reduce the number of disjunctions, to obtain a smaller
403 * TS: Bug fix by Jon Sneyers: type aliases now support built-in types.
404 Spotted by Mike Elston.
406 * TS: Small refactorings based on Ciao port experience.
408 * TS: Removed -singleton stylecheck option now that portray_clause
409 prints singleton variables as _.
413 * JW: Make library(chr) load its private stuff silent.
417 * TS: Bug fix: too many guards were locked.
421 * TS: Most runtime library predicates are now specialized
422 per constraint, avoiding generic =.. and lists code.
424 Mayor update to suspension term layout. Layout may now
425 differ from one constraint to the other. Some unused suspension
426 fields (continuation goal and generation number) are omitted.
427 Further analysis can remove more fields.
429 Default store constraints now each have
430 their own global variable: a list of all the suspensions.
431 Removal from this list is now O(1) thanks to setarg/1 and
432 back pointers in the suspension terms. This can cause time
433 time complexity improvements in solvers that always have
434 variable indexing on their constraints.
436 Ground, non-indexed constraints are now removed from
437 their global list store in O(1), as for the default store.
439 Minor bug fixes in a number of places.
443 * TS: Fixed subtle bug in ai_observation analysis,
444 that caused goal sequences to only generate
445 the optimistic default answer pattern, leading
446 to invalid 'not observed' conclusions.
447 * TS: Variable indexing/suspension analysis now ignores functor/3
448 in guards. Could be extended to other built-ins
449 that cause an error when arguments are not
450 properly instantiated.
454 * TS: Renamed global variable id to chr_id in chr_runtime.pl.
457 * JS: Synchronization with experimental version:
458 - minor optimizations, e.g. efficient lookups with statically known
460 - new alternative syntax for passive declarations
461 - new dense_int built-in type + underlying store
462 - new type alias definitions, like in Mercury
465 * BD: small changes in chr_compiler_options.pl and chr_translate.chr
466 affecting only the SICStus port
469 * BD: lots of changes related to porting to SICStus
470 * TS: Now exception/3 hook is only used in SWI-Prolog
474 * TS: Use exception/3 hook to catch undefined
475 global variables of chr_runtime.pl and CHR modules,
476 for multi-threaded programs and saved states.
480 * JW: Fix "make check" path issues.
481 * TS: Removed all is_chr_file tests when loading file.
485 * BD: chr_swi.pl: option(optimize --> :- chr_option(optimize
486 * TS: Removed obsolete experimental optimization option.
487 * TS: Correctly report variable pragmas!
488 * TS: No constraints declared is no longer a special case.
492 * BD: chr_swi.pl - use_module(hprolog added for SICStus port
493 * TS: Removed operator declaration for '::'. No longer used.
497 * TS: Removed chr_constraints declaration again, in favor
498 of only the chr_constraint declaration and modified
499 documentation accordingly.
500 * TS: Modified documentation based on recommendations of Bart Demoen.
501 * TS: Added chr_info/3 predicate to chr_compiler_errors, as suggested by
502 Jon Sneyers. Now print banner on calling compiler.
506 * TS: warnings are now written to user_error stream.
510 * TS: option and constraints declarations are now deprecated. They
511 are replaced by chr_option and chr_constraint(s).
512 * TR: Made an interface for warnings and errors. Errors now implemented
514 * TR: Revised documentation.
517 * BD: chr_translate.chr, chr_translate_bootstrap2.chr
518 mutables "abstracted"
519 * BD: chr_translate_bootstrap1.chr
520 atomic_concat - some duplicate code of it is in more than one file :-(
521 create_get_mutable definitions if-deffed
522 verbosity_on/0 for porting
524 definitions of init_store/2, get_store/2, update_store/2
525 and of make_init_store_goal/make_get_store_goal/make_update_store_goal
526 removed prolog_flag/3 (seemed nowhere used)
527 chr_translate_bootstrap2.chr
528 make_init_store_goal/make_get_store_goal/make_update_store_goal introduced
529 verbosity_on/0 for porting
530 chr_translate_bootstrap.pl
531 atom_concat -> atomic_concat
532 verbosity_on/0 for porting
533 conditional import van library(terms)
535 make_init_store_goal etc. introduced
536 create_get_mutable_ref wherever needed (chr_translate*)
540 * BD: chr_runtime.pl:
542 included contents of chr_debug.pl
544 create_mutable changed into 'chr create_mutable'
545 got rid of explicit inlining and did it by goal expansion
546 inlining also of 'chr default_store'
548 removed :- use_module(chr(chr_debug))
549 module header: version for SICStus
550 * BD: chr_debug.pl: emptied
551 * BD: chr_translate.chr:
552 system specific declarations factored out in insert_declarations
553 changed two atom_concat/3 into atomic_concat/3 (because arg 2 was sometimes an int)
554 * BD: chr_compiler_utility.pl:
555 put atomic_concat/3 there
556 adapted atom_concat_list/2 to use it
557 * BD: chr_swi_bootstrap.pl:
558 introduced chr_swi_bootstrap/2 for ease of porting
559 exported also chr_compile/3
560 porting code for get_time stuff/read_term/absolute_file_name
561 * BD: builtins.pl, a_star.pl, clean_code.pl:
566 * BD: hprolog.pl: removed strip_attributes/2 and restore_attributes/2
569 * BD: chr_swi.pl: Removed code that took Handler for Module (in chr_expand(end_of_file)
570 Added :- chr_option(_,_) with same meaning as option(_,_)
571 is_chr_file: .chr is no longer a recognised suffix
572 added use_module(library(lists))
573 changed calls to source_location/2 into prolog_load_context/2
574 * BD: chr_translate.chr: chr_translate/2: added end_of_file to translated program
575 adapted SICStus compatibility message
576 made :- chr_option(_,_) available
577 changed precedence of + - ? to 980 (these ops are
578 probably not local enough to the module)
582 * TS: Further synchronization with hProlog.
586 * TS: Removed dead code in guard_entailment.chr
587 * TS: Fixed performance bug: now lookup is indexed
588 on maximal number of arguments.
589 * TS: Removed some redundant intermediate predicates
591 * TS: It is now possible to disable the printing
592 of the CHR constraint store per module,
593 through the option toplevel_show_store on/off
594 * TS: Synchronized with hProlog
595 * TS: bug fix in functional dependency analysis
599 * TS: Removed two dead predicates in chr_translate.chr
600 and hooked up the late_storage_analysis
601 that was being bypassed.
602 * TS: Renamed global_term_ref_1 to default_store.
603 * TS: Removed redundant predicate values_ht.
604 * TS: Compiler no longer generates dead code for never stored constraints,
605 i.e. attach/detach predicates.
606 This reduces the generated .pl by about 700 lines.
610 * TS: Two more bug fixes for constraints without
611 active occurrences that trigger.
615 * TS: Small optimization of code for constraints
616 without any active occurrence.
617 * TS: Fixed bug caused by previous bug fix:
618 added only_ground_indexed_arguments/1 test
619 to separate out that meaning from may_trigger/1.
623 * TS: Removed strip_attributes code.
624 * TS: Fixed bug that causes new constraints to be added on triggering.
628 * TS: Two minor bug fixes.
632 * TS: Fixed bug due to overly aggressive inlining of get_mutable_value.
636 * JS: Compiled code is broken, if debug is off and optimize too.
637 Debug off now entails optimize on.
639 * TS: Some fixes of the documentation. Thanks to Bart Demoen
644 * TS: Synchronized with hProlog.
648 * TS: Added missing operator declarations for prefix (?).
652 * JW: import lists into chr_compiler_utility.pl
654 * JW: make message hook for query(yes) detect CHR global variables.
656 * JW: Exported pairlist_delete_eq/3 from pairlist and use this in
657 chr_hashtable_store.pl
661 * TS: Renamed pairlist:delete/3 to pairlist:pairlist_delete/3.
665 * TS: Extended more efficient ground matching code to
666 removed simpagation occurrence code.
670 * TS: New input verification: duplicate constraint declaration
671 now reported as an error. Requested by Mike Elston.
672 * TS: More efficient matching code for ground constraints
673 when matching an argument of a partner constraint with
675 * JS: Bug fix in guard simplification.
679 * TS: Factored out option functionality into separate module.
680 * TS: Factored out utility code into separate module.
684 * TS: Changed chr_show_store/1 to use print/1 instead of write/1.
688 * TS: Removed spurious and conflicting operator definitions
689 for +, - and ? as mode declarations.
693 * TS: Added find_chr_constraint/1 functionality.
697 * TS: Improved compiler scalability: use nb_setval/2 to
698 remember compiled code through backtracking over
699 compilation process instead of assert/1.
700 * TS: Removed spurious comma from file.
704 * TS: Added option to disable toplevel constraint store printing.
705 * TS: Slightly improved hash table constraint store implementation.
709 * JW: Added patch from Jon Sneyers.
713 * TS: Improved head reordering heuristic.
714 * TS: Added support primitive for alternate built-in solver dependency.
718 * TS: Fixed bug that causes wrong output in chr_show_store.
722 * TS: Fixed several bugs in generation of debugable code.
726 * JW: Cleanup integration in SWI-Prolog environment:
727 - Extended SWI-Prolog library ordsets. Renamed ord_delete/3 to
728 ord_del_element/3 and ord_difference/3 to ord_subtract/3 for
729 better compatibility.
730 - Renamed module find to chr_find to avoid name conflict and declared
731 preds as meta-predicate.
732 - Re-inserted and exported strip_attributes/2 and
733 restore_attributes/2 in hprolog.pl. Deleted hprolog: from
735 - Added dummy option declarations to bootstrap compiler.
736 - Fixed path problems in makefile (-p chr=.) and install new
738 - Fixed typo 'chr show_store' --> chr_show_store.
742 * JS: Added guard entailment optimizations and
743 new syntax for type and mode declarations.
747 * TS: Use prolog:message/3 hook to automatically print
748 contents of CHR constraint stores with query bindings
753 * TS: Bugfix in code generation. Reported by Lyosha Ilyukhin.
757 * TS: Updated hashtable stores. They now start small and expand.
761 * JW: Removed chr_pp: module prefixes
762 * JW: Updated Windows makefile.mak (more similar organisation, added check)
766 * TS: Added chr_hashtable_store library.
767 * TS: Added find library.
768 * TS: Added builtins library.
769 * TS: Added clean_code library.
770 * TS: Added binomial_heap library.
771 * TS: Added a_star library.
772 * TS: Added new intermediate bootstrapping step
773 * TS: Synchronized CHR compiler with most recent development version
777 "The new version of the compiler contains several new optimizations, both
778 fully automatic, such as the antimonotny-based delay avoidance (see
779 http://www.cs.kuleuven.be/publicaties/rapporten/cw/CW385.abs.html for
780 the technical report), and enabled by mode declarations (see CHR
781 documentation), such as hashtable-based constraint indexes."
785 * JW: Added chr_messages.pl. Make all debug messages use the print_message/2
786 interface to enable future embedding.
790 * JW: Added chr:debug_interact/3 hook. Defined in chr_swi.pl to void
791 showing constraints first as goal and then as CHR call.
792 * JW: Added chr:debug_event/2 hook. Defined in chr_swi.pl to make the
793 CHR debugger honour a skip command from the Prolog tracer.
797 * JW: Added b (break) to the CHR debugger.
798 * TS: added chr_expandable/2 clause for pragma/2
802 * JW: fixed reference to format_rule/2.
803 * JW: Use select/3 rather than delete/3 in diff/2 in Tests/zebra.pl
804 * TS: CHR translation now leaves CHR store empty
808 * JW: added :- use_module(library(chr)) to all examples.
809 * JW: mapped -O --> option(optimize, full).
810 * JW: introduced file-search-path `chr' for clarity and to enable running
811 make check from the local environment instead of the public installation.
812 * JW: mapped prolog flag generate_debug_info --> option(debug, on)
813 * JW: Replaced the chr -> pl step with term_expansion/2.
814 * JW: Moved insert_declarations/2 to chr_swi.pl
818 * JW: fixed Undefined procedure: chr_runtime:run_suspensions_loop_d/1
819 * TS: Added <space> for creep and shortened debug line prefix to CHR:
823 * JW: Use \+ \+ in chr_compile/3 to undo changes to the constraint
824 pool. Regression test suite using "make check" works again.
828 * TS: Added skip and ancestor debug commands
832 * TS: Added bootstrapping process for CHR compiler using CHR.
833 * TS: CHR compiler now uses CHR.
834 * TS: Fixed bug in compilation of multi-headed simpagation rules.
835 * TS: Cleaned up compiler.
836 * TS: Added analysis + optimization for never attached constraints.
837 * TS: Exploit uniqueness (functional dependency) results to detect
838 set semantics type simpagation rules where one rule can be passive
839 * TS: Compiler generates 'chr debug_event'/1 calls
840 * TS: Rudimentary support for debugging.
841 option(debug,on) causes a trace of CHR events to be printed
845 * JW: Fix operator handling.
849 * JW: Integrated new version from Tom Schrijvers.