B-Prolog 6.9Version of implementation B-Prolog of programming language Prolog
A version of B-Prolog, released on September 21, 2006.
- New memory manager allows automatic expansion of stacks (local and trail), heap, and other areas (table and program).
- Changes make version 6.9 pass Peter Szabo and Peter Sszeredi’s ISO Prolog compliance test suite.
- New built-in predicates: select/3, nextto/3, delete/3, nth0/3, nth1/3, last/2, permutation/2, flatten/2, sumlist/2, numlist/3, is_set/1, eliminate_duplicate/2, intersection/3, union/3, subset/2, subtract/3, and forall/2.
- New global constraints: scalar_product/4 and global_cardinality/2.
- copy_term/2, findall/3, setof/3, and bagof/3 now allow suspension variables in terms.
- New attributed variables: attvar/1,put_attr/3,get_attr/3,and del_attr/2.
- copy_term_nat/2 added.
- Improvements to let large clauses be compiled and asserted.
- An action rule can now specify multiple event patterns of event(X,O) as long as the second arguments of the patterns share the same variable.
- The post_event(Channels,O) can post the event object O to conjunctive and disjunctive channels. For a conjunctive channel (C1 / C2), only agents attached to both channel C1 and channel C2 receive the event. The call post_event(C1/C2,O) posts the event to agents on both channels.
- The primitive post_event_df(Channels,O) is similar to post_event(Channels,O) but agents on the channels are activated one at a time. While post_event does breadth-first posting, post_event_df does depth-first posting. The post_event_df(Channels,Flag,O) stops posting the event to the agents once Flag becomes non-variable.
- Improvement of the unification procedure for suspension variables
- event(X,O) can co-exist with ins events in action rules.
- Bug fixes: setarg, global_heap_get/set, memory manager
- Bug fixes in action rules and in declaration of predefined predicates.
- Changes needed to port Leuven version of CHR to B-Prolog (added option @ in format, term_variables/2, and portray_clause/[1,2]).
- Added primitives for global heap variables (global_heap_get/2 and global_heap_set/2). The primitives on global heap variables can be used to implement term_ref/2 in GNU Prolog and (partially) b_setval/2 and b_getval/2 in SWI-Prolog.
- Environment variables are allowed in file names for compile/1, cl/1, consult/1, load/1, tell/1, and see/1.
- Initialization code is executed after each binary code module in a file if the file contains multiple modules.