6 research outputs found

    Pretty-printing for software reengineering

    Get PDF
    Automatic software reengineerings change or repair existing software systems. They are usually tailor-made for a specific customer and language dependent. Maintaining similar reengineerings for multiple customers and different language dialects might therefore soon become problematic unless advanced language technology is being used. Generic pretty-printing is part of such technology and is the subject of this paper. We discuss specific pretty-print aspects of software reengineering such as fulfilling customer-specific format conventions, preserving existing layout, and producing multiple output formats. In addition, we describe pretty-print techniques that help to reduce maintenance effort of tailor-made reengineerings supporting multiple language dialects. Applications, such as COLBOL reengineering and SDL documentation generation show that our techniques, implemented in the generic pretty-printer GPP, are feasible

    An industrial application of context-sensitive formatting.

    Get PDF
    Automated formatting is an important technique for the software maintainer. It is either applied separately to improve the readability of source code, or as part of a source code transformation tool chain. In this paper we report on the application of generic tools for constructing formatters. In an industrial setting automated formatters need to be tailored to the requirements of the customer. The (legacy) programming language or dialect and the corporate formatting conventions are specific and non-negotiable. Can generic formatting tools deal with such unexpected requirements? Driven by an industrial case of 78 thousand lines of Cobol code, several limitations in existing formatting technology have been addressed. We improved its flexibility by replacing a generative phase by a generic tool, and we added a little expressiveness to the formatting backend. Most importantly, we employed a multi-stage formatting architecture that can cope with any kind of formatting convention using more computational powe

    VooDooM : support for understanding and re-engineering of VDM-SL specifications

    Get PDF
    Tese mestrado informáticaThe main purpose of this work is to define steady ground for supporting the understanding and re-engineering of VDM-SL specifications. Understanding and re-engineering are justified by Lehman’s laws of software evolution which state, for instance, that systems must be continually adapted and as a program evolves its complexity increases unless specific work is done to reduce it. This thesis reports the implementation of understanding and re-enginering techniques in a tool called VooDooM, which was built in three well defined steps. First, development of the language front-end to recognize the VDMSL language, using a grammar-centered approach, supported by the SDF formalism, in which a wide variety of components are automatically generated from a single grammar; Second, development of understanding support, in which graphs are extracted and derived and subsequently used as input to strongly-connected components, formal concept analysis and metrication. Last, development of re-engineering support, through the development of a relational calculator that transforms a formal specification into an equivalent model which can be translated to SQL. In all steps of the work we thoroughly document the path from theory to practice and we conclude by reporting successful results obtained in two test cases.O objectivo principal deste trabalho é a definiçãoo de uma infra-estrutura para suportar compreensão e re-engenharia de especificações escritas em VDM-SL. compreensão e re-engenharia justificam-se pelas leis de evolução do software. Estas leis, formuladas por Lehman, definem, por exemplo, que um qualquer sistema deve ser continuamente adaptado e `a medida que os programas evoluem a sua complexidade tende sempre a aumentar. Esta tese descreve o estudo de técnicas de compreensão e re-engenharia que foram implementadas numa ferramenta chamada VooDooM. Esta implementação foi efectuada em três etapas bem definidas. Primeiro, foi desenvolvido um parser (front-end) para reconhecer a linguagem VDM-SL. Para tal, foi utilizada uma abordagem centrada na gramática, suportada no formalismo SDF, que está equipado com ferramentas de geração automática de diversos componentes. Segundo, para o suporte de compreensão, foram desenvolvidas funcionalidades para extrair e derivar grafos que são utilizados em técnicas de análise como componentes fortemente relacionados, análise de conceitos (formal concept analysis) e métricas. Por último, para o suporte de re-engenharia, foi prototipada uma calculadora relacional que transforma um modelo, definido numa especificação formal, no seu equivalente relacional que pode ser traduzido para SQL. Em todas as etapas realizadas h a preocupação de documentar o percurso entre teoria para a prática. A análise de resultados obtida no estudo de caso revela o sucesso da abordagem e as suas potencialidades para desenvolvimentos futuros

    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

    Well-Formed and Scalable Invasive Software Composition

    Get PDF
    Software components provide essential means to structure and organize software effectively. However, frequently, required component abstractions are not available in a programming language or system, or are not adequately combinable with each other. Invasive software composition (ISC) is a general approach to software composition that unifies component-like abstractions such as templates, aspects and macros. ISC is based on fragment composition, and composes programs and other software artifacts at the level of syntax trees. Therefore, a unifying fragment component model is related to the context-free grammar of a language to identify extension and variation points in syntax trees as well as valid component types. By doing so, fragment components can be composed by transformations at respective extension and variation points so that always valid composition results regarding the underlying context-free grammar are yielded. However, given a language’s context-free grammar, the composition result may still be incorrect. Context-sensitive constraints such as type constraints may be violated so that the program cannot be compiled and/or interpreted correctly. While a compiler can detect such errors after composition, it is difficult to relate them back to the original transformation step in the composition system, especially in the case of complex compositions with several hundreds of such steps. To tackle this problem, this thesis proposes well-formed ISC—an extension to ISC that uses reference attribute grammars (RAGs) to specify fragment component models and fragment contracts to guard compositions with context-sensitive constraints. Additionally, well-formed ISC provides composition strategies as a means to configure composition algorithms and handle interferences between composition steps. Developing ISC systems for complex languages such as programming languages is a complex undertaking. Composition-system developers need to supply or develop adequate language and parser specifications that can be processed by an ISC composition engine. Moreover, the specifications may need to be extended with rules for the intended composition abstractions. Current approaches to ISC require complete grammars to be able to compose fragments in the respective languages. Hence, the specifications need to be developed exhaustively before any component model can be supplied. To tackle this problem, this thesis introduces scalable ISC—a variant of ISC that uses island component models as a means to define component models for partially specified languages while still the whole language is supported. Additionally, a scalable workflow for agile composition-system development is proposed which supports a development of ISC systems in small increments using modular extensions. All theoretical concepts introduced in this thesis are implemented in the Skeletons and Application Templates framework SkAT. It supports “classic”, well-formed and scalable ISC by leveraging RAGs as its main specification and implementation language. Moreover, several composition systems based on SkAT are discussed, e.g., a well-formed composition system for Java and a C preprocessor-like macro language. In turn, those composition systems are used as composers in several example applications such as a library of parallel algorithmic skeletons
    corecore