6 research outputs found

    Abstract-Syntax-Driven Development of Oberon-0 Using YAJCo

    Get PDF
    YAJCo is a tool for the development of software languages based on an annotated language model. The model is represented by Java classes with annotations defining their mapping to concrete syntax. This approach to language definition enables the abstract syntax to be central point of the development process, instead of concrete syntax. In this paper a case study of Oberon-0 programming language development is presented. The study is based on the LTDA Tool Challenge and showcases details of abstract and concrete syntax definition using YAJCo, as well as implementation of name resolution, type checking, model transformation and code generation. The language was implemented in modular fashion to demonstrate language extension mechanisms supported by YAJCo

    Simpl: valdkonnaspetsiifiliste keelte loomise tööriist ettevõttetarkvara arendamiseks

    Get PDF
    Domain specific languages (DSLs) are languages designed with the specific purpose of developing or configuring part of a software system using concepts that are close to those of the system's application domain. Documented benefits of DSLs include increased development productivity, flexibility and maintainability, as well as separation of business and technical aspects allowing in some cases non-technical stakeholders to closely partake in the software development process. DSLs however comes at a potentially non-negligible cost, that of creating and maintaining DSL implementations. These costs can be reduced by means of specialized tools that support the creation of parsers, analyzers, code generators, pretty-printers, and other functions associated with a DSL. This thesis deals with the problem of enabling cost-effective DSL-based development in the context of Enterprise Information Systems (EIS). EISs are generally built using application frameworks and middleware. Accordingly, it must be possible to package the DSL implementation as a module that can be called from either the build system or from the enterprise system itself. Additionally, the DSL tool should be accessible to enterprise system developers with little or no expertise in development of programming languages and supporting tools, such as Integrated Development Environments. The central contribution of the thesis is Simpl, a DSL toolkit designed to meet the needs of enterprise software development. Simpl builds up on top of existing tools and programming languages, and introduces the following features: a grammar description language that supports the generation of both the parser and the data types for representing abstract syntax trees; support for lexer states that add context-sensitivity to lexer in a controlled manner; a pretty-printing library; an IDE framework; and an integration layer that combines all components into a single whole and minimizes the need for boilerplate code.Valdkonnaspetsiifilised programmeerimiskeeled (domain specific language, DSL) on keeled, mis on välja töötatud kasutamiseks mingis konkreetses rakendusvaldkonnas. Spetsialiseerumine võimaldab DSLis kasutada konstruktsioone, mis sobivad hästi antud valdkonna mõistete esitamiseks. DSLide kasutamine annab võrreldes üldotstarbeliste keeltega mitmeid eeliseid nagu näiteks kõrgem tarkvaraarenduse efektiivsus ning paindlikum ja hästi hooldatav lõpptulemus. Samuti saavad DSLide abil tarkvaraarenduses osaleda ka isikud, kelle tehnilised oskused ei ole piisavad üldotstarbelistes keeltes programmeerimiseks, näiteks süsteemianalüütikud, lõppkasutajad jne. Teisest küljest kaasnevad DSLide kasutamisega ka kulutused DSLide välja töötamiseks ning haldamiseks. DSL-põhist tarkvaraarendust saab muuta efektiivsemaks, kasutades DSLide realiseerimiseks spetsiaalseid tööriistu. Käesoleva väitekirja fookuses on kuluefektiivne DSLide kasutamisel põhinev ettevõttetarkvara arendus. Ettevõtteinfosüsteemid realiseeritakse tüüpiliselt raamistike ja valmiskomponentide abil. Seega peab olema võimalik pakendada DSLi realisatsioon moodulina, mida on võimalik välja kutsuda kas ehitussüsteemist või EISist endast. DSLi realiseerimise tööriist peab sobima kasutamiseks ka tarkvaraarendajatele, kellel ei ole kogemusi programmeerimiskeelte ja neid toetavate vahendite arendamiseks. Töö olulisemad väited on järgmised. Esiteks, ettevõttetarkvara arendamisel on oma spetsiifika, mis seab nõudeid DSLidele ning nende realiseerimiseks kasutatavatele tööriistadele. Teiseks, enamik populaarseid tööriistu, eriti integreeritud tööriistu, mis katavad ära kogu DSLi realiseerimiseks vajaliku tegevuste spektri, ei rahulda vähemalt osaliselt neid nõudeid. Kolmandaks, me demonstreerime, et on võimalik töötada välja DSL tööriist, mis on sobiv ettevõtteinfosüsteemide arendamiseks ning mis pakub olemasolevate tööriistadega võrreldavat kasutusmugavust.valdkonnaspetsiifilised keeledettevõttedhaldusinfosüsteemiddomain specific languagesenterprisesmanagement information system

    Modular and type-safe definition of Attribute Grammars with AspectAG

    Get PDF
    AspectAG is a Haskell-embedded domain-specific language (EDSL) that encodes first-class attribute grammars (AGs). AspectAG ensures the wellformedness of AGs at compile time by using extensible records and predicates encoded using old-fashioned type-level programming features, such as multiparameter type classes and functional dependencies. AspectAG suffers the usual drawbacks of EDSLs: when type errors occur they usually do not deliver error messages that refer to domain terms, but to the host language. Often, implementation details of the EDSL are leaked in those messages. The use of type-level programming techniques makes the situation worse since type-level abstraction mechanisms are quite poor. Additionally, old-fashioned type-level programs are untyped at type-level, which is inconsistent with the general approach of strongly-typed functional programming. By using modern Haskell extensions and techniques we propose a reworked version of AspectAG that tackles those weaknesses. New AG definitions are safer, both at the level of types and at the level of kinds. Furthemore, a set of identified domain-specific errors are reported with DSL-oriented messages. To achieve this, we define and use a framework for manipulating type errors that can be used in any EDSL. We show the pragmatics of AspectAG by defining languages and extending them both with new syntax and semantics. We use MateFun, a purelyfunctional language used to teach mathematics as a case study.AspectAG es un lenguaje de dominio específico embebido (EDSL) que codifica gramáticas de atributos (AGs) como ciudadanos de primera clase. AspectAG garantiza la buena formación de las AGs en tiempo de compilación por medio del uso de registros extensibles y predicados, codificados gracias al uso de características antiguas de programación a nivel de tipos, como clases multiparámetro y dependencias funcionales. AspectAG sufre las desventajas usuales de los EDSLs: cuando ocurren errores de tipado, los mensajes de error reportados no se expresan en términos del dominio, sino del lenguaje anfitrión. También es usual que detalles de implementación del EDSL se vean filtrados en estos mensajes. El uso de técnicas de programación a nivel de tipos agrava la situación porque los mecanismos de abstracción a nivel de tipos son pobres. Ademas, las técnicas de programación a nivel de tipos usadas en AspectAG son esencialmente no tipadas, lo que es inconsistente con nuestro enfoque de tipado fuerte. Usando extensiones modernas al sistema de tipos de Haskell, proponemos una nueva versión de la biblioteca AspectAG, abordando los problemas antes mencionados. Las nuevas definiciones de AGs son mas seguras tanto a nivel de tipado como a nivel de kinds (tipado a nivel de tipos). Ademas, un conjunto identificado de errores específicos del dominio son reportados con mensajes referentes al mismo. Para lograr esto, definimos y utilizamos un framework para manipular errores de tipado, que puede ser aplicado a cualquier EDSL. Mostramos la pragmática de AspectAG definiendo lenguajes y extendiéndoles con nueva sintaxis y con nueva semántica. Utilizamos el lenguaje MateFun, un lenguaje funcional puro utilizado para enseñar matemáticas como caso de estudio

    The modular compilation of effects

    Get PDF
    The introduction of new features to a programming language often requires that its compiler goes to the effort of ensuring they are introduced in a manner that does not interfere with the existing code base. Engineers frequently find themselves changing code that has already been designed, implemented and (ideally) proved correct, which is bad practice from a software engineering point of view. This thesis addresses the issue of constructing a compiler for a source language that is modular in the computational features that it supports. Utilising a minimal language that allows us to demonstrate the underlying techniques, we go on to introduce a significant range of effectful features in a modular manner, showing that their syntax can be compiled independently, and that source languages containing multiple features can be compiled by making use of a fold. In the event that new features necessitate changes in the underlying representation of either the source language or that of the compiler, we show that our framework is capable of incorporating these changes with minimal disruption. Finally, we show how the framework we have developed can be used to define both modular evaluators and modular virtual machines

    The modular compilation of effects

    Get PDF
    The introduction of new features to a programming language often requires that its compiler goes to the effort of ensuring they are introduced in a manner that does not interfere with the existing code base. Engineers frequently find themselves changing code that has already been designed, implemented and (ideally) proved correct, which is bad practice from a software engineering point of view. This thesis addresses the issue of constructing a compiler for a source language that is modular in the computational features that it supports. Utilising a minimal language that allows us to demonstrate the underlying techniques, we go on to introduce a significant range of effectful features in a modular manner, showing that their syntax can be compiled independently, and that source languages containing multiple features can be compiled by making use of a fold. In the event that new features necessitate changes in the underlying representation of either the source language or that of the compiler, we show that our framework is capable of incorporating these changes with minimal disruption. Finally, we show how the framework we have developed can be used to define both modular evaluators and modular virtual machines

    A Modular Specification of Oberon0 Using the Silver Attribute Grammar System

    No full text
    Rights: GNU General Public License, http://www.gnu.org/licenses/gpl-3.0.en.htmlThis repository contains the implementation of Oberon0 using the Silver attribute grammar system for the Tool Challenge at the 2011 International Workshop on Language Descriptions, Tools, and Applications. Silver was developed to study how independently-developed language extension specifications can be imported into a host language specification to define a new custom extended language. Thus it contains many features useful in modular language specification, such as forwarding, higher-order attributes, reference/remote attributes, and a simplified form of collection attributes. These are discussed in the context of the Oberon0 specification presented here. This is the specification accompanying the paper "A modular specification of Oberon0 using the Silver attribute grammar system" by Ted Kaminski and Eric Van Wyk
    corecore