More declarative tabling in Prolog using multi-prompt delimited control

08/23/2017
by   Samer Abdallah, et al.
0

Several Prolog implementations include a facility for tabling, an alternative resolution strategy which uses memoisation to avoid redundant duplication of computations. Until relatively recently, tabling has required either low-level support in the underlying Prolog engine, or extensive program transormation (de Guzman et al., 2008). An alternative approach is to augment Prolog with low level support for continuation capturing control operators, particularly delimited continuations, which have been investigated in the field of functional programming and found to be capable of supporting a wide variety of computational effects within an otherwise declarative language. This technical report describes an implementation of tabling in SWI Prolog based on delimited control operators for Prolog recently introduced by Schrijvers et al. (2013). In comparison with a previous implementation of tabling for SWI Prolog using delimited control (Desouter et al., 2015), this approach, based on the functional memoising parser combinators of Johnson (1995), stays closer to the declarative core of Prolog, requires less code, and is able to deliver solutions from systems of tabled predicates incrementally (as opposed to finding all solutions before delivering any to the rest of the program). A collection of benchmarks shows that a small number of carefully targeted optimisations yields performance within a factor of about 2 of the optimised version of Desouter et al.'s system currently included in SWI Prolog.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/16/2020

Exact Trend Control in Estimating Treatment Effects Using Panel Data with Heterogenous Trends

For a panel model considered by Abadie et al. (2010), the counterfactual...
research
10/16/2019

Efficiency through Auto-Sizing: Notre Dame NLP's Submission to the WNGT 2019 Efficiency Task

This paper describes the Notre Dame Natural Language Processing Group's ...
research
03/29/2016

Compilation as a Typed EDSL-to-EDSL Transformation

This article is about an implementation and compilation technique that i...
research
04/25/2022

Natural Language to Code Translation with Execution

Generative models of code, pretrained on large corpora of programs, have...
research
09/23/2019

NLVR2 Visual Bias Analysis

NLVR2 (Suhr et al., 2019) was designed to be robust for language bias th...
research
04/24/2018

A comparison of methods for modeling marginal non-zero daily rainfall across the Australian continent

Naveau et al. (2016) have recently developed a class of methods, based o...
research
02/18/2018

Efficient Gradual Typing

Gradual typing combines static and dynamic typing in the same program. O...

Please sign up or login with your details

Forgot password? Click here to reset