286 research outputs found

    Faithful (meta-)encodings of programmable strategies into term rewriting systems

    Get PDF
    Rewriting is a formalism widely used in computer science and mathematical logic. When using rewriting as a programming or modeling paradigm, the rewrite rules describe the transformations one wants to operate and rewriting strategies are used to con- trol their application. The operational semantics of these strategies are generally accepted and approaches for analyzing the termination of specific strategies have been studied. We propose in this paper a generic encoding of classic control and traversal strategies used in rewrite based languages such as Maude, Stratego and Tom into a plain term rewriting system. The encoding is proven sound and complete and, as a direct consequence, estab- lished termination methods used for term rewriting systems can be applied to analyze the termination of strategy controlled term rewriting systems. We show that the encoding of strategies into term rewriting systems can be easily adapted to handle many-sorted signa- tures and we use a meta-level representation of terms to reduce the size of the encodings. The corresponding implementation in Tom generates term rewriting systems compatible with the syntax of termination tools such as AProVE and TTT2, tools which turned out to be very effective in (dis)proving the termination of the generated term rewriting systems. The approach can also be seen as a generic strategy compiler which can be integrated into languages providing pattern matching primitives; experiments in Tom show that applying our encoding leads to performances comparable to the native Tom strategies

    A Type System for Tom

    Get PDF
    Extending a given language with new dedicated features is a general and quite used approach to make the programming language more adapted to problems. Being closer to the application, this leads to less programming flaws and easier maintenance. But of course one would still like to perform program analysis on these kinds of extended languages, in particular type checking and inference. In this case one has to make the typing of the extended features compatible with the ones in the starting language. The Tom programming language is a typical example of such a situation as it consists of an extension of Java that adds pattern matching, more particularly associative pattern matching, and reduction strategies. This paper presents a type system with subtyping for Tom, that is compatible with Java's type system, and that performs both type checking and type inference. We propose an algorithm that checks if all patterns of a Tom program are well-typed. In addition, we propose an algorithm based on equality and subtyping constraints that infers types of variables occurring in a pattern. Both algorithms are exemplified and the proposed type system is showed to be sound and complete

    Formal Validation of Pattern Matching code

    Get PDF
    When addressing the formal validation of generated software, two main alternatives consist either to prove the correctness of compilers or to directly validate the generated code. Here, we focus on directly proving the correctness of compiled code issued from powerful pattern matching constructions typical of ML like languages or rewrite based languages such as ELAN, MAUDE or Tom. In this context, our first contribution is to define a general framework for anchoring algebraic pattern-matching capabilities in existing languages like C, Java or ML. Then, using a just enough powerful intermediate language, we formalize the behavior of compiled code and define the correctness of compiled code with respect to pattern-matching behavior. This allows us to prove the equivalence of compiled code correctness with a generic first-order proposition whose proof could be achieved via a proof assistant or an automated theorem prover. We then extend these results to the multi-match situation characteristic of the ML like languages. The whole approach has been implemented on top of the Tom compiler and used to validate the syntactic matching code of the Tom compiler itself

    Tom-based tools to transform EMF models in avionics context

    Get PDF
    International audienceModel Driven Engineering (MDE) is now widely used in many industrial contexts (such as AeroSpace) which require a high level of system safety. Model-checking is one of the formal techniques which are used to assess a system compliance to its requirements. It relies on verification dedicated languages to model the system under verification and the expected properties. In order to ease the use of these tools, model transformations are provided that translate the end user provided system model to the formal languages than can be verified. In order to rely on these activities for system certification, the correctness of these transformation steps must be assessed (qualification of the development and verification tools). One of the goal of our work is to provide tools to implement the transformation steps between end user source languages used for the system development and target languages used for formal verification. This paper present the {Tom} rule-based approach used in a research project involving industrial partners: Airbus and Ellidiss

    Rules and Strategies in Java

    Get PDF
    International audienceIn this paper we present the essential feature we have considered when designing a new language based on rules and strategies. Relying on the implementation of Tom, we explain how these ingredients can be implemented and integrated in a Java environment

    Term-graph rewriting via explicit paths

    Get PDF
    International audienceThe notion of path is classical in graph theory but not directly used in the term rewriting community. The main idea of this work is to raise the notion of path to the level of first-order terms, i.e. paths become part of the terms and not just meta-information about them. These paths are represented by sequences of integers (positive or negative) and are interpreted as relative addresses in terms. In this way, paths can also be seen as a generalization of the classical notion of position for the first-order terms and of de Bruijn indexes for the lambda calculus. In this paper, we define an original framework called Addressed Term Rewriting where paths are used to represent pointers between subterms. Using this approach, any term-graph rewriting systems can be efficiently simulated using a rewrite-based environment

    GC^2: A Generational Conservative Garbage Collector for the ATerm Library

    Get PDF
    The ATerm library is a well-designed and well-known library in the term rewriting community. In this paper, we discuss the current garbage collector provided with the library and stress the fact that some peculiarities of this functional library could be taken advantage of by the memory management system. We explain how we designed and implemented GC², a new mark-and-sweep generational garbage collector for the ATerm library that builds upon these peculiarities. Experimental results on various programs validate our approach, and show that the performance of our new algorithm is very good

    Software Quality Improvement via Pattern Matching

    Get PDF
    International audienceNested If-Then-Else statements is the most common programming schema in applications like data transformation or data analysis. In most cases, these can be replaced by higher level pattern matching constructs, rendering the code more readable and easier to maintain. We present a tool that integrates strong semantically grounded pattern matching features in Java via a plug-in for the Eclipse platform

    Pattern eliminating transformations

    Get PDF
    National audienceProgram transformation is a common practice in computer science, and its many applications can have a range of dierent objectives. For example, a program written in an original high level language could be either translated into machine code for execution purposes, or towards a language suitable for formal verication. Languages often have a lot of dierent constructions, and thus, transformations often focus on eliminating some of these constructions, or at least processing some specic sequence of constructions. Rewriting is a widely established formalism to describe the mechanism and the logic behind such transformations. It relies mainly on the principle of rewrite rules to describe the dier-ent operations performed. Generally type-preserving, these rewrite rules can ensure that the transformation result has a given type and thus give syntactic guarantees on the constructions it consists of. However, we sometimes want the transformation to provide more guarantees on the shape of its result by specifying that some patterns of constructions does not appear. For this purpose, we propose in this paper an approach based on annotating transformation function symbols with (anti-)pattern in order for such transformation to guarantee stronger properties on the shape of its result. With the generic principles governing term algebra and rewriting, we believe this approach to be an accurate formalism to any language providing pattern-matching primitives

    DĂ©fis 2025

    Get PDF
    International audienceNew paradigms, languages, modeling, verification, testing approaches and new tools in the field of programming and software should be created in the next 10 years, whether to make life easier for designers and maintainers of computer systems, to model and reliable software or to anticipate technological change. This text summarizes the challenges in the Programming and Software Engineering field on the horizon 2025. This work has been presented and discussed during the national days of the Research Group on Programming and Software Engineering in June 2014 and in September 2014 in Paris.De nouveaux paradigmes, de nouveaux langages, de nouvelles approches de modélisation, de vérification, de tests et de nouveaux outils dans le domaine de la programmation et du logiciel devraient voir le jour dans les dix ans à venir, que ce soit pour faciliter la vie des concepteurs et mainteneurs de systèmes informatiques, pour modéliser et fiabiliser les logiciels ou encore pour devancer l’évolution technologique. Ce texte résume les travaux menés sur les défis du Génie de la Programmation et du Logiciel à l’horizon 2025. Ces travaux ont été l’occasion de présentations et d’échanges lors des journées nationales du Groupe de Recherche Génie de la Programmation et du Logiciel en juin 2014 et lors d’une journée en septembre 2014 à Paris
    • …
    corecore