Article ID Journal Published Year Pages File Type
433933 Science of Computer Programming 2014 20 Pages PDF
Abstract

•Tor  adds orthogonal search control to Prolog.•Its library-based approach is light-weight and portable.•Modular is a key feature: search methods are compositional and user-extensible.•The overhead is negligible in typical CLP applications.

Horn Clause Programs have a natural exhaustive depth-first procedural semantics. However, for many programs this semantics is ineffective. In order to compute useful solutions, one needs the ability to modify the search method that explores the alternative execution branches.Tor, a well-defined hook into Prolog disjunction, provides this ability. It is light-weight thanks to its library approach and efficient because it is based on program transformation. Tor  is general enough to mimic search-modifying predicates like ECLiPSe’s search/6. Moreover, Tor  supports modular composition of search methods and other hooks. The Tor  library is already provided and used as an add-on to SWI-Prolog.

Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics