157 research outputs found

    Data-Structure Rewriting

    Full text link
    We tackle the problem of data-structure rewriting including pointer redirections. We propose two basic rewrite steps: (i) Local Redirection and Replacement steps the aim of which is redirecting specific pointers determined by means of a pattern, as well as adding new information to an existing data ; and (ii) Global Redirection steps which are aimed to redirect all pointers targeting a node towards another one. We define these two rewriting steps following the double pushout approach. We define first the category of graphs we consider and then define rewrite rules as pairs of graph homomorphisms of the form "L R". Unfortunately, inverse pushouts (complement pushouts) are not unique in our setting and pushouts do not always exist. Therefore, we define rewriting steps so that a rewrite rule can always be performed once a matching is found

    Categorical Abstract Rewriting Systems and Functoriality of Graph Transformation

    Get PDF
    Rewriting systems are often defined as binary relations over a given set of objects. This simple definition is used to describe various properties of rewriting such as termination, confluence, normal forms etc. In this paper, we introduce a new notion of abstract rewriting in the framework of categories. Then, we define the functoriality property of rewriting systems. This property is sometimes called vertical composition. We show that most of graph transformation systems are functorial and provide a counter-example of graph transformation systems which is not functorial

    A Modal Logic for Termgraph Rewriting

    Full text link
    We propose a modal logic tailored to describe graph transformations and discuss some of its properties. We focus on a particular class of graphs called termgraphs. They are first-order terms augmented with sharing and cycles. Termgraphs allow one to describe classical data-structures (possibly with pointers) such as doubly-linked lists, circular lists etc. We show how the proposed logic can faithfully describe (i) termgraphs as well as (ii) the application of a termgraph rewrite rule (i.e. matching and replacement) and (iii) the computation of normal forms with respect to a given rewrite system. We also show how the proposed logic, which is more expressive than propositional dynamic logic, can be used to specify shapes of classical data-structures (e.g. binary trees, circular lists etc.)

    Transformation of Attributed Structures with Cloning (Long Version)

    Full text link
    Copying, or cloning, is a basic operation used in the specification of many applications in computer science. However, when dealing with complex structures, like graphs, cloning is not a straightforward operation since a copy of a single vertex may involve (implicitly)copying many edges. Therefore, most graph transformation approaches forbid the possibility of cloning. We tackle this problem by providing a framework for graph transformations with cloning. We use attributed graphs and allow rules to change attributes. These two features (cloning/changing attributes) together give rise to a powerful formal specification approach. In order to handle different kinds of graphs and attributes, we first define the notion of attributed structures in an abstract way. Then we generalise the sesqui-pushout approach of graph transformation in the proposed general framework and give appropriate conditions under which attributed structures can be transformed. Finally, we instantiate our general framework with different examples, showing that many structures can be handled and that the proposed framework allows one to specify complex operations in a natural way

    On Term-Graph Rewrite Strategies

    Get PDF
    AbstractWe tackle the problem of cyclic term-graph rewriting. We first revisit the classical algorithmic approach to term-graph rewriting by providing a definition of rewrite rules of the form lhs→rhs where the left-hand sides are term-graphs and the right-hand sides are sequences of actions. Such actions, which specify how to rewrite a term-graph in a stepwise manner, contribute to simplify substantially the definition of cyclic term-graph rewriting. Then we define a new class of term-graph rewrite systems which are confluent over the so-called admissible term-graphs. Finally, we provide an efficient rewrite strategy which contracts only needed redexes and give pointers to other results regarding optimal rewrite strategies of admissible term-graphs

    Priority-Independent Rewrite Systems for Pointer-based Data-Structures

    No full text
    20 pagesWe define a syntactic class of graphs and graph rewrite systems for which the normal forms are independent from the order in which the nodes are reduced. This result, that is not covered by existing approaches in graph rewriting, allows us to devise simple confluence criteria and efficient normalization algorithms. It is based on a static analysis of the rewrite system, including a thorough analysis of the shape of the graphs generated during the rewriting process. The considered graphs naturally encode pointer-based data structures that are commonly used in practical programming and the rewrite rules can simulate any elementary transformation on these data structures (edge redirection, node relabeling etc.)
    corecore