The design of a virtual fact base for Prolog
Files
TR Number
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
The fact and rule list internal to Prolog is capable of handling as many facts as available memory resources permit. A solution to this limitation is to store facts on disk, retrieving them into a main memory database buffer only as needed. Allocating a fixed portion of main memory to buffer database facts frees up scarce main memory for more frequently accessed rules and data structures internal to Prolog. The Prolog Database System built in connection with this project transparently stores and retrieves facts on disk and evaluates them in the order they were asserted allowing for the transfer of existing small scale prototypes into large scale production systems.
Since existing relational database techniques were not designed to function in a Prolog environment where facts are evaluated in database facilities were designed, developed, and integrated into Prolog. These database facilities include a unique page replacement policy designed to minimize expensive page faults during the execution of a Prolog program. The look ahead page replacement policy looks ahead on database pages while they are in main memory in order to determine whether they are likely to be accessed again in the future. In this way, a near optimal working set of database pages is maintained in the database buffer, assisting with minimizing expensive page faults.