3 * ENHANCED: CHR performance of find_chr_constraint when called with nonvar argument
7 * ENHANCED: CHR performance (minor issues)
11 * FIX: CHR new C file for Windows
13 * FIX: CHR: single chr_support.c C file
17 * ENHANCED: CHR: moved performance critical predicates to C
21 * ENHANCED: CHR user-provided background knowledge (Jon Sneyers)
25 * ENHANCED: CHR compiler performance
27 * ENHANCED: CHR compiler performance
31 * EHANCED: CHR performance: compacted indexing code
35 * ADDED: CHR: chr_constants/1 built-in type for enumerated constants
39 * ENHANCED: CHR: performance improvements (success continuation, Prolog code optimization)
41 * COMPAT: Removed min_list/2 from library(hprolog) as this is now in library lists.
45 * TS: Exploit success continuation information.
49 * TS: Bug fix in continuation optimization.
50 * TS: Fixed singleton variable.
51 * TS: Suppress debug message.
55 * TS: Rewrite Prolog code: common prefix elimination in
56 successive clauses of the same predicate.
57 * TS: Tries stores enabled by default again.
58 * TS: Success and failure continuation optimization for
59 propagation occurrences.
63 * TS: Fix performance bug in locking of guard variables.
64 * TS: Fix performance bug in spurious hash_term call.
68 * TS: Type check constraint declarations.
69 * TS: Trie stores hidden behind `experimental' option.
70 * TS: New option `verbose' prints constraint indices.
71 * TS: Don't compute term_hash for int and natural types.
75 * TS: Avoid trivial warning for declare_stored_constraints.
76 * TS: Bug fix: missing full store was causing compiler to loop.
80 * TS: Bug fix: atomic_constants store was causing compiler
82 * TS: Clean-up and avoid adding additional global_ground store
83 if atomic_constants store covers all cases.
84 * TS: Clean-up and bug fix.
88 * TS: Performance improvement: use new store
89 implementation for multi-argument lookups
90 on manifest ground terms. Should be faster than
95 * TS: Performance improvement: use new store
96 implementation for single-argument lookups
97 on manifest atomics. Should be faster than
98 hashtable. Will be generalized to arbitrary
99 manifest ground lookups and non-manifest
100 atomically typed lookups .
104 * TS: Modified error messages of declare_stored_constraints
105 option, to distinguish between stored, temporarily stored
107 * TS: write/1, writeln/1 and format/2 are now treated as non-binding
109 * TS: Properly inline inthash constraint lookup.
113 * TS: Additional assertion # default(Goal) for the
114 declare_stored_constraints, which specifies that
115 an unconditional simplification rule for the constraint
116 must be added to the end of the program. The Goal
117 parameter specifies the goal of that rule, e.g.
118 true or fail or throw(...). Experimental.
122 * TS: Experimental option declare_stored_constraints for
123 telling the compiler to warn for stored constraints
124 that are not asserted to be stored. Use the
125 :- chr_constraint f(...) # stored.
126 notation for asserting that a constraint is expected to
131 * TS: Inline constraint lookup.
133 * TS: Precompile term hashing.
137 * TS: Code cleaning was hampered by line numbers.
138 Reported by Mike Elston.
142 * PVW: Bug fix in observation analysis.
143 * PVW: Consistency checks of experimental history pragma.
147 * TS: Lessened worst bottlenecks in CHR compiler,
148 in the guard simplification phase.
152 * TS: Experimental dynattr option, for dynamic size attribute terms.
156 * TS: Extended observation analysis (abstract interpretation)
157 to deal with disjunctions. With Paolo Tacchella.
161 * TS: Renamed hprolog:substitute/4 to substitute_eq/4, because of
162 name conflict with library(edit).
166 * TS: Use line numbers in error and warning messages.
170 * TS: Added maintenance of line numbers through CHR compilation
171 as an option: chr_option(line_numbers,on).
175 * TS: Bug fix: setarg/3 instantiation error reported by Mike Elston.
176 Caused by missing suspension argument in debug off, optimize off
181 * LDK: O(1) removal from hashtables, with experimental
182 chr_option(ht_removal,on).
186 * PVW: Bugfixes for optional use of CHR constraints in rule guards.
190 * PVW: Optional use of CHR constraints in rule guards.
194 * TS: Bug fix in compiler_errors.pl.
198 * TS: Bug fix in occurrence subsumption by Jon Sneyers.
202 * TS: New preprocessor feature.
204 * TS: Parametrization of experimental chr_identifier type.
210 * TS: Stronger static type checking.
212 * TS: Omitted buggy FD analysis from bootstrapping process.
218 * TS: Experimental chr_identifier type.
222 * TS: Allow for empty type definitions aka phantom types. These are
223 useful for some type-level tricks. A warning is issued so the
224 user can check whether a phantom type is intended. No other
225 phantom type-specific checks are in place yet.
227 * TS: Fixed static type checking of built-in types.
231 * TS: The dense_int type can now appear on the rhs of type alias
236 * TS: Fixed bug concerning matchings between ground and possibly
237 non-ground arguments.
241 * TS: Fixed a bug in code generation, overeager removal of a clause.
245 * TS: Refactored some code.
249 * TS: Add exception handler to initialize chr_leash in new threads.
253 * TS: Bug fix for programs in debugging mode.
257 * JW: Fixed make clean
258 * JW: Enlarged stacks to make build succeed
262 * JW: Add target ln-install
266 * TS: Fixed wrong arities in not inlined predicates. Mike Elston.
270 * TS: Code clean-up, more inlining, only generate used imports.
274 * TS: Inlining and more specialization of auxiliary predicates.
278 * TS: Fixed bug for constraints without rules in debug mode.
280 * TS: Compiler clean-up
282 * TS: Experimental var_assoc_store.
287 * TS: Various minor code generation improvements, including smaller
292 * TS: Absolutely no lock checking when check_guard_bindings is disabled.
296 * TS: Minor optimizations for (-) arguments.
298 * TS: Important optimization for awakening fewer suspended constraints
302 * TS: Fixed typo in static type checker.
304 * TS: Documented static and dynamic type checking.
308 * TS: Fixed bug (type alias related) in static type checker. Mike Elston.
310 * TS: Added static type checking on variable matching in rule heads.
312 * TS: Added static type checking on CHR constraints in rule bodies.
316 * TS: New (limited) compile time type checking of rule heads.
320 * TS: New experimental robustness feature in debug mode:
321 runtime type checking of CHR constraints.
325 * TS: Minor bug fixes.
329 * TS: Improved performance of ai_observation_analysis,
330 mainly via additional tabling and passive declarations.
334 * TS: Disabled some code only intended for SICStus.
336 * TS: Fixed bug in removal of constraints. Spotted by Leslie De Koninck.
340 * TS: Next fix to tracer. Cconstraints in propagation
341 rules are shown in textual order.
345 * TS: Next few fixes to tracer. Constraints in simpagation rules
346 are now shown on the right side of the backslash.
350 * TS: Synchronization with SICStus version of K.U.Leuven CHR.
352 * TS: First few fixes to tracer. Cconstraints in simplification
353 rules are shown in textual order. Constraint insertions
358 * TS: Termination bug fixed in guard_entailment.
360 * TS: Runtime library predicate run_suspensions is now specialized
361 per constraint, avoiding requirement of fixed suspension layout.
363 * TS: Further update to suspension term layout. Only constraints for
364 which the propagation history is used get a history field.
368 * TS: Ignore propagation rules with trivial body 'true'.
372 * TS: Guard entailment now first simplifies the formula it processes,
373 in order to reduce the number of disjunctions, to obtain a smaller
378 * TS: Bug fix by Jon Sneyers: type aliases now support built-in types.
379 Spotted by Mike Elston.
381 * TS: Small refactorings based on Ciao port experience.
383 * TS: Removed -singleton stylecheck option now that portray_clause
384 prints singleton variables as _.
388 * JW: Make library(chr) load its private stuff silent.
392 * TS: Bug fix: too many guards were locked.
396 * TS: Most runtime library predicates are now specialized
397 per constraint, avoiding generic =.. and lists code.
399 Mayor update to suspension term layout. Layout may now
400 differ from one constraint to the other. Some unused suspension
401 fields (continuation goal and generation number) are omitted.
402 Further analysis can remove more fields.
404 Default store constraints now each have
405 their own global variable: a list of all the suspensions.
406 Removal from this list is now O(1) thanks to setarg/1 and
407 back pointers in the suspension terms. This can cause time
408 time complexity improvements in solvers that always have
409 variable indexing on their constraints.
411 Ground, non-indexed constraints are now removed from
412 their global list store in O(1), as for the default store.
414 Minor bug fixes in a number of places.
418 * TS: Fixed subtle bug in ai_observation analysis,
419 that caused goal sequences to only generate
420 the optimistic default answer pattern, leading
421 to invalid 'not observed' conclusions.
422 * TS: Variable indexing/suspension analysis now ignores functor/3
423 in guards. Could be extended to other built-ins
424 that cause an error when arguments are not
425 properly instantiated.
429 * TS: Renamed global variable id to chr_id in chr_runtime.pl.
432 * JS: Synchronization with experimental version:
433 - minor optimizations, e.g. efficient lookups with statically known
435 - new alternative syntax for passive declarations
436 - new dense_int built-in type + underlying store
437 - new type alias definitions, like in Mercury
440 * BD: small changes in chr_compiler_options.pl and chr_translate.chr
441 affecting only the SICStus port
444 * BD: lots of changes related to porting to SICStus
445 * TS: Now exception/3 hook is only used in SWI-Prolog
449 * TS: Use exception/3 hook to catch undefined
450 global variables of chr_runtime.pl and CHR modules,
451 for multi-threaded programs and saved states.
455 * JW: Fix "make check" path issues.
456 * TS: Removed all is_chr_file tests when loading file.
460 * BD: chr_swi.pl: option(optimize --> :- chr_option(optimize
461 * TS: Removed obsolete experimental optimization option.
462 * TS: Correctly report variable pragmas!
463 * TS: No constraints declared is no longer a special case.
467 * BD: chr_swi.pl - use_module(hprolog added for SICStus port
468 * TS: Removed operator declaration for '::'. No longer used.
472 * TS: Removed chr_constraints declaration again, in favor
473 of only the chr_constraint declaration and modified
474 documentation accordingly.
475 * TS: Modified documentation based on recommendations of Bart Demoen.
476 * TS: Added chr_info/3 predicate to chr_compiler_errors, as suggested by
477 Jon Sneyers. Now print banner on calling compiler.
481 * TS: warnings are now written to user_error stream.
485 * TS: option and constraints declarations are now deprecated. They
486 are replaced by chr_option and chr_constraint(s).
487 * TR: Made an interface for warnings and errors. Errors now implemented
489 * TR: Revised documentation.
492 * BD: chr_translate.chr, chr_translate_bootstrap2.chr
493 mutables "abstracted"
494 * BD: chr_translate_bootstrap1.chr
495 atomic_concat - some duplicate code of it is in more than one file :-(
496 create_get_mutable definitions if-deffed
497 verbosity_on/0 for porting
499 definitions of init_store/2, get_store/2, update_store/2
500 and of make_init_store_goal/make_get_store_goal/make_update_store_goal
501 removed prolog_flag/3 (seemed nowhere used)
502 chr_translate_bootstrap2.chr
503 make_init_store_goal/make_get_store_goal/make_update_store_goal introduced
504 verbosity_on/0 for porting
505 chr_translate_bootstrap.pl
506 atom_concat -> atomic_concat
507 verbosity_on/0 for porting
508 conditional import van library(terms)
510 make_init_store_goal etc. introduced
511 create_get_mutable_ref wherever needed (chr_translate*)
515 * BD: chr_runtime.pl:
517 included contents of chr_debug.pl
519 create_mutable changed into 'chr create_mutable'
520 got rid of explicit inlining and did it by goal expansion
521 inlining also of 'chr default_store'
523 removed :- use_module(chr(chr_debug))
524 module header: version for SICStus
525 * BD: chr_debug.pl: emptied
526 * BD: chr_translate.chr:
527 system specific declarations factored out in insert_declarations
528 changed two atom_concat/3 into atomic_concat/3 (because arg 2 was sometimes an int)
529 * BD: chr_compiler_utility.pl:
530 put atomic_concat/3 there
531 adapted atom_concat_list/2 to use it
532 * BD: chr_swi_bootstrap.pl:
533 introduced chr_swi_bootstrap/2 for ease of porting
534 exported also chr_compile/3
535 porting code for get_time stuff/read_term/absolute_file_name
536 * BD: builtins.pl, a_star.pl, clean_code.pl:
541 * BD: hprolog.pl: removed strip_attributes/2 and restore_attributes/2
544 * BD: chr_swi.pl: Removed code that took Handler for Module (in chr_expand(end_of_file)
545 Added :- chr_option(_,_) with same meaning as option(_,_)
546 is_chr_file: .chr is no longer a recognised suffix
547 added use_module(library(lists))
548 changed calls to source_location/2 into prolog_load_context/2
549 * BD: chr_translate.chr: chr_translate/2: added end_of_file to translated program
550 adapted SICStus compatibility message
551 made :- chr_option(_,_) available
552 changed precedence of + - ? to 980 (these ops are
553 probably not local enough to the module)
557 * TS: Further synchronization with hProlog.
561 * TS: Removed dead code in guard_entailment.chr
562 * TS: Fixed performance bug: now lookup is indexed
563 on maximal number of arguments.
564 * TS: Removed some redundant intermediate predicates
566 * TS: It is now possible to disable the printing
567 of the CHR constraint store per module,
568 through the option toplevel_show_store on/off
569 * TS: Synchronized with hProlog
570 * TS: bug fix in functional dependency analysis
574 * TS: Removed two dead predicates in chr_translate.chr
575 and hooked up the late_storage_analysis
576 that was being bypassed.
577 * TS: Renamed global_term_ref_1 to default_store.
578 * TS: Removed redundant predicate values_ht.
579 * TS: Compiler no longer generates dead code for never stored constraints,
580 i.e. attach/detach predicates.
581 This reduces the generated .pl by about 700 lines.
585 * TS: Two more bug fixes for constraints without
586 active occurrences that trigger.
590 * TS: Small optimization of code for constraints
591 without any active occurrence.
592 * TS: Fixed bug caused by previous bug fix:
593 added only_ground_indexed_arguments/1 test
594 to separate out that meaning from may_trigger/1.
598 * TS: Removed strip_attributes code.
599 * TS: Fixed bug that causes new constraints to be added on triggering.
603 * TS: Two minor bug fixes.
607 * TS: Fixed bug due to overly aggressive inlining of get_mutable_value.
611 * JS: Compiled code is broken, if debug is off and optimize too.
612 Debug off now entails optimize on.
614 * TS: Some fixes of the documentation. Thanks to Bart Demoen
619 * TS: Synchronized with hProlog.
623 * TS: Added missing operator declarations for prefix (?).
627 * JW: import lists into chr_compiler_utility.pl
629 * JW: make message hook for query(yes) detect CHR global variables.
631 * JW: Exported pairlist_delete_eq/3 from pairlist and use this in
632 chr_hashtable_store.pl
636 * TS: Renamed pairlist:delete/3 to pairlist:pairlist_delete/3.
640 * TS: Extended more efficient ground matching code to
641 removed simpagation occurrence code.
645 * TS: New input verification: duplicate constraint declaration
646 now reported as an error. Requested by Mike Elston.
647 * TS: More efficient matching code for ground constraints
648 when matching an argument of a partner constraint with
650 * JS: Bug fix in guard simplification.
654 * TS: Factored out option functionality into separate module.
655 * TS: Factored out utility code into separate module.
659 * TS: Changed chr_show_store/1 to use print/1 instead of write/1.
663 * TS: Removed spurious and conflicting operator definitions
664 for +, - and ? as mode declarations.
668 * TS: Added find_chr_constraint/1 functionality.
672 * TS: Improved compiler scalability: use nb_setval/2 to
673 remember compiled code through backtracking over
674 compilation process instead of assert/1.
675 * TS: Removed spurious comma from file.
679 * TS: Added option to disable toplevel constraint store printing.
680 * TS: Slightly improved hash table constraint store implementation.
684 * JW: Added patch from Jon Sneyers.
688 * TS: Improved head reordering heuristic.
689 * TS: Added support primitive for alternate built-in solver dependency.
693 * TS: Fixed bug that causes wrong output in chr_show_store.
697 * TS: Fixed several bugs in generation of debugable code.
701 * JW: Cleanup integration in SWI-Prolog environment:
702 - Extended SWI-Prolog library ordsets. Renamed ord_delete/3 to
703 ord_del_element/3 and ord_difference/3 to ord_subtract/3 for
704 better compatibility.
705 - Renamed module find to chr_find to avoid name conflict and declared
706 preds as meta-predicate.
707 - Re-inserted and exported strip_attributes/2 and
708 restore_attributes/2 in hprolog.pl. Deleted hprolog: from
710 - Added dummy option declarations to bootstrap compiler.
711 - Fixed path problems in makefile (-p chr=.) and install new
713 - Fixed typo 'chr show_store' --> chr_show_store.
717 * JS: Added guard entailment optimizations and
718 new syntax for type and mode declarations.
722 * TS: Use prolog:message/3 hook to automatically print
723 contents of CHR constraint stores with query bindings
728 * TS: Bugfix in code generation. Reported by Lyosha Ilyukhin.
732 * TS: Updated hashtable stores. They now start small and expand.
736 * JW: Removed chr_pp: module prefixes
737 * JW: Updated Windows makefile.mak (more similar organisation, added check)
741 * TS: Added chr_hashtable_store library.
742 * TS: Added find library.
743 * TS: Added builtins library.
744 * TS: Added clean_code library.
745 * TS: Added binomial_heap library.
746 * TS: Added a_star library.
747 * TS: Added new intermediate bootstrapping step
748 * TS: Synchronized CHR compiler with most recent development version
752 "The new version of the compiler contains several new optimizations, both
753 fully automatic, such as the antimonotny-based delay avoidance (see
754 http://www.cs.kuleuven.be/publicaties/rapporten/cw/CW385.abs.html for
755 the technical report), and enabled by mode declarations (see CHR
756 documentation), such as hashtable-based constraint indexes."
760 * JW: Added chr_messages.pl. Make all debug messages use the print_message/2
761 interface to enable future embedding.
765 * JW: Added chr:debug_interact/3 hook. Defined in chr_swi.pl to void
766 showing constraints first as goal and then as CHR call.
767 * JW: Added chr:debug_event/2 hook. Defined in chr_swi.pl to make the
768 CHR debugger honour a skip command from the Prolog tracer.
772 * JW: Added b (break) to the CHR debugger.
773 * TS: added chr_expandable/2 clause for pragma/2
777 * JW: fixed reference to format_rule/2.
778 * JW: Use select/3 rather than delete/3 in diff/2 in Tests/zebra.pl
779 * TS: CHR translation now leaves CHR store empty
783 * JW: added :- use_module(library(chr)) to all examples.
784 * JW: mapped -O --> option(optimize, full).
785 * JW: introduced file-search-path `chr' for clarity and to enable running
786 make check from the local environment instead of the public installation.
787 * JW: mapped prolog flag generate_debug_info --> option(debug, on)
788 * JW: Replaced the chr -> pl step with term_expansion/2.
789 * JW: Moved insert_declarations/2 to chr_swi.pl
793 * JW: fixed Undefined procedure: chr_runtime:run_suspensions_loop_d/1
794 * TS: Added <space> for creep and shortened debug line prefix to CHR:
798 * JW: Use \+ \+ in chr_compile/3 to undo changes to the constraint
799 pool. Regression test suite using "make check" works again.
803 * TS: Added skip and ancestor debug commands
807 * TS: Added bootstrapping process for CHR compiler using CHR.
808 * TS: CHR compiler now uses CHR.
809 * TS: Fixed bug in compilation of multi-headed simpagation rules.
810 * TS: Cleaned up compiler.
811 * TS: Added analysis + optimization for never attached constraints.
812 * TS: Exploit uniqueness (functional dependency) results to detect
813 set semantics type simpagation rules where one rule can be passive
814 * TS: Compiler generates 'chr debug_event'/1 calls
815 * TS: Rudimentary support for debugging.
816 option(debug,on) causes a trace of CHR events to be printed
820 * JW: Fix operator handling.
824 * JW: Integrated new version from Tom Schrijvers.