3 * TS: Bug fix: atomic_constants store was causing compiler
5 * TS: Clean-up and avoid adding additional global_ground store
6 if atomic_constants store covers all cases.
7 * TS: Clean-up and bug fix.
11 * TS: Performance improvement: use new store
12 implementation for multi-argument lookups
13 on manifest ground terms. Should be faster than
18 * TS: Performance improvement: use new store
19 implementation for single-argument lookups
20 on manifest atomics. Should be faster than
21 hashtable. Will be generalized to arbitrary
22 manifest ground lookups and non-manifest
23 atomically typed lookups .
27 * TS: Modified error messages of declare_stored_constraints
28 option, to distinguish between stored, temporarily stored
30 * TS: write/1, writeln/1 and format/2 are now treated as non-binding
32 * TS: Properly inline inthash constraint lookup.
36 * TS: Additional assertion # default(Goal) for the
37 declare_stored_constraints, which specifies that
38 an unconditional simplification rule for the constraint
39 must be added to the end of the program. The Goal
40 parameter specifies the goal of that rule, e.g.
41 true or fail or throw(...). Experimental.
45 * TS: Experimental option declare_stored_constraints for
46 telling the compiler to warn for stored constraints
47 that are not asserted to be stored. Use the
48 :- chr_constraint f(...) # stored.
49 notation for asserting that a constraint is expected to
54 * TS: Inline constraint lookup.
56 * TS: Precompile term hashing.
60 * TS: Code cleaning was hampered by line numbers.
61 Reported by Mike Elston.
65 * PVW: Bug fix in observation analysis.
66 * PVW: Consistency checks of experimental history pragma.
70 * TS: Lessened worst bottlenecks in CHR compiler,
71 in the guard simplification phase.
75 * TS: Experimental dynattr option, for dynamic size attribute terms.
79 * TS: Extended observation analysis (abstract interpretation)
80 to deal with disjunctions. With Paolo Tacchella.
84 * TS: Renamed hprolog:substitute/4 to substitute_eq/4, because of
85 name conflict with library(edit).
89 * TS: Use line numbers in error and warning messages.
93 * TS: Added maintenance of line numbers through CHR compilation
94 as an option: chr_option(line_numbers,on).
98 * TS: Bug fix: setarg/3 instantiation error reported by Mike Elston.
99 Caused by missing suspension argument in debug off, optimize off
104 * LDK: O(1) removal from hashtables, with experimental
105 chr_option(ht_removal,on).
109 * PVW: Bugfixes for optional use of CHR constraints in rule guards.
113 * PVW: Optional use of CHR constraints in rule guards.
117 * TS: Bug fix in compiler_errors.pl.
121 * TS: Bug fix in occurrence subsumption by Jon Sneyers.
125 * TS: New preprocessor feature.
127 * TS: Parametrization of experimental chr_identifier type.
133 * TS: Stronger static type checking.
135 * TS: Omitted buggy FD analysis from bootstrapping process.
141 * TS: Experimental chr_identifier type.
145 * TS: Allow for empty type definitions aka phantom types. These are
146 useful for some type-level tricks. A warning is issued so the
147 user can check whether a phantom type is intended. No other
148 phantom type-specific checks are in place yet.
150 * TS: Fixed static type checking of built-in types.
154 * TS: The dense_int type can now appear on the rhs of type alias
159 * TS: Fixed bug concerning matchings between ground and possibly
160 non-ground arguments.
164 * TS: Fixed a bug in code generation, overeager removal of a clause.
168 * TS: Refactored some code.
172 * TS: Add exception handler to initialize chr_leash in new threads.
176 * TS: Bug fix for programs in debugging mode.
180 * JW: Fixed make clean
181 * JW: Enlarged stacks to make build succeed
185 * JW: Add target ln-install
189 * TS: Fixed wrong arities in not inlined predicates. Mike Elston.
193 * TS: Code clean-up, more inlining, only generate used imports.
197 * TS: Inlining and more specialization of auxiliary predicates.
201 * TS: Fixed bug for constraints without rules in debug mode.
203 * TS: Compiler clean-up
205 * TS: Experimental var_assoc_store.
210 * TS: Various minor code generation improvements, including smaller
215 * TS: Absolutely no lock checking when check_guard_bindings is disabled.
219 * TS: Minor optimizations for (-) arguments.
221 * TS: Important optimization for awakening fewer suspended constraints
225 * TS: Fixed typo in static type checker.
227 * TS: Documented static and dynamic type checking.
231 * TS: Fixed bug (type alias related) in static type checker. Mike Elston.
233 * TS: Added static type checking on variable matching in rule heads.
235 * TS: Added static type checking on CHR constraints in rule bodies.
239 * TS: New (limited) compile time type checking of rule heads.
243 * TS: New experimental robustness feature in debug mode:
244 runtime type checking of CHR constraints.
248 * TS: Minor bug fixes.
252 * TS: Improved performance of ai_observation_analysis,
253 mainly via additional tabling and passive declarations.
257 * TS: Disabled some code only intended for SICStus.
259 * TS: Fixed bug in removal of constraints. Spotted by Leslie De Koninck.
263 * TS: Next fix to tracer. Cconstraints in propagation
264 rules are shown in textual order.
268 * TS: Next few fixes to tracer. Constraints in simpagation rules
269 are now shown on the right side of the backslash.
273 * TS: Synchronization with SICStus version of K.U.Leuven CHR.
275 * TS: First few fixes to tracer. Cconstraints in simplification
276 rules are shown in textual order. Constraint insertions
281 * TS: Termination bug fixed in guard_entailment.
283 * TS: Runtime library predicate run_suspensions is now specialized
284 per constraint, avoiding requirement of fixed suspension layout.
286 * TS: Further update to suspension term layout. Only constraints for
287 which the propagation history is used get a history field.
291 * TS: Ignore propagation rules with trivial body 'true'.
295 * TS: Guard entailment now first simplifies the formula it processes,
296 in order to reduce the number of disjunctions, to obtain a smaller
301 * TS: Bug fix by Jon Sneyers: type aliases now support built-in types.
302 Spotted by Mike Elston.
304 * TS: Small refactorings based on Ciao port experience.
306 * TS: Removed -singleton stylecheck option now that portray_clause
307 prints singleton variables as _.
311 * JW: Make library(chr) load its private stuff silent.
315 * TS: Bug fix: too many guards were locked.
319 * TS: Most runtime library predicates are now specialized
320 per constraint, avoiding generic =.. and lists code.
322 Mayor update to suspension term layout. Layout may now
323 differ from one constraint to the other. Some unused suspension
324 fields (continuation goal and generation number) are omitted.
325 Further analysis can remove more fields.
327 Default store constraints now each have
328 their own global variable: a list of all the suspensions.
329 Removal from this list is now O(1) thanks to setarg/1 and
330 back pointers in the suspension terms. This can cause time
331 time complexity improvements in solvers that always have
332 variable indexing on their constraints.
334 Ground, non-indexed constraints are now removed from
335 their global list store in O(1), as for the default store.
337 Minor bug fixes in a number of places.
341 * TS: Fixed subtle bug in ai_observation analysis,
342 that caused goal sequences to only generate
343 the optimistic default answer pattern, leading
344 to invalid 'not observed' conclusions.
345 * TS: Variable indexing/suspension analysis now ignores functor/3
346 in guards. Could be extended to other built-ins
347 that cause an error when arguments are not
348 properly instantiated.
352 * TS: Renamed global variable id to chr_id in chr_runtime.pl.
355 * JS: Synchronization with experimental version:
356 - minor optimizations, e.g. efficient lookups with statically known
358 - new alternative syntax for passive declarations
359 - new dense_int built-in type + underlying store
360 - new type alias definitions, like in Mercury
363 * BD: small changes in chr_compiler_options.pl and chr_translate.chr
364 affecting only the SICStus port
367 * BD: lots of changes related to porting to SICStus
368 * TS: Now exception/3 hook is only used in SWI-Prolog
372 * TS: Use exception/3 hook to catch undefined
373 global variables of chr_runtime.pl and CHR modules,
374 for multi-threaded programs and saved states.
378 * JW: Fix "make check" path issues.
379 * TS: Removed all is_chr_file tests when loading file.
383 * BD: chr_swi.pl: option(optimize --> :- chr_option(optimize
384 * TS: Removed obsolete experimental optimization option.
385 * TS: Correctly report variable pragmas!
386 * TS: No constraints declared is no longer a special case.
390 * BD: chr_swi.pl - use_module(hprolog added for SICStus port
391 * TS: Removed operator declaration for '::'. No longer used.
395 * TS: Removed chr_constraints declaration again, in favor
396 of only the chr_constraint declaration and modified
397 documentation accordingly.
398 * TS: Modified documentation based on recommendations of Bart Demoen.
399 * TS: Added chr_info/3 predicate to chr_compiler_errors, as suggested by
400 Jon Sneyers. Now print banner on calling compiler.
404 * TS: warnings are now written to user_error stream.
408 * TS: option and constraints declarations are now deprecated. They
409 are replaced by chr_option and chr_constraint(s).
410 * TR: Made an interface for warnings and errors. Errors now implemented
412 * TR: Revised documentation.
415 * BD: chr_translate.chr, chr_translate_bootstrap2.chr
416 mutables "abstracted"
417 * BD: chr_translate_bootstrap1.chr
418 atomic_concat - some duplicate code of it is in more than one file :-(
419 create_get_mutable definitions if-deffed
420 verbosity_on/0 for porting
422 definitions of init_store/2, get_store/2, update_store/2
423 and of make_init_store_goal/make_get_store_goal/make_update_store_goal
424 removed prolog_flag/3 (seemed nowhere used)
425 chr_translate_bootstrap2.chr
426 make_init_store_goal/make_get_store_goal/make_update_store_goal introduced
427 verbosity_on/0 for porting
428 chr_translate_bootstrap.pl
429 atom_concat -> atomic_concat
430 verbosity_on/0 for porting
431 conditional import van library(terms)
433 make_init_store_goal etc. introduced
434 create_get_mutable_ref wherever needed (chr_translate*)
438 * BD: chr_runtime.pl:
440 included contents of chr_debug.pl
442 create_mutable changed into 'chr create_mutable'
443 got rid of explicit inlining and did it by goal expansion
444 inlining also of 'chr default_store'
446 removed :- use_module(chr(chr_debug))
447 module header: version for SICStus
448 * BD: chr_debug.pl: emptied
449 * BD: chr_translate.chr:
450 system specific declarations factored out in insert_declarations
451 changed two atom_concat/3 into atomic_concat/3 (because arg 2 was sometimes an int)
452 * BD: chr_compiler_utility.pl:
453 put atomic_concat/3 there
454 adapted atom_concat_list/2 to use it
455 * BD: chr_swi_bootstrap.pl:
456 introduced chr_swi_bootstrap/2 for ease of porting
457 exported also chr_compile/3
458 porting code for get_time stuff/read_term/absolute_file_name
459 * BD: builtins.pl, a_star.pl, clean_code.pl:
464 * BD: hprolog.pl: removed strip_attributes/2 and restore_attributes/2
467 * BD: chr_swi.pl: Removed code that took Handler for Module (in chr_expand(end_of_file)
468 Added :- chr_option(_,_) with same meaning as option(_,_)
469 is_chr_file: .chr is no longer a recognised suffix
470 added use_module(library(lists))
471 changed calls to source_location/2 into prolog_load_context/2
472 * BD: chr_translate.chr: chr_translate/2: added end_of_file to translated program
473 adapted SICStus compatibility message
474 made :- chr_option(_,_) available
475 changed precedence of + - ? to 980 (these ops are
476 probably not local enough to the module)
480 * TS: Further synchronization with hProlog.
484 * TS: Removed dead code in guard_entailment.chr
485 * TS: Fixed performance bug: now lookup is indexed
486 on maximal number of arguments.
487 * TS: Removed some redundant intermediate predicates
489 * TS: It is now possible to disable the printing
490 of the CHR constraint store per module,
491 through the option toplevel_show_store on/off
492 * TS: Synchronized with hProlog
493 * TS: bug fix in functional dependency analysis
497 * TS: Removed two dead predicates in chr_translate.chr
498 and hooked up the late_storage_analysis
499 that was being bypassed.
500 * TS: Renamed global_term_ref_1 to default_store.
501 * TS: Removed redundant predicate values_ht.
502 * TS: Compiler no longer generates dead code for never stored constraints,
503 i.e. attach/detach predicates.
504 This reduces the generated .pl by about 700 lines.
508 * TS: Two more bug fixes for constraints without
509 active occurrences that trigger.
513 * TS: Small optimization of code for constraints
514 without any active occurrence.
515 * TS: Fixed bug caused by previous bug fix:
516 added only_ground_indexed_arguments/1 test
517 to separate out that meaning from may_trigger/1.
521 * TS: Removed strip_attributes code.
522 * TS: Fixed bug that causes new constraints to be added on triggering.
526 * TS: Two minor bug fixes.
530 * TS: Fixed bug due to overly aggressive inlining of get_mutable_value.
534 * JS: Compiled code is broken, if debug is off and optimize too.
535 Debug off now entails optimize on.
537 * TS: Some fixes of the documentation. Thanks to Bart Demoen
542 * TS: Synchronized with hProlog.
546 * TS: Added missing operator declarations for prefix (?).
550 * JW: import lists into chr_compiler_utility.pl
552 * JW: make message hook for query(yes) detect CHR global variables.
554 * JW: Exported pairlist_delete_eq/3 from pairlist and use this in
555 chr_hashtable_store.pl
559 * TS: Renamed pairlist:delete/3 to pairlist:pairlist_delete/3.
563 * TS: Extended more efficient ground matching code to
564 removed simpagation occurrence code.
568 * TS: New input verification: duplicate constraint declaration
569 now reported as an error. Requested by Mike Elston.
570 * TS: More efficient matching code for ground constraints
571 when matching an argument of a partner constraint with
573 * JS: Bug fix in guard simplification.
577 * TS: Factored out option functionality into separate module.
578 * TS: Factored out utility code into separate module.
582 * TS: Changed chr_show_store/1 to use print/1 instead of write/1.
586 * TS: Removed spurious and conflicting operator definitions
587 for +, - and ? as mode declarations.
591 * TS: Added find_chr_constraint/1 functionality.
595 * TS: Improved compiler scalability: use nb_setval/2 to
596 remember compiled code through backtracking over
597 compilation process instead of assert/1.
598 * TS: Removed spurious comma from file.
602 * TS: Added option to disable toplevel constraint store printing.
603 * TS: Slightly improved hash table constraint store implementation.
607 * JW: Added patch from Jon Sneyers.
611 * TS: Improved head reordering heuristic.
612 * TS: Added support primitive for alternate built-in solver dependency.
616 * TS: Fixed bug that causes wrong output in chr_show_store.
620 * TS: Fixed several bugs in generation of debugable code.
624 * JW: Cleanup integration in SWI-Prolog environment:
625 - Extended SWI-Prolog library ordsets. Renamed ord_delete/3 to
626 ord_del_element/3 and ord_difference/3 to ord_subtract/3 for
627 better compatibility.
628 - Renamed module find to chr_find to avoid name conflict and declared
629 preds as meta-predicate.
630 - Re-inserted and exported strip_attributes/2 and
631 restore_attributes/2 in hprolog.pl. Deleted hprolog: from
633 - Added dummy option declarations to bootstrap compiler.
634 - Fixed path problems in makefile (-p chr=.) and install new
636 - Fixed typo 'chr show_store' --> chr_show_store.
640 * JS: Added guard entailment optimizations and
641 new syntax for type and mode declarations.
645 * TS: Use prolog:message/3 hook to automatically print
646 contents of CHR constraint stores with query bindings
651 * TS: Bugfix in code generation. Reported by Lyosha Ilyukhin.
655 * TS: Updated hashtable stores. They now start small and expand.
659 * JW: Removed chr_pp: module prefixes
660 * JW: Updated Windows makefile.mak (more similar organisation, added check)
664 * TS: Added chr_hashtable_store library.
665 * TS: Added find library.
666 * TS: Added builtins library.
667 * TS: Added clean_code library.
668 * TS: Added binomial_heap library.
669 * TS: Added a_star library.
670 * TS: Added new intermediate bootstrapping step
671 * TS: Synchronized CHR compiler with most recent development version
675 "The new version of the compiler contains several new optimizations, both
676 fully automatic, such as the antimonotny-based delay avoidance (see
677 http://www.cs.kuleuven.be/publicaties/rapporten/cw/CW385.abs.html for
678 the technical report), and enabled by mode declarations (see CHR
679 documentation), such as hashtable-based constraint indexes."
683 * JW: Added chr_messages.pl. Make all debug messages use the print_message/2
684 interface to enable future embedding.
688 * JW: Added chr:debug_interact/3 hook. Defined in chr_swi.pl to void
689 showing constraints first as goal and then as CHR call.
690 * JW: Added chr:debug_event/2 hook. Defined in chr_swi.pl to make the
691 CHR debugger honour a skip command from the Prolog tracer.
695 * JW: Added b (break) to the CHR debugger.
696 * TS: added chr_expandable/2 clause for pragma/2
700 * JW: fixed reference to format_rule/2.
701 * JW: Use select/3 rather than delete/3 in diff/2 in Tests/zebra.pl
702 * TS: CHR translation now leaves CHR store empty
706 * JW: added :- use_module(library(chr)) to all examples.
707 * JW: mapped -O --> option(optimize, full).
708 * JW: introduced file-search-path `chr' for clarity and to enable running
709 make check from the local environment instead of the public installation.
710 * JW: mapped prolog flag generate_debug_info --> option(debug, on)
711 * JW: Replaced the chr -> pl step with term_expansion/2.
712 * JW: Moved insert_declarations/2 to chr_swi.pl
716 * JW: fixed Undefined procedure: chr_runtime:run_suspensions_loop_d/1
717 * TS: Added <space> for creep and shortened debug line prefix to CHR:
721 * JW: Use \+ \+ in chr_compile/3 to undo changes to the constraint
722 pool. Regression test suite using "make check" works again.
726 * TS: Added skip and ancestor debug commands
730 * TS: Added bootstrapping process for CHR compiler using CHR.
731 * TS: CHR compiler now uses CHR.
732 * TS: Fixed bug in compilation of multi-headed simpagation rules.
733 * TS: Cleaned up compiler.
734 * TS: Added analysis + optimization for never attached constraints.
735 * TS: Exploit uniqueness (functional dependency) results to detect
736 set semantics type simpagation rules where one rule can be passive
737 * TS: Compiler generates 'chr debug_event'/1 calls
738 * TS: Rudimentary support for debugging.
739 option(debug,on) causes a trace of CHR events to be printed
743 * JW: Fix operator handling.
747 * JW: Integrated new version from Tom Schrijvers.