Title
Tabling in mercury: design and implementation
Abstract
For any LP system, tabling can be quite handy in a variety of tasks, especially if it is efficiently implemented and fully integrated in the language. Implementing tabling in Mercury poses special challenges for several reasons. First, Mercury is both semantically and culturally quite different from Prolog. While decreeing that tabled predicates must not include cuts is acceptable in a Prolog system, it is not acceptable in Mercury, since if-then-elses and existential quantification have sound semantics for stratified programs and are used very frequently both by programmers and by the compiler. The Mercury implementation thus has no option but to handle interactions of tabling with Mercury’s language features safely. Second, the Mercury implementation is vastly different from the WAM, and many of the differences (e.g. the absence of a trail) have significant impact on the implementation of tabling. In this paper, we describe how we adapted the copying approach to tabling to implement tabling in Mercury.
Year
DOI
Venue
2006
10.1007/11603023_11
PADL
Keywords
Field
DocType
mercury implementation,stratified program,special challenge,significant impact,implementing tabling,existential quantification,copying approach,prolog system,lp system,sound semantics,computer science
Mercury (element),Logic program,Programming language,Existential quantification,Computer science,Copying,Compiler,Prolog,Semantics,Hash table
Conference
Volume
ISSN
ISBN
3819
0302-9743
3-540-30947-0
Citations 
PageRank 
References 
16
0.82
8
Authors
2
Name
Order
Citations
PageRank
Zoltan Somogyi1571141.85
Konstantinos F. Sagonas281368.98