1,276 research outputs found

    FLIP : functional-plus-logic programming on an integrated platform

    Get PDF
    In FLIP, a novel approach to the integration of relational and functional languages on the basis of abstract machines (in the context of the RELFUN language and implementation) is described. This integration is carried out for several reasons: to combine two declarative paradigms into a more expressive one, to allow existing software libraries in relational and functional (here LL, a COMMON LISP derivative) languages to be used together without the need of re-implementation, to speed up relational programs by transforming deterministic relations into functions, and to enhance the expressiveness of relational languages by new extra-logicals with the help of functions. The integration is performed on two levels: 1. on the abstract machine level (the WAM, the abstract machine behind most implementations of relational languages, and the LLAMA, an abstract machine especially designed for the efficient execution of LL, are coupled), and 2. on the source language level (LL functions are accessible from relations and vice versa). One of the major points of this work is the detection and transformation of deterministic relations (into LL functions), resulting in a speed-up factor of 2-4. For this, a theoretical foundation for deterministic relations and several intermediate representation languages for the transformation process are developed

    A proposal for an interchange abstract syntax for (parallel) Prolog

    Get PDF
    We propose an abstract syntax for Prolog that will help the manipulation of programs at compile-time, as well as the exchange of sources and information among the tools designed for this manipulation. This includes analysers, partial evaluators, and program transformation tools. We have chosen to concentrate on the information exchange format, rather than on the syntax of programs, for which we assume a simplified format. Our purpose is to provide a low-level meeting point for the tools which will allow them to read the same programs and understand the information about them. This report describes our first design in an informal way. We expect this design to evolve and concretize, along with the future development of the tools, during the project

    Declarative visitors to ease fine-grained source code mining with full history on billions of AST nodes

    Get PDF
    Software repositories contain a vast wealth of information about software development. Mining these repositories has proven useful for detecting patterns in software development, testing hypotheses for new software engineering approaches, etc. Specifically, mining source code has yielded significant insights into software development artifacts and processes. Unfortunately, mining source code at a large-scale remains a difficult task. Previous approaches had to either limit the scope of the projects studied, limit the scope of the mining task to be more coarse-grained, or sacrifice studying the history of the code due to both human and computational scalability issues. In this paper we address the substantial challenges of mining source code: a) at a very large scale; b) at a fine-grained level of detail; and c) with full history information. To address these challenges, we present domain-specific language features for source code mining. Our language features are inspired by object-oriented visitors and provide a default depth-first traversal strategy along with two expressions for defining custom traversals. We provide an implementation of these features in the Boa infrastructure for software repository mining and describe a code generation strategy into Java code. To show the usability of our domain-specific language features, we reproduced over 40 source code mining tasks from two large-scale previous studies in just 2 person-weeks. The resulting code for these tasks show between 2.0x--4.8x reduction in code size. Finally we perform a small controlled experiment to gain insights into how easily mining tasks written using our language features can be understood, with no prior training. We show a substantial number of tasks (77%) were understood by study participants, in about 3 minutes per task

    Reusable Components of Semantic Specifications

    Get PDF
    Semantic specifications of programming languages typically have poor modularity. This hinders reuse of parts of the semantics of one language when specifying a different language – even when the two languages have many constructs in common – and evolution of a language may require major reformulation of its semantics. Such drawbacks have discouraged language developers from using formal semantics to document their designs. In the PLanCompS project, we have developed a component-based approach to semantics. Here, we explain its modularity aspects, and present an illustrative case study: a component-based semantics for Caml Light. We have tested the correctness of the semantics by running programs on an interpreter generated from the semantics, comparing the output with that produced on the standard implementation of the language. Our approach provides good modularity, facilitates reuse, and should support co-evolution of languages and their formal semantics. It could be particularly useful in connection with domain-specific languages and language-driven software development

    Reusable components of semantic specifications

    Get PDF
    • …
    corecore