Mode-Directed Tabling and Applications in the YapTab System

João Santos and Ricardo Rocha

June 2012


Abstract

Tabling is an implementation technique that solves some limitations of Prolog's operational semantics in dealing with recursion and redundant sub-computations. Tabling works by memorizing generated answers and then by reusing them on similar calls that appear during the resolution process. In a traditional tabling system, all the arguments of a tabled subgoal call are considered when storing answers into the table space. Traditional tabling systems are thus very good for problems that require finding all answers. Mode-directed tabling is an extension to the tabling technique that supports the definition of selective criteria for specifying how answers are inserted into the table space. Implementations of mode-directed tabling are already available in systems like ALS-Prolog, B-Prolog and XSB. In this paper, we propose a more general approach to the declaration and use of mode-directed tabling, implemented on top of the YapTab tabling system, and we show applications of our approach to problems involving Justification, Preferences and Answer Subsumption.

Bibtex

@InProceedings{santos-slate12,
  author =    {J. Santos and R. Rocha},
  title =     {{Mode-Directed Tabling and Applications in the YapTab System}},
  booktitle = {Proceedings of the Symposium on Languages, Applications and Technologies (SLATE 2012)},
  pages =     {25--40},
  editor =    {A. Simões and R. Queirós and  D. Cruz},
  month =     {June},
  year =      {2012},
  address =   {Braga, Portugal},
}

Download Paper

PDF file
OASIcs OpenAccess Series in Informatics