Abstract

A compilative approach for forward reasoning of horn rules in Prolog is presented. Pure horn rules - given as Prolog clauses - are to be used for forward and backward reasoning. These rules are translated into Prolog clauses, denoting one forward reasoning step. Forward chaining is triggered by an initial fact, from which the consequences are derived. Premises of forward rules are verified by Prolog's backward proof procedure using the original clauses. Thus, without any changes to the Prolog interpreter integrated bidirectional reasoning of the original horn rules is possible. Breadth-first and depth-first reasoning strategies with enumeration and collection of conclusions are implemented. In order to translate forward clauses into WAM operations several improvements are introduced. To avoid inefficient changes of program code derived facts are recorded in a special storage area called retain stack. Subsumption of a new conclusion by previously derived facts is tested by a built-in procedure. As a reasonable application of this kind of forward reasoning its use is demonstrated for integrity constraint checking.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.