1,881 research outputs found

    CHR Grammars

    Full text link
    A grammar formalism based upon CHR is proposed analogously to the way Definite Clause Grammars are defined and implemented on top of Prolog. These grammars execute as robust bottom-up parsers with an inherent treatment of ambiguity and a high flexibility to model various linguistic phenomena. The formalism extends previous logic programming based grammars with a form of context-sensitive rules and the possibility to include extra-grammatical hypotheses in both head and body of grammar rules. Among the applications are straightforward implementations of Assumption Grammars and abduction under integrity constraints for language analysis. CHR grammars appear as a powerful tool for specification and implementation of language processors and may be proposed as a new standard for bottom-up grammars in logic programming. To appear in Theory and Practice of Logic Programming (TPLP), 2005Comment: 36 pp. To appear in TPLP, 200

    Principles and Implementation of Deductive Parsing

    Get PDF
    We present a system for generating parsers based directly on the metaphor of parsing as deduction. Parsing algorithms can be represented directly as deduction systems, and a single deduction engine can interpret such deduction systems so as to implement the corresponding parser. The method generalizes easily to parsers for augmented phrase structure formalisms, such as definite-clause grammars and other logic grammar formalisms, and has been used for rapid prototyping of parsing algorithms for a variety of formalisms including variants of tree-adjoining grammars, categorial grammars, and lexicalized context-free grammars.Comment: 69 pages, includes full Prolog cod

    Procedural 3D Caves, Clouds and Architecture Generation Method Based on Shape Grammar and Morphing

    Get PDF
    This paper presents a new procedural 3D modelconstructionalgorithm that benefits from a combination ofdiscrete and continuous modeling approaches. Our algorithmmodels complex scene components such as caves, architecturalbuildings, and clouds. The method combines the discretedescriptiveness of shape grammars with the continuous flexibilityof shape morphing. This combination allows for a modelingapproach that can be controlled by a morphing parameter toproduce various types of geometry. In the paper, we focus on thedescription of the algorithm while also showing its capabilities ingenerating complex scene components

    Definite Clause Grammars with Parse Trees: Extension for Prolog

    Get PDF
    Definite Clause Grammars (DCGs) are a convenient way to specify possibly non-context-free grammars for natural and formal languages. They can be used to progressively build a parse tree as grammar rules are applied by providing an extra argument in the DCG rule\u27s head. In the simplest way, this is a structure that contains the name of the used nonterminal. This extension of a DCG has been proposed for natural language processing in the past and can be done automatically in Prolog using term expansion. We extend this approach by a meta-nonterminal to specify optional and sequences of nonterminals, as these structures are common in grammars for formal, domain-specific languages. We specify a term expansion that represents these sequences as lists while preserving the grammar\u27s ability to be used both for parsing and serialising, i.e. to create a parse tree by a given source code and vice-versa. We show that this mechanism can be used to lift grammars specified in extended Backus-Naur form (EBNF) to generate parse trees. As a case study, we present a parser for the Prolog programming language itself based only on the grammars given in the ISO Prolog standard which produces corresponding parse trees

    Static Type Checking for the Q Functional Language in Prolog

    Get PDF
    We describe an application of Prolog: a type checking tool for the Q functional language. Q is a terse vector processing language, a descendant of APL, which is getting more and more popular, especially in financial applications. Q is a dynamically typed language, much like Prolog. Extending Q with static typing improves both the readability of programs and programmer productivity, as type errors are discovered by the tool at compile time, rather than through debugging the program execution. We designed a type description syntax for Q and implemented a parser for both the Q language and its type extension. We then implemented a type checking algorithm using constraints. As most built-in function names of Q are overloaded, i.e. their meaning depends on the argument types, a quite complex system of constraints had to be implemented. Prolog proved to be an ideal implementation language for the task at hand. We used Definite Clause Grammars for parsing and Constraint Handling Rules for the type checking algorithm. In the paper we describe the main problems solved and the experiences gained in the development of the type checking tool

    Branching Boogaloo: Botanical Adventures in Multi-Mediated Morphologies

    Get PDF
    FormaLeaf is a software interface for exploring leaf morphology using parallel string rewriting grammars called L-systems. Scanned images of dicotyledonous angiosperm leaves removed from plants around Bard’s campus are displayed on the left and analyzed using the computer vision library OpenCV. Morphometrical information and terminological labels are reported in a side-panel. “Slider mode” allows the user to control the structural template and growth parameters of the generated L-system leaf displayed on the right. “Vision mode” shows the input and generated leaves as the computer ‘sees’ them. “Search mode” attempts to automatically produce a formally defined graphical representation of the input by evaluating the visual similarity of a generated pool of candidate leaves. The system seeks to derive a possible internal structural configuration for venation based purely off a visual analysis of external shape. The iterations of the generated L-system leaves when viewed in succession appear as a hypothetical development sequence. FormaLeaf was written in Processing

    Synesthetic art through 3-D projection: The requirements of a computer-based supermedium

    Get PDF
    A computer-based form of multimedia art is proposed that uses the computer to fuse aspects of painting, sculpture, dance, music, film, and other media into a one-to-one synthesia of image and sound for spatially synchronous 3-D projection. Called synesthetic art, this conversion of many varied media into an aesthetically unitary experience determines the character and requirements of the system and its software. During the start-up phase, computer stereographic systems are unsuitable for software development. Eventually, a new type of illusory-projective supermedium will be required to achieve the needed combination of large-format projection and convincing real life presence, and to handle the vast amount of 3-D visual and acoustic information required. The influence of the concept on the author's research and creative work is illustrated through two examples
    corecore