Fluents: A Refactoring of Prolog for Uniform Reflection an Interoperation with External Objects

  • Authors:
  • Paul Tarau

  • Affiliations:
  • -

  • Venue:
  • CL '00 Proceedings of the First International Conference on Computational Logic
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

On top of a simple kernel (Horn Clause Interpreters with LD-resolution) we introduce Fluents, high level stateful objects which empower and simplify the architecture of logic programming languages through reflection of the underlying interpreter, while providing uniform interoperation patterns with object oriented and procedural languages. We design a Fluent class hierarchy which includes first-class stateful objects representing the meta-level Horn Clause Interpreters, file, URL, socket Readers and Writers, as well as data structures like terms and lists, with high-level operations directly mapped to iterative constructs in the underlying implementation language. Fluents melt naturally in the fabric of Logic Programming languages and provide elegant composition operations, reusability, resource recovery on backtracking and persistence. The Web site of our Kernel Prolog prototype, http://www.binnetcorp.com/kprolog/Main.html allows the reader to try out online the examples discussed in this paper.