15 research outputs found

    Incremental parsing algorithms for speech-editing mathematics and computer code

    Get PDF
    The provision of speech control for editing plain language text has existed for a long time, but does not extend to structured content such as mathematics. The requirements of a user interface for a spoken mathematics editor are explored through the lens of an intuitive natural user interface (NUI) for speech control, the desired properties of which are based on a combination of existing literature on NUIs and intuitive user interfaces. An important aspect of an intuitive NUI is timely update of display of the content in response to editing actions. This is not feasible using batch parsing alone, and this issue will be more serious for larger documents such as computer program code. The solution is an incremental parser designed to work with operator precedence (OP) grammars. The contribution to knowledge provided by this thesis is to improve the efficiency in terms of processing time, of the OP incremental parsing algorithm developed by Heeman, and extend it to handle the distfix (mixfix) operators described by Attanayake to model brackets and mathematical functions. This is implemented successfully for the TalkMaths system and shows a greatly reduced response time compared with using batch scanning and parsing alone. The author is not aware of any other incremental OP parser that handles such operators. Furthermore, a proposal is made for modifications to the data structures produced by Attanayake's parser, along with appropriate adjustments to the incremental parser, that will in the future, facilitate application of OP grammar to program code or other structured content by changing the definition of its content language

    Simulando operadores disfijos

    Get PDF
    La extensibilidad en lenguajes de programación se refiere a la posibilidad de tener un lenguaje donde el programador puede añadir sus propias construcciones sintácticas. Dicha propiedad permite trasladar muchas construcciones del lenguaje de programación a librerías. Este trabajo muestra algunos problemas en la implementación de un lenguaje con características objetuales a partir de un lenguaje funcional, perezoso que utiliza un subconjunto de operadores disfijos como mecanismo de extensibilidad.005.133 E184Extensibility in programming language design is about the possibility of letting the programmer add it's own syntactic constructions. This property allows to transfer some built-in functions to libraries. This thesis shows some problems implementing a programming language with object oriented features starting from a lazy, functional language that uses a subset of disfix operators as an extensibility mechanism.Contenido parcial: Conceptos de diseño de lenguajes de programación -- Sintaxis concreta versus sintaxis abstracta -- Gramáticas independientes del contexto, notación y ambigüedad -- Lambda Cálculo -- Expresiones lambda -- Parsing, análisis y evaluación -- Jugando con los operadores disfijos

    Certified Context-Free Parsing: A formalisation of Valiant's Algorithm in Agda

    Get PDF
    Valiant (1975) has developed an algorithm for recognition of context free languages. As of today, it remains the algorithm with the best asymptotic complexity for this purpose. In this paper, we present an algebraic specification, implementation, and proof of correctness of a generalisation of Valiant's algorithm. The generalisation can be used for recognition, parsing or generic calculation of the transitive closure of upper triangular matrices. The proof is certified by the Agda proof assistant. The certification is representative of state-of-the-art methods for specification and proofs in proof assistants based on type-theory. As such, this paper can be read as a tutorial for the Agda system

    A syntax definition formalism

    Get PDF

    Enhancing automatic speech recognition for mathematical applications via incremental parsing

    Get PDF
    Automatic speech recognition and automatic speech understanding systems have, over recent years, improved to the extent that they are used in many practical applications ranging from dictation systems to voice control of household devices (through systems such as Alexa and Amazon Echo) and dialogue systems for telephone shopping and customer services for utility companies. However, advancements in speech input systems for mathematical applications have tended to lag behind those for more general or commercial situations. Our system TalkMaths, which has been under development for several years, is an exception to this, and allows spoken dictation and editing of mathematical text (in standard mathematical notation) using relatively natural spoken language commands. However, up to now, correcting a mistake in a spoken form of a mathematical expression has required a complete re-parse of the spoken input, which is time consuming and potentially frustrating to the user. In this paper, we discuss ways of improving on this situation using incremental approaches to parsing. These were first devised to make the parsing and compilation of computer program code more efficient, by only re-parsing those parts of the program code which had actually changed, and merging the parse trees of the unchanged and modified parts of the code. We adapt this methodology to allow editing of spoken forms of mathematical expressions, and their associated parse trees, and describe and discuss initial experiments to compare the performance of these novel methods with those of more conventional approaches

    Parse forest disambiguation

    Get PDF

    Semantics, Implementation and Pragmatics of Clear, a Program Specification Language

    Get PDF
    Specifications are necessary for communicating decisions and intentions and for documenting results at many stages of the program development process. Informal specifications are typically used today, but they are imprecise and often ambiguous. Formal specifications are precise and exact but are more difficult to write and understand. We present work aimed toward enabling the practical use of formal specifications in program development, concentrating on the Clear language for structured algebraic specification. Two different but equivalent denotational semantics for Clear are given. One is a version of a semantics due to Burstall and Goguen with a few corrections, in which the category-theoretic notion of a colimit is used to define Clear's structuring operations independently of the underlying 'institution' (logical formalism). The other semantics defines the same operations by means of straightforward set-theoretic constructions; it is not institutionindependent but it can be modified to handle all institutions of apparent interest. Both versions of the semantics have been implemented. The settheoretic implementation is by far the more useful of the two, and includes a parser and typechecker. An implementation is useful for detecting syntax and type errors in specifications, and can be used as a front end for systems which manipulate specifications. Several large specifications which have been processed by the set-theoretic implementation are presented. A semi-automatic theorem prover for Clear built on top of the Edinburgh LCF system is described. It takes advantage of the structure of Clear specifications to restrict the available information to that which seems relevant to proving the theorem at hand. If the system is unable to prove a theorem automatically the user can attempt the proof interactively using the high-level primitives and inference rules provided. We lay a theoretical foundation for the use of Clear in systematic program development by investigating a new notion of the implementation of a specification by a lower-level specification. This notion extends to handle parameterised specifications. We show that this implementation relation is transitive and commutes with Clear's structuring operations under certain conditions. This means that a large specification can be refined to a program in a gradual and modular fashion, where the correctness of the individual refinements guarantees the correctness of the resulting program

    A generic logic environment

    Get PDF
    Imperial Users onl
    corecore