8 research outputs found

    The Design and Implementation of SPARK, a Toolkit for Implementing Domain-Specific Languages

    Get PDF
    SPARK is a toolkit for implementing domain-specific languages in Python. It is somewhat unusual in that its intended audience includes users who do not necessarily have a background in compilation; this choice impacts both the design and implementation of SPARK. We introduce SPARK in this paper and discuss major issues that have arisen in its design and ongoing development

    A generic version of scanf programmed in C5

    Get PDF
    In this paper we present a generic version of \{\\tt scanf\} the standard library function of the C language programmed in C5. C5 is a superset of the C programming language. The main difference between C and C5 is that the type system of C5 supports the definition of types of dependent pairs, i.e., the type of the second member of the pair depends on the value of the first member (which is a type). Another C5 extension is the type initialization expression which is a sequence of C constant expressions that can be attached to type expressions in a type declaration. These extensions make C5 powerful enough to express in a generic form functions with dependent type arguments like and \{\\tt printf\} and \{\\tt scanf\}. The resulting version of \{\\tt scanf\} is a parser generator based on the Earley algorithm that for a given type constructs an object of such type according to the input string

    C5 printf and C5 scanfin C5 version 0.98

    Get PDF
    In this paper we present the version 0.98 (September 2006) of the C compiler including the functions C5 printf and C5 scanf. C5 is a superset of the C programming language. The main difference between C and C5 is that the type system of C5 supports the definition of types of dependent pairs, i.e., the type of the second member of the pair depends on the value of the first member (which is a type). Another C5 extension is the type initialization expression which is a list of dependent pairs that can be attached to type expressions in a type declaration. These extensions provide C5 with dynamic type inspection at run time and attribute type definition. The result is a powerful framework for generic programming. The paper presents the improvements of the version 0.98 including the functions C5 scanf, C5 printf, C5 lenSearch and C5 idxSearchEn este trabajo se presentan la versión 0.98 (setiembre, 2006) del compilador de C5 incluyendo las funciones C5 printf y C5 scanf. C5 es un superconjunto del lenguaje de programación C. La diferencia principal entre C y C5 es que el sistema de tipos de C5 acepta definiciones de tipos de pares dependientes, es decir, que el tipo del segundo miembro del par depende del valor del primero (el cual es un tipo). Otra extensión de C5 es la expresión de inicialización de tipo que es una secuencia de pares dependientes que se puede adjuntar a una expresión de tipo en una declaración de tipo. Estas extensiones le otorgan a C5 la capacidad de hacer inspecciones de tipos dinámicos en tiempo de ejecución y realizar declaraciones de tipos con atributos. El trabajo presenta las mejoras de la version 0.98 y en particular las funciones C5 scanf, C5 printf, C5 lenSearch y C5 idxSearch

    PROGRAMMING LANGUAGES À LA CARTE

    Get PDF
    Code reuse in computer language development is an open research problem. Feature-oriented programming is a vision of computer programming in which features can be implemented separately, and then combined to build a variety of software products; the idea of combining feature orientation and language development is relatively recent. Many frameworks for modular language development have been proposed during the years, but, although there is a strong connection between modularity and feature-orientation development, only few of these frameworks provide primitives to combine these two concepts. This work presents a model of modular language development that is directed towards feature orientation. We describe its implementation in the Neverlang framework. The model has been evaluated through several experiences: among the others, we present a code generator for a state machine language, that we use as a means to compare to other state-of-the-art frameworks, and a JavaScript interpreter implementation that further illustrates the capabilities of our solution

    Assertion level proof planning with compiled strategies

    Get PDF
    This book presents new techniques that allow the automatic verification and generation of abstract human-style proofs. The core of this approach builds an efficient calculus that works directly by applying definitions, theorems, and axioms, which reduces the size of the underlying proof object by a factor of ten. The calculus is extended by the deep inference paradigm which allows the application of inference rules at arbitrary depth inside logical expressions and provides new proofs that are exponentially shorter and not available in the sequent calculus without cut. In addition, a strategy language for abstract underspecified declarative proof patterns is developed. Together, the complementary methods provide a framework to automate declarative proofs. The benefits of the techniques are illustrated by practical applications.Die vorliegende Arbeit beschäftigt sich damit, das Formalisieren von Beweisen zu vereinfachen, indem Methoden entwickelt werden, um informale Beweise formal zu verifizieren und erzeugen zu können. Dazu wird ein abstrakter Kalkül entwickelt, der direkt auf der Faktenebene arbeitet, welche von Menschen geführten Beweisen relativ nahe kommt. Anhand einer Fallstudie wird gezeigt, dass die abstrakte Beweisführung auf der Fakteneben vorteilhaft für automatische Suchverfahren ist. Zusätzlich wird eine Strategiesprache entwickelt, die es erlaubt, unterspezifizierte Beweismuster innerhalb des Beweisdokumentes zu spezifizieren und Beweisskizzen automatisch zu verfeinern. Fallstudien zeigen, dass komplexe Beweismuster kompakt in der entwickelten Strategiesprache spezifiziert werden können. Zusammen bilden die einander ergänzenden Methoden den Rahmen zur Automatisierung von deklarativen Beweisen auf der Faktenebene, die bisher überwiegend manuell entwickelt werden mussten

    Assertion level proof planning with compiled strategies

    Get PDF
    This book presents new techniques that allow the automatic verification and generation of abstract human-style proofs. The core of this approach builds an efficient calculus that works directly by applying definitions, theorems, and axioms, which reduces the size of the underlying proof object by a factor of ten. The calculus is extended by the deep inference paradigm which allows the application of inference rules at arbitrary depth inside logical expressions and provides new proofs that are exponentially shorter and not available in the sequent calculus without cut. In addition, a strategy language for abstract underspecified declarative proof patterns is developed. Together, the complementary methods provide a framework to automate declarative proofs. The benefits of the techniques are illustrated by practical applications.Die vorliegende Arbeit beschäftigt sich damit, das Formalisieren von Beweisen zu vereinfachen, indem Methoden entwickelt werden, um informale Beweise formal zu verifizieren und erzeugen zu können. Dazu wird ein abstrakter Kalkül entwickelt, der direkt auf der Faktenebene arbeitet, welche von Menschen geführten Beweisen relativ nahe kommt. Anhand einer Fallstudie wird gezeigt, dass die abstrakte Beweisführung auf der Fakteneben vorteilhaft für automatische Suchverfahren ist. Zusätzlich wird eine Strategiesprache entwickelt, die es erlaubt, unterspezifizierte Beweismuster innerhalb des Beweisdokumentes zu spezifizieren und Beweisskizzen automatisch zu verfeinern. Fallstudien zeigen, dass komplexe Beweismuster kompakt in der entwickelten Strategiesprache spezifiziert werden können. Zusammen bilden die einander ergänzenden Methoden den Rahmen zur Automatisierung von deklarativen Beweisen auf der Faktenebene, die bisher überwiegend manuell entwickelt werden mussten
    corecore