This new release brings much faster dynamic predicates, prolog flags to deal with them, and a few improvements due to customer requests which we gratefully acknowledge. CORBA was added into the set of provided extensions.
Dynamic predicates (see dynamic, asserta, assertz, retract) are now implemented with smart indexing. Customer applications which make heavy use of dynamic predicates showed a performance increase of two orders of magnitude over previous versions of MINERVA.
A word about indexing in MINERVA: indexing is a general word for a variety of methods to increase access speed to collections of data from linear resp exponential to constant resp logarithmic time. In MINERVA there are 3 forms of data: compiled predicates, dynamic predicates, and blackboards.
For compiled predicates, "first argument indexing" is used for collections of predicates where the first argument is not a variable. Indexing works on the functor and arity of the predicate and the functor of the first argument, deeper parts of a term are not used.
For dynamic predicates, "smart indexing" is done whenever MINERVA considers it worthwhile over all arguments which are never asserted as a variable. Indexing works on the functor and arity of the predicate and the functor of the targeted arguments, deeper parts of a term are not used.
For data stored in blackboards, "exhaustive indexing" is done over the key: the whole term, incuding its deeper parts, is used as material for indexing.
Programming Hints:
1) Indexing can only be performed for data sets that are "ground" i.e. not variables in the important locations. Indexing something like:
a(1). a(2). a(X) :- X = undetermined. % catch-all casewill NOT result in the desired speedup. This is a BAD example.
2) Access to indexed data sets is only fast if the key is actually used. Compare:
Data: male(eric). male(kentaro). : female(mika). female(sonya). : Program: % GOOD % BAD ?- male(charles). ?- male(X), X = kaori.
set_prolog_flag knows 'unknown' with possible values error, warning and fail.
get_prolog_flag knows 'max_arity' and 'unknown'.
In violation of the ISO Standard for Prolog, the first argument to get_prolog_flag must be instantiated.
Upon a customer complaint the implementation of sort/2 was replaced with a highly efficient and better behaved version.
Upon request we added the source and precompiled MINERVA predicates to access CORBA. See ExamplePrograms/Extensions/CORBA/
Please also re-read the Release Notes of previous versions of MINERVA. You have feedback on this release or requests for the next? Please let us know!