Hostname: page-component-6766d58669-tq7bh Total loading time: 0 Render date: 2026-05-20T15:18:57.016Z Has data issue: false hasContentIssue false

Efficient tabling of structured data with enhanced hash-consing

Published online by Cambridge University Press:  05 September 2012

NENG-FA ZHOU
Affiliation:
CUNY Brooklyn College & Graduate Center (e-mail: zhou@sci.brooklyn.cuny.edu)
CHRISTIAN THEIL HAVE
Affiliation:
Roskilde University (e-mail: cth@ruc.dk)

Abstract

Current tabling systems suffer from an increase in space complexity, time complexity or both when dealing with sequences due to the use of data structures for tabled subgoals and answers and the need to copy terms into and from the table area. This symptom can be seen in not only B-Prolog, which uses hash tables, but also systems that use tries such as XSB and YAP. In this paper, we apply hash-consing to tabling structured data in B-Prolog. While hash-consing can reduce the space consumption when sharing is effective, it does not change the time complexity. We enhance hash-consing with two techniques, called input sharing and hash code memoization, for reducing the time complexity by avoiding computing hash codes for certain terms. The improved system is able to eliminate the extra linear factor in the old system for processing sequences, thus significantly enhancing the scalability of applications such as language parsing and bio-sequence analysis applications. We confirm this improvement with experimental results.

Information

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable