Did you know ... Search Documentation:
Pack index_util -- prolog/index_util.pl
PublicShow source
 materialize_index(+Term) is det
materialize and index a set of facts, using first-argument indexing. Term follows the same structure as in index/1. E.g.

assumes that my_fact(?,?,?,?) can be exhaustively enumerated.

 materialize_index_to_path(+Term, +Dir)

Dir is expanded using absolute_file_name/2

 materialize_indexes_to_file(+Terms:list, +File) is det
if File does not exist, materializes a set of indexes and caches results in File.

if File does exist, consults File loading as extensional facts, and materializes in-memory index

note that this does not write the full index to file; just the main goal. When an index is re-used, the materialization step is still called. Thus there is only a benefit to using this when Terms contains intensional predicates.

 materialize_goal_to_file(+G:term, F) is det
 materialize_goals_to_file(+Goals:list, F) is det

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 materialize_index(Arg1, Arg2)
 materialize_indexes_to_path(Arg1, Arg2)
 materialize_index_to_file(Arg1, Arg2)
 materialize_index_to_file(Arg1, Arg2, Arg3)
 materialize_indexes_to_file(Arg1, Arg2, Arg3)
 materialize_index_to_stream(Arg1, Arg2)