4 research outputs found

    Compile-time meta-programming in converge.

    Get PDF
    Compile-time meta-programming allows programs to be constructed by the user at compile-time. Few modern languages are capable of compile-time meta-programming, and of those that do, many of the most powerful are statically typed functional languages. In this paper I present the dynamically typed, object orientated language Converge which allows compile-time meta-programming in the spirit of Template Haskell. Converge demonstrates that integrating powerful, safe compiletime meta-programming features into a dynamic language requires few restrictions to the exible development style facilitated by the paradigm

    The Converge programming language.

    Get PDF
    This paper details the Converge programming language, a new dynamically typed imperative programming language capable of compile-time meta-programming, and with an extendable syntax. Although Converge has been designed with the aim of implementing different model transformation approaches as embedded DSL’s in mind, it is also a General Purpose Language (GPL), albeit one with unusually powerful features. The motivation for a new approach to implementing model transformation approaches is simple: existing languages, and their associated tool-chains, lead to long and costly implementation cycles for model transformation approaches. The justification for creating a new language, rather than altering an existing one, is far less obvious— it is reasonable to suggest that, given the vast number of programming languages already in existence, one of them should present itself as a likely candidate for modification. There are two reasons why a new language is necessary to meet the aims of this paper. Firstly, in order to meet its aims, Converge contains a blend of features unique amongst programming languages; some fundamental design choices have been necessary to make these features coalesce, and imposing such choices retrospectively on an existing language would almost certainly lead to untidy results and backwards compatibility issues. Secondly, my personal experience strongly suggests that the complexity of modern languages implementations (when such implementations are available) can make adding new features a significant challenge. In short, I assert that it is easier in the context of model transformations to start with a fresh canvass than to alter an existing language. This paper comes in three main parts. The first part documents the basics of the Converge language itself;. The second part details Converge’s compile-time metaprogramming and syntax extension facilities, including a section detailing suggestions for how some of Converge’s novel features could be added to similar languages. The third part of this paper explains Converge’s syntax extension facility, and documents a user extension which allows simple UML-esque modelling languages to be embedded within Converge. As well as being a practical demonstration of Converge’s features, this facility is used extensively throughout the remainder of the paper

    Abitbol : un langage sur mesure pour la métaprogrammation

    Get PDF
    Ce mémoire a pour thèse que les fonctions devraient être transparentes lors de la phase de métaprogrammation. En effet, la métaprogrammation se veut une possibilité pour le programmeur d’étendre le compilateur. Or, dans un style de programmation fonctionnelle, la logique du programme se retrouve dans les définitions des diverses fonctions le composant. Puisque les fonctions sont généralement opaques, l’impossibilité d’accéder à cette logique limite les applications possibles de la phase de métaprogrammation. Nous allons illustrer les avantages que procurent les fonctions transparentes pour la métaprogrammation. Nous donnerons notamment l’exemple du calcul symbolique et un exemple de nouvelles optimisations désormais possibles. Nous illustrerons également que la transparence des fonctions permet de faire le pont entre les datatypes du programme et les fonctions. Nous allons également étudier ce qu'implique la présence de fonctions transparentes au sein d'un langage. Nous nous concentrerons sur les aspects reliés à l'implantation de ces dernières, aux performances et à la facilité d'utilisation. Nous illustrerons nos propos avec le langage Abitbol, un langage créé sur mesure pour la métaprogrammation.Our main thesis is that functions should be transparent during the metaprogramming stage. Metaprogramming is intended as a possibility for the programmer to extend the compiler. But in a functional programming style, the program logic is found in the definition of its functions. Since functions are generally opaque, it is impossible for the programmer to access this information and this limits the metaprogramming possibilities. We will illustrate the benefits of transparent functions for metaprogramming. We will give the example of symbolic computation and also show new forms of optimizations now available at the metaprogramming stage. We will also illustrate that transparency allows us to bridge the gap between the datatypes of a program and its functions. We will also examine how transparent functions affects other aspects of the language. We will focus on how to implement them, their performance impact and their ease of use. We illustrate our thesis with Abitbol, a language designed for metaprogramming

    First-class Macros Have Types

    No full text
    In modern Scheme, a macro captures the lexical environment where it is defined. This creates an opportunity for extending Scheme so that macros are first-class values. The key to achieving this goal, while preserving the ability to compile programs into reasonable code, is the addition of a type system. Many interesting things can be done with firstclass macros, including the construction of a useful module system in which modules are also first-class
    corecore