53 research outputs found

    SLR inference: An inference system for fixed-mode logic programs, based on SLR parsing

    Get PDF
    AbstractDefinite-clause grammars (DCGs) generalize context-free grammars in such a way that Prolog can be used as a parser in the presence of context-sensitive information. Prolog's proof procedure, however, is based on backtracking, which may be a source of inefficiency. Parsers for context-free grammars that use backtracking, for instance, were soon replaced by more efficient methods, such as LR parsers. This suggests incorporating the principles underlying LR parsing into a parser for grammars with context-sensitive information. We present a technique that applies a transformation to the program/grammar by adding leaves to the proof/parse trees and placing the contextual information in such leaves. An inference system is then easily obtained from an LR parser, since only the parts dealing with terminals (which appear at the leaves) must be modified. Although our method is restricted to programs with fixed modes, it may be preferable to DCGs under Prolog for some programs

    Type-driven natural language analysis

    Get PDF
    The purpose of this thesis is in showing how recent developments in logic programming can be exploited to encode in a computational environment the features of certain linguistic theories. We are in this way able to make available for the purpose of natural language processing sophisticated capabilities of linguistic analysis directly justified by well developed grammatical frameworks. More specifically, we exploit hypothetical reasoning, recently proposed as one of the possible directions to widen logic programming, to account for the syntax of filler-gap dependencies along the lines of linguistic theories such as Generalized Phrase Structure Grammar and Categorial Grammar. Moreover, we make use, for the purpose of semantic analysis of the same kind of phenomena, of another recently proposed extension, interestingly related to the previous one, namely the idea of replacing first-order terms with the more expressive λ-terms of λ-Calculus

    Constraining Montague Grammar for computational applications

    Get PDF
    This work develops efficient methods for the implementation of Montague Grammar on a computer. It covers both the syntactic and the semantic aspects of that task. Using a simplified but adequate version of Montague Grammar it is shown how to translate from an English fragment to a purely extensional first-order language which can then be made amenable to standard automatic theorem-proving techniques. Translating a sentence of Montague English into the first-order predicate calculus usually proceeds via an intermediate translation in the typed lambda calculus which is then simplified by lambda-reduction to obtain a first-order equivalent. If sufficient sortal structure underlies the type theory for the reduced translation to always be a first-order one then perhaps it should be directly constructed during the syntactic analysis of the sentence so that the lambda-expressions never come into existence and no further processing is necessary. A method is proposed to achieve this involving the unification of meta-logical expressions which flesh out the type symbols of Montague's type theory with first-order schemas. It is then shown how to implement Montague Semantics without using a theorem prover for type theory. Nothing more than a theorem prover for the first-order predicate calculus is required. The first-order system can be used directly without encoding the whole of type theory. It is only necessary to encode a part of second-order logic and this can be done in an efficient, succinct, and readable manner. Furthermore the pseudo-second-order terms need never appear in any translations provided by the parser. They are vital just when higher-order reasoning must be simulated. The foundation of this approach is its five-sorted theory of Montague Semantics. The objects in this theory are entities, indices, propositions, properties, and quantities. It is a theory which can be expressed in the language of first-order logic by means of axiom schemas and there is a finite second-order axiomatisation which is the basis for the theorem-proving arrangement. It can be viewed as a very constrained set theory

    Fault detection and rectification algorithms in a question-answering system

    Get PDF
    A Malay proverb "jika sesat di hujung jalan, baleklah kepangkal jalan" roughly means "if you get lost at the end of the road, go back to the beginning". In going back to the beginning of the road, we learn our mistakes and hopefully will not repeat the same mistake again. Thus, this work investigates the use of formal logic as a practical tool for reasoning why we could not infer or deduce a correct answer from a question posed to a database. An extension of the Prolog interpreter is written to mechanise a theorem-proving system based on Horn clauses. This extension procedure will form the basis of the question-answering system. Both input into and output from this system is in the form of predicate calculus. This system can answer all four classes of questions as classified by Chang and Lee (1973). [Continues.

    Use of definite clause grammars

    Get PDF
    Call number: LD2668 .R4 CMSC 1987 C53Master of ScienceComputing and Information Science

    Functional object-types as a foundation of complex knowledge-based systems

    Get PDF

    Detailed Design and Partial Implementation of a Pre-processor for Prolog Programs with Embedded C Statements

    Get PDF
    Computer Scienc

    Proceedings of the Workshop on the lambda-Prolog Programming Language

    Get PDF
    The expressiveness of logic programs can be greatly increased over first-order Horn clauses through a stronger emphasis on logical connectives and by admitting various forms of higher-order quantification. The logic of hereditary Harrop formulas and the notion of uniform proof have been developed to provide a foundation for more expressive logic programming languages. The λ-Prolog language is actively being developed on top of these foundational considerations. The rich logical foundations of λ-Prolog provides it with declarative approaches to modular programming, hypothetical reasoning, higher-order programming, polymorphic typing, and meta-programming. These aspects of λ-Prolog have made it valuable as a higher-level language for the specification and implementation of programs in numerous areas, including natural language, automated reasoning, program transformation, and databases

    RELFUN guide : programming with relations and functions made easy

    Get PDF
    A practical description of relational/functional programming in RELFUN is given. The language constructs are introduced by a tutorial dialog. Builtins, primitives, and commands are explained. Examples are given on all aspects relevant to using the language

    Applied logic : its use and implementation as a programming tool

    Get PDF
    The first Part of the thesis explains from first principles the concept of "logic programming" and its practical application in the programming language Prolog. Prolog is a simple but powerful language which encourages rapid, error-free programming and clear, readable, concise programs. The basic computational mechanism is a pattern matching process ("unification") operating on general record structures ("terms" of logic). IThe ideas are illustrated by describing in detail one sizable Prolog program which implements a simple compiler. The advantages and practicability of using Prolog for "real" compiler implementation are discussed. The second Part of the thesis describes techniques for implementing Prolog efficiently. In particular it is shown how to compile the patterns involved in the matching process into instructions of a low-level language. This idea has actually been implemented in a compiler (written in Prolog) from Prolog to DECsystem-10 assembly language. However the principles involved are explained more abstractly in terms of a "Prolog Machine". The code generated is comparable in speed with that produced by existing DEC10 Lisp compilers. Comparison is possible since pure Lisp can be viewed as a (rather restricted) subset of Prolog. It is argued that structured data objects, such as lists and trees, can be manipulated by pattern matching using a "structure 'sharing" representation as efficiently as by conventional selector and constructor functions operating on linked records in "heap" storage. Moreover the pattern matching formulation actually helps the implementor to produce a better implementation
    corecore