3 * TS: Performance improvement: use new store
4 implementation for multi-argument lookups
5 on manifest ground terms. Should be faster than
10 * TS: Performance improvement: use new store
11 implementation for single-argument lookups
12 on manifest atomics. Should be faster than
13 hashtable. Will be generalized to arbitrary
14 manifest ground lookups and non-manifest
15 atomically typed lookups .
19 * TS: Modified error messages of declare_stored_constraints
20 option, to distinguish between stored, temporarily stored
22 * TS: write/1, writeln/1 and format/2 are now treated as non-binding
24 * TS: Properly inline inthash constraint lookup.
28 * TS: Additional assertion # default(Goal) for the
29 declare_stored_constraints, which specifies that
30 an unconditional simplification rule for the constraint
31 must be added to the end of the program. The Goal
32 parameter specifies the goal of that rule, e.g.
33 true or fail or throw(...). Experimental.
37 * TS: Experimental option declare_stored_constraints for
38 telling the compiler to warn for stored constraints
39 that are not asserted to be stored. Use the
40 :- chr_constraint f(...) # stored.
41 notation for asserting that a constraint is expected to
46 * TS: Inline constraint lookup.
48 * TS: Precompile term hashing.
52 * TS: Code cleaning was hampered by line numbers.
53 Reported by Mike Elston.
57 * PVW: Bug fix in observation analysis.
58 * PVW: Consistency checks of experimental history pragma.
62 * TS: Lessened worst bottlenecks in CHR compiler,
63 in the guard simplification phase.
67 * TS: Experimental dynattr option, for dynamic size attribute terms.
71 * TS: Extended observation analysis (abstract interpretation)
72 to deal with disjunctions. With Paolo Tacchella.
76 * TS: Renamed hprolog:substitute/4 to substitute_eq/4, because of
77 name conflict with library(edit).
81 * TS: Use line numbers in error and warning messages.
85 * TS: Added maintenance of line numbers through CHR compilation
86 as an option: chr_option(line_numbers,on).
90 * TS: Bug fix: setarg/3 instantiation error reported by Mike Elston.
91 Caused by missing suspension argument in debug off, optimize off
96 * LDK: O(1) removal from hashtables, with experimental
97 chr_option(ht_removal,on).
101 * PVW: Bugfixes for optional use of CHR constraints in rule guards.
105 * PVW: Optional use of CHR constraints in rule guards.
109 * TS: Bug fix in compiler_errors.pl.
113 * TS: Bug fix in occurrence subsumption by Jon Sneyers.
117 * TS: New preprocessor feature.
119 * TS: Parametrization of experimental chr_identifier type.
125 * TS: Stronger static type checking.
127 * TS: Omitted buggy FD analysis from bootstrapping process.
133 * TS: Experimental chr_identifier type.
137 * TS: Allow for empty type definitions aka phantom types. These are
138 useful for some type-level tricks. A warning is issued so the
139 user can check whether a phantom type is intended. No other
140 phantom type-specific checks are in place yet.
142 * TS: Fixed static type checking of built-in types.
146 * TS: The dense_int type can now appear on the rhs of type alias
151 * TS: Fixed bug concerning matchings between ground and possibly
152 non-ground arguments.
156 * TS: Fixed a bug in code generation, overeager removal of a clause.
160 * TS: Refactored some code.
164 * TS: Add exception handler to initialize chr_leash in new threads.
168 * TS: Bug fix for programs in debugging mode.
172 * JW: Fixed make clean
173 * JW: Enlarged stacks to make build succeed
177 * JW: Add target ln-install
181 * TS: Fixed wrong arities in not inlined predicates. Mike Elston.
185 * TS: Code clean-up, more inlining, only generate used imports.
189 * TS: Inlining and more specialization of auxiliary predicates.
193 * TS: Fixed bug for constraints without rules in debug mode.
195 * TS: Compiler clean-up
197 * TS: Experimental var_assoc_store.
202 * TS: Various minor code generation improvements, including smaller
207 * TS: Absolutely no lock checking when check_guard_bindings is disabled.
211 * TS: Minor optimizations for (-) arguments.
213 * TS: Important optimization for awakening fewer suspended constraints
217 * TS: Fixed typo in static type checker.
219 * TS: Documented static and dynamic type checking.
223 * TS: Fixed bug (type alias related) in static type checker. Mike Elston.
225 * TS: Added static type checking on variable matching in rule heads.
227 * TS: Added static type checking on CHR constraints in rule bodies.
231 * TS: New (limited) compile time type checking of rule heads.
235 * TS: New experimental robustness feature in debug mode:
236 runtime type checking of CHR constraints.
240 * TS: Minor bug fixes.
244 * TS: Improved performance of ai_observation_analysis,
245 mainly via additional tabling and passive declarations.
249 * TS: Disabled some code only intended for SICStus.
251 * TS: Fixed bug in removal of constraints. Spotted by Leslie De Koninck.
255 * TS: Next fix to tracer. Cconstraints in propagation
256 rules are shown in textual order.
260 * TS: Next few fixes to tracer. Constraints in simpagation rules
261 are now shown on the right side of the backslash.
265 * TS: Synchronization with SICStus version of K.U.Leuven CHR.
267 * TS: First few fixes to tracer. Cconstraints in simplification
268 rules are shown in textual order. Constraint insertions
273 * TS: Termination bug fixed in guard_entailment.
275 * TS: Runtime library predicate run_suspensions is now specialized
276 per constraint, avoiding requirement of fixed suspension layout.
278 * TS: Further update to suspension term layout. Only constraints for
279 which the propagation history is used get a history field.
283 * TS: Ignore propagation rules with trivial body 'true'.
287 * TS: Guard entailment now first simplifies the formula it processes,
288 in order to reduce the number of disjunctions, to obtain a smaller
293 * TS: Bug fix by Jon Sneyers: type aliases now support built-in types.
294 Spotted by Mike Elston.
296 * TS: Small refactorings based on Ciao port experience.
298 * TS: Removed -singleton stylecheck option now that portray_clause
299 prints singleton variables as _.
303 * JW: Make library(chr) load its private stuff silent.
307 * TS: Bug fix: too many guards were locked.
311 * TS: Most runtime library predicates are now specialized
312 per constraint, avoiding generic =.. and lists code.
314 Mayor update to suspension term layout. Layout may now
315 differ from one constraint to the other. Some unused suspension
316 fields (continuation goal and generation number) are omitted.
317 Further analysis can remove more fields.
319 Default store constraints now each have
320 their own global variable: a list of all the suspensions.
321 Removal from this list is now O(1) thanks to setarg/1 and
322 back pointers in the suspension terms. This can cause time
323 time complexity improvements in solvers that always have
324 variable indexing on their constraints.
326 Ground, non-indexed constraints are now removed from
327 their global list store in O(1), as for the default store.
329 Minor bug fixes in a number of places.
333 * TS: Fixed subtle bug in ai_observation analysis,
334 that caused goal sequences to only generate
335 the optimistic default answer pattern, leading
336 to invalid 'not observed' conclusions.
337 * TS: Variable indexing/suspension analysis now ignores functor/3
338 in guards. Could be extended to other built-ins
339 that cause an error when arguments are not
340 properly instantiated.
344 * TS: Renamed global variable id to chr_id in chr_runtime.pl.
347 * JS: Synchronization with experimental version:
348 - minor optimizations, e.g. efficient lookups with statically known
350 - new alternative syntax for passive declarations
351 - new dense_int built-in type + underlying store
352 - new type alias definitions, like in Mercury
355 * BD: small changes in chr_compiler_options.pl and chr_translate.chr
356 affecting only the SICStus port
359 * BD: lots of changes related to porting to SICStus
360 * TS: Now exception/3 hook is only used in SWI-Prolog
364 * TS: Use exception/3 hook to catch undefined
365 global variables of chr_runtime.pl and CHR modules,
366 for multi-threaded programs and saved states.
370 * JW: Fix "make check" path issues.
371 * TS: Removed all is_chr_file tests when loading file.
375 * BD: chr_swi.pl: option(optimize --> :- chr_option(optimize
376 * TS: Removed obsolete experimental optimization option.
377 * TS: Correctly report variable pragmas!
378 * TS: No constraints declared is no longer a special case.
382 * BD: chr_swi.pl - use_module(hprolog added for SICStus port
383 * TS: Removed operator declaration for '::'. No longer used.
387 * TS: Removed chr_constraints declaration again, in favor
388 of only the chr_constraint declaration and modified
389 documentation accordingly.
390 * TS: Modified documentation based on recommendations of Bart Demoen.
391 * TS: Added chr_info/3 predicate to chr_compiler_errors, as suggested by
392 Jon Sneyers. Now print banner on calling compiler.
396 * TS: warnings are now written to user_error stream.
400 * TS: option and constraints declarations are now deprecated. They
401 are replaced by chr_option and chr_constraint(s).
402 * TR: Made an interface for warnings and errors. Errors now implemented
404 * TR: Revised documentation.
407 * BD: chr_translate.chr, chr_translate_bootstrap2.chr
408 mutables "abstracted"
409 * BD: chr_translate_bootstrap1.chr
410 atomic_concat - some duplicate code of it is in more than one file :-(
411 create_get_mutable definitions if-deffed
412 verbosity_on/0 for porting
414 definitions of init_store/2, get_store/2, update_store/2
415 and of make_init_store_goal/make_get_store_goal/make_update_store_goal
416 removed prolog_flag/3 (seemed nowhere used)
417 chr_translate_bootstrap2.chr
418 make_init_store_goal/make_get_store_goal/make_update_store_goal introduced
419 verbosity_on/0 for porting
420 chr_translate_bootstrap.pl
421 atom_concat -> atomic_concat
422 verbosity_on/0 for porting
423 conditional import van library(terms)
425 make_init_store_goal etc. introduced
426 create_get_mutable_ref wherever needed (chr_translate*)
430 * BD: chr_runtime.pl:
432 included contents of chr_debug.pl
434 create_mutable changed into 'chr create_mutable'
435 got rid of explicit inlining and did it by goal expansion
436 inlining also of 'chr default_store'
438 removed :- use_module(chr(chr_debug))
439 module header: version for SICStus
440 * BD: chr_debug.pl: emptied
441 * BD: chr_translate.chr:
442 system specific declarations factored out in insert_declarations
443 changed two atom_concat/3 into atomic_concat/3 (because arg 2 was sometimes an int)
444 * BD: chr_compiler_utility.pl:
445 put atomic_concat/3 there
446 adapted atom_concat_list/2 to use it
447 * BD: chr_swi_bootstrap.pl:
448 introduced chr_swi_bootstrap/2 for ease of porting
449 exported also chr_compile/3
450 porting code for get_time stuff/read_term/absolute_file_name
451 * BD: builtins.pl, a_star.pl, clean_code.pl:
456 * BD: hprolog.pl: removed strip_attributes/2 and restore_attributes/2
459 * BD: chr_swi.pl: Removed code that took Handler for Module (in chr_expand(end_of_file)
460 Added :- chr_option(_,_) with same meaning as option(_,_)
461 is_chr_file: .chr is no longer a recognised suffix
462 added use_module(library(lists))
463 changed calls to source_location/2 into prolog_load_context/2
464 * BD: chr_translate.chr: chr_translate/2: added end_of_file to translated program
465 adapted SICStus compatibility message
466 made :- chr_option(_,_) available
467 changed precedence of + - ? to 980 (these ops are
468 probably not local enough to the module)
472 * TS: Further synchronization with hProlog.
476 * TS: Removed dead code in guard_entailment.chr
477 * TS: Fixed performance bug: now lookup is indexed
478 on maximal number of arguments.
479 * TS: Removed some redundant intermediate predicates
481 * TS: It is now possible to disable the printing
482 of the CHR constraint store per module,
483 through the option toplevel_show_store on/off
484 * TS: Synchronized with hProlog
485 * TS: bug fix in functional dependency analysis
489 * TS: Removed two dead predicates in chr_translate.chr
490 and hooked up the late_storage_analysis
491 that was being bypassed.
492 * TS: Renamed global_term_ref_1 to default_store.
493 * TS: Removed redundant predicate values_ht.
494 * TS: Compiler no longer generates dead code for never stored constraints,
495 i.e. attach/detach predicates.
496 This reduces the generated .pl by about 700 lines.
500 * TS: Two more bug fixes for constraints without
501 active occurrences that trigger.
505 * TS: Small optimization of code for constraints
506 without any active occurrence.
507 * TS: Fixed bug caused by previous bug fix:
508 added only_ground_indexed_arguments/1 test
509 to separate out that meaning from may_trigger/1.
513 * TS: Removed strip_attributes code.
514 * TS: Fixed bug that causes new constraints to be added on triggering.
518 * TS: Two minor bug fixes.
522 * TS: Fixed bug due to overly aggressive inlining of get_mutable_value.
526 * JS: Compiled code is broken, if debug is off and optimize too.
527 Debug off now entails optimize on.
529 * TS: Some fixes of the documentation. Thanks to Bart Demoen
534 * TS: Synchronized with hProlog.
538 * TS: Added missing operator declarations for prefix (?).
542 * JW: import lists into chr_compiler_utility.pl
544 * JW: make message hook for query(yes) detect CHR global variables.
546 * JW: Exported pairlist_delete_eq/3 from pairlist and use this in
547 chr_hashtable_store.pl
551 * TS: Renamed pairlist:delete/3 to pairlist:pairlist_delete/3.
555 * TS: Extended more efficient ground matching code to
556 removed simpagation occurrence code.
560 * TS: New input verification: duplicate constraint declaration
561 now reported as an error. Requested by Mike Elston.
562 * TS: More efficient matching code for ground constraints
563 when matching an argument of a partner constraint with
565 * JS: Bug fix in guard simplification.
569 * TS: Factored out option functionality into separate module.
570 * TS: Factored out utility code into separate module.
574 * TS: Changed chr_show_store/1 to use print/1 instead of write/1.
578 * TS: Removed spurious and conflicting operator definitions
579 for +, - and ? as mode declarations.
583 * TS: Added find_chr_constraint/1 functionality.
587 * TS: Improved compiler scalability: use nb_setval/2 to
588 remember compiled code through backtracking over
589 compilation process instead of assert/1.
590 * TS: Removed spurious comma from file.
594 * TS: Added option to disable toplevel constraint store printing.
595 * TS: Slightly improved hash table constraint store implementation.
599 * JW: Added patch from Jon Sneyers.
603 * TS: Improved head reordering heuristic.
604 * TS: Added support primitive for alternate built-in solver dependency.
608 * TS: Fixed bug that causes wrong output in chr_show_store.
612 * TS: Fixed several bugs in generation of debugable code.
616 * JW: Cleanup integration in SWI-Prolog environment:
617 - Extended SWI-Prolog library ordsets. Renamed ord_delete/3 to
618 ord_del_element/3 and ord_difference/3 to ord_subtract/3 for
619 better compatibility.
620 - Renamed module find to chr_find to avoid name conflict and declared
621 preds as meta-predicate.
622 - Re-inserted and exported strip_attributes/2 and
623 restore_attributes/2 in hprolog.pl. Deleted hprolog: from
625 - Added dummy option declarations to bootstrap compiler.
626 - Fixed path problems in makefile (-p chr=.) and install new
628 - Fixed typo 'chr show_store' --> chr_show_store.
632 * JS: Added guard entailment optimizations and
633 new syntax for type and mode declarations.
637 * TS: Use prolog:message/3 hook to automatically print
638 contents of CHR constraint stores with query bindings
643 * TS: Bugfix in code generation. Reported by Lyosha Ilyukhin.
647 * TS: Updated hashtable stores. They now start small and expand.
651 * JW: Removed chr_pp: module prefixes
652 * JW: Updated Windows makefile.mak (more similar organisation, added check)
656 * TS: Added chr_hashtable_store library.
657 * TS: Added find library.
658 * TS: Added builtins library.
659 * TS: Added clean_code library.
660 * TS: Added binomial_heap library.
661 * TS: Added a_star library.
662 * TS: Added new intermediate bootstrapping step
663 * TS: Synchronized CHR compiler with most recent development version
667 "The new version of the compiler contains several new optimizations, both
668 fully automatic, such as the antimonotny-based delay avoidance (see
669 http://www.cs.kuleuven.be/publicaties/rapporten/cw/CW385.abs.html for
670 the technical report), and enabled by mode declarations (see CHR
671 documentation), such as hashtable-based constraint indexes."
675 * JW: Added chr_messages.pl. Make all debug messages use the print_message/2
676 interface to enable future embedding.
680 * JW: Added chr:debug_interact/3 hook. Defined in chr_swi.pl to void
681 showing constraints first as goal and then as CHR call.
682 * JW: Added chr:debug_event/2 hook. Defined in chr_swi.pl to make the
683 CHR debugger honour a skip command from the Prolog tracer.
687 * JW: Added b (break) to the CHR debugger.
688 * TS: added chr_expandable/2 clause for pragma/2
692 * JW: fixed reference to format_rule/2.
693 * JW: Use select/3 rather than delete/3 in diff/2 in Tests/zebra.pl
694 * TS: CHR translation now leaves CHR store empty
698 * JW: added :- use_module(library(chr)) to all examples.
699 * JW: mapped -O --> option(optimize, full).
700 * JW: introduced file-search-path `chr' for clarity and to enable running
701 make check from the local environment instead of the public installation.
702 * JW: mapped prolog flag generate_debug_info --> option(debug, on)
703 * JW: Replaced the chr -> pl step with term_expansion/2.
704 * JW: Moved insert_declarations/2 to chr_swi.pl
708 * JW: fixed Undefined procedure: chr_runtime:run_suspensions_loop_d/1
709 * TS: Added <space> for creep and shortened debug line prefix to CHR:
713 * JW: Use \+ \+ in chr_compile/3 to undo changes to the constraint
714 pool. Regression test suite using "make check" works again.
718 * TS: Added skip and ancestor debug commands
722 * TS: Added bootstrapping process for CHR compiler using CHR.
723 * TS: CHR compiler now uses CHR.
724 * TS: Fixed bug in compilation of multi-headed simpagation rules.
725 * TS: Cleaned up compiler.
726 * TS: Added analysis + optimization for never attached constraints.
727 * TS: Exploit uniqueness (functional dependency) results to detect
728 set semantics type simpagation rules where one rule can be passive
729 * TS: Compiler generates 'chr debug_event'/1 calls
730 * TS: Rudimentary support for debugging.
731 option(debug,on) causes a trace of CHR events to be printed
735 * JW: Fix operator handling.
739 * JW: Integrated new version from Tom Schrijvers.