166 research outputs found

    Implementing Semantic Theories

    Get PDF

    Programming Language Techniques for Natural Language Applications

    Get PDF
    It is easy to imagine machines that can communicate in natural language. Constructing such machines is more difficult. The aim of this thesis is to demonstrate how declarative grammar formalisms that distinguish between abstract and concrete syntax make it easier to develop natural language applications. We describe how the type-theorectical grammar formalism Grammatical Framework (GF) can be used as a high-level language for natural language applications. By taking advantage of techniques from the field of programming language implementation, we can use GF grammars to perform portable and efficient parsing and linearization, generate speech recognition language models, implement multimodal fusion and fission, generate support code for abstract syntax transformations, generate dialogue managers, and implement speech translators and web-based syntax-aware editors. By generating application components from a declarative grammar, we can reduce duplicated work, ensure consistency, make it easier to build multilingual systems, improve linguistic quality, enable re-use across system domains, and make systems more portable

    A framework for relating, implementing and verifying argumentation models and their translations

    Get PDF
    Computational argumentation theory deals with the formalisation of argument structure, conflict between arguments and domain-specific constructs, such as proof standards, epistemic probabilities or argument schemes. However, despite these practical components, there is a lack of implementations and implementation methods available for most structured models of argumentation and translations between them. This thesis addresses this problem, by constructing a general framework for relating, implementing and formally verifying argumentation models and translations between them, drawing from dependent type theory and the Curry-Howard correspondence. The framework provides mathematical tools and programming methodologies to implement argumentation models, allowing programmers and argumentation theorists to construct implementations that are closely related to the mathematical definitions. It furthermore provides tools that, without much effort on the programmer's side, can automatically construct counter-examples to desired properties, while finally providing methodologies that can prove formal correctness of the implementation in a theorem prover. The thesis consists of various use cases that demonstrate the general approach of the framework. The Carneades argumentation model, Dung's abstract argumentation frameworks and a translation between them, are implemented in the functional programming language Haskell. Implementations of formal properties of the translation are provided together with a formalisation of AFs in the theorem prover, Agda. The result is a verified pipeline, from the structured model Carneades into existing efficient SAT-based implementations of Dung's AFs. Finally, the ASPIC+ model for argumentation is generalised to incorporate content orderings, weight propagation and argument accrual. The framework is applied to provide a translation from this new model into Dung's AFs, together with a complete implementation

    Una implementación en Haskell de un lenguaje funcional no determinista

    Get PDF
    En este trabajo se propone e implementa un lenguaje funcional que incorpora características habituales de este paradigma, como es el orden superior, ajuste de patrones o evaluación perezosa. Añade características no tan habituales como es el indeterminismo, expresado mediante funciones no deterministas, es decir, funciones que para unos argumentos dados pueden devolver más de un resultado. Este tipo de funciones existen en los llamados lenguajes lógico funcionales, que adoptan para el indeterminismo una semántica de compartición (call-time choice), en contraste con la semántica de no compartición (run-time choice) más típica de otros formalismos, como son los sistemas de reescritura. Lo específico del lenguaje nuevo que se va a proponer e implementar, Sharade, es que combinará ambos tipos de semánticas mediante primitivas que existirán en el propio lenguaje. La implementación del lenguaje está realizada íntegramente en Haskell, en contraste con las implementaciones clásicas de los lenguajes lógico funcionales, habitualmente basadas en Prolog. Haskell es un lenguaje funcional puro con un sistema de tipos muy fuerte, siendo el lenguaje de referencia en el ámbito de la programación funcional con evaluación perezosa. Aparte de fases auxiliares como son el análisis sintáctico y la inferencia de tipos, lo esencial de la implementación consiste en un proceso de traducción de programas fuente Sharade en programas objeto Haskell, aprovechando así muchas de las características de este último como lenguaje funcional. Los programas objeto hacen uso intensivo de programación monádica, a través en particular de una biblioteca Haskell para la programación con indeterminismo con call-time choice y evaluación perezosa, biblioteca ya existente pero que ha debido ser adaptada por nosotros para actualizarla a las nuevas versiones de Haskell

    A framework for relating, implementing and verifying argumentation models and their translations

    Get PDF
    Computational argumentation theory deals with the formalisation of argument structure, conflict between arguments and domain-specific constructs, such as proof standards, epistemic probabilities or argument schemes. However, despite these practical components, there is a lack of implementations and implementation methods available for most structured models of argumentation and translations between them. This thesis addresses this problem, by constructing a general framework for relating, implementing and formally verifying argumentation models and translations between them, drawing from dependent type theory and the Curry-Howard correspondence. The framework provides mathematical tools and programming methodologies to implement argumentation models, allowing programmers and argumentation theorists to construct implementations that are closely related to the mathematical definitions. It furthermore provides tools that, without much effort on the programmer's side, can automatically construct counter-examples to desired properties, while finally providing methodologies that can prove formal correctness of the implementation in a theorem prover. The thesis consists of various use cases that demonstrate the general approach of the framework. The Carneades argumentation model, Dung's abstract argumentation frameworks and a translation between them, are implemented in the functional programming language Haskell. Implementations of formal properties of the translation are provided together with a formalisation of AFs in the theorem prover, Agda. The result is a verified pipeline, from the structured model Carneades into existing efficient SAT-based implementations of Dung's AFs. Finally, the ASPIC+ model for argumentation is generalised to incorporate content orderings, weight propagation and argument accrual. The framework is applied to provide a translation from this new model into Dung's AFs, together with a complete implementation

    The modular compilation of effects

    Get PDF
    The introduction of new features to a programming language often requires that its compiler goes to the effort of ensuring they are introduced in a manner that does not interfere with the existing code base. Engineers frequently find themselves changing code that has already been designed, implemented and (ideally) proved correct, which is bad practice from a software engineering point of view. This thesis addresses the issue of constructing a compiler for a source language that is modular in the computational features that it supports. Utilising a minimal language that allows us to demonstrate the underlying techniques, we go on to introduce a significant range of effectful features in a modular manner, showing that their syntax can be compiled independently, and that source languages containing multiple features can be compiled by making use of a fold. In the event that new features necessitate changes in the underlying representation of either the source language or that of the compiler, we show that our framework is capable of incorporating these changes with minimal disruption. Finally, we show how the framework we have developed can be used to define both modular evaluators and modular virtual machines
    corecore