268 research outputs found

    Efficient tabling of structured data with enhanced hash-consing

    Get PDF
    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.Comment: 16 pages; TPLP, 201

    Tabling with Interned Terms on Contextual Abduction

    Get PDF
    Abduction (also called abductive reasoning) is a form of logical inference which starts with an observation and is followed by finding the best explanations. In this paper, we improve the tabling in contextual abduction technique with an advanced tabling feature of XSB Prolog, namely tabling with interned terms. This feature enables us to store the abductive solutions as interned ground terms in a global area only once so that the use of table space to store abductive solutions becomes more efficient. We implemented this improvement to a prototype, called as TABDUAL+INT. Although the experiment result shows that tabling with interned terms is relatively slower than tabling without interned terms when used to return first solutions from a subgoal, tabling with interned terms is relatively faster than tabling without interned terms when used to returns all solutions from a subgoal. Furthermore, tabling with interned terms is more efficient in table space used when performing abduction both in artificial and real world case, compared to tabling without interned terms

    TABLING WITH INTERNED TERMS ON CONTEXTUAL ABDUCTION

    Get PDF
    Abduction (also called abductive reasoning) is a form of logical inference which starts with an observation and is followed by finding the best explanations. In this paper, we improve the tabling in contextual abduction technique with an advanced tabling feature of XSB Prolog, namely tabling with interned terms. This feature enables us to store the abductive solutions as interned ground terms in a global area only once so that the use of table space to store abductive solutions becomes more efficient. We implemented this improvement to a prototype, called as TABDUAL+INT. Although the experiment result shows that tabling with interned terms is relatively slower than tabling without interned terms when used to return first solutions from a subgoal, tabling with interned terms is relatively faster than tabling without interned terms when used to returns all solutions from a subgoal. Furthermore, tabling with interned terms is more efficient in table space used when performing abduction both in artificial and real world case, compared to tabling without interned terms

    On the Implementation of GNU Prolog

    Get PDF
    GNU Prolog is a general-purpose implementation of the Prolog language, which distinguishes itself from most other systems by being, above all else, a native-code compiler which produces standalone executables which don't rely on any byte-code emulator or meta-interpreter. Other aspects which stand out include the explicit organization of the Prolog system as a multipass compiler, where intermediate representations are materialized, in Unix compiler tradition. GNU Prolog also includes an extensible and high-performance finite domain constraint solver, integrated with the Prolog language but implemented using independent lower-level mechanisms. This article discusses the main issues involved in designing and implementing GNU Prolog: requirements, system organization, performance and portability issues as well as its position with respect to other Prolog system implementations and the ISO standardization initiative.Comment: 30 pages, 3 figures, To appear in Theory and Practice of Logic Programming (TPLP); Keywords: Prolog, logic programming system, GNU, ISO, WAM, native code compilation, Finite Domain constraint

    AMaχoS—Abstract Machine for Xcerpt

    Get PDF
    Web query languages promise convenient and efficient access to Web data such as XML, RDF, or Topic Maps. Xcerpt is one such Web query language with strong emphasis on novel high-level constructs for effective and convenient query authoring, particularly tailored to versatile access to data in different Web formats such as XML or RDF. However, so far it lacks an efficient implementation to supplement the convenient language features. AMaχoS is an abstract machine implementation for Xcerpt that aims at efficiency and ease of deployment. It strictly separates compilation and execution of queries: Queries are compiled once to abstract machine code that consists in (1) a code segment with instructions for evaluating each rule and (2) a hint segment that provides the abstract machine with optimization hints derived by the query compilation. This article summarizes the motivation and principles behind AMaχoS and discusses how its current architecture realizes these principles

    SWI-Prolog and the Web

    Get PDF
    Where Prolog is commonly seen as a component in a Web application that is either embedded or communicates using a proprietary protocol, we propose an architecture where Prolog communicates to other components in a Web application using the standard HTTP protocol. By avoiding embedding in external Web servers development and deployment become much easier. To support this architecture, in addition to the transfer protocol, we must also support parsing, representing and generating the key Web document types such as HTML, XML and RDF. This paper motivates the design decisions in the libraries and extensions to Prolog for handling Web documents and protocols. The design has been guided by the requirement to handle large documents efficiently. The described libraries support a wide range of Web applications ranging from HTML and XML documents to Semantic Web RDF processing. To appear in Theory and Practice of Logic Programming (TPLP)Comment: 31 pages, 24 figures and 2 tables. To appear in Theory and Practice of Logic Programming (TPLP
    corecore