Towards an intermediate language based on Graph Rewriting (original) (raw)

LEAN: AN INTERMEDIATE LANGUAGE BASED ON GRAPH REWRITING

Lean is an experimental language for specifying computations in terms of graph rewriting. It is based on an alternative to Term Rewriting Systems (TRS) in which the terms are replaced by graphs. Such a Graph Rewriting System (GRS) consists of a set of graph rewrite rules which specify how a graph may be rewritten. Besides supporting functional programming, Lean also describes imperative constructs and allows the manipulation of cyclic graphs. Programs may exhibit non-determinism as well as parallelism. In particular, Lean can serve as an intermediate language between declarative languages and machine architectures, both sequential and parallel. This paper is a revised version of Barendregt et al. (1987b) which was presented at the ESPRIT, PARLE conference in Eindhoven, The Netherlands, June 1987.

Clean—a language for functional graph rewriting

Functional Programming Languages and Computer Architecture, 1987

Clean is an experimental language for specifying functional computations in terms of graph rewriting. It is based on an extension of Term Rewriting Systems (TRS) in which the terms are replaced by graphs. Such a Graph Rewriting System (GRS) consists of a, possibly cyclic, directed graph, called the data graph and graph rewrite rules which specify how this data graph may be rewritten. Clean is designed to provide a firm base for functional programming. In particular, Clean is suitable as an intermediate language between ...

Dactl: An Experimental Graph Rewriting Language

Journal of Programming Languages, 1997

A generalized computational model based on graph rewriting is presented along with Dactl, an associated compiler target (intermediate) language. An illustration of the capability of graph rewriting to model a variety of computational formalisms is presented by showing how some examples written originally in a number of languages can be described as graph rewriting transformations using Dactl notation. This is followed by a formal presentation of the Dactl model before giving a formal definition of the syntax and semantics of the language. Some implementation issues are also discussed.

CLEAN: A language for functional graph writing

Functional Programming Languages and Computer Architecture, 1987

Clean is an experimental language for specifying functional computations in terms of graph rewriting. It is based on an extension of Term Rewriting Systems (TRS) in which the terms are replaced by graphs. Such a Graph Rewriting System (GRS) consists of a, possibly cyclic, directed graph, called the data graph and graph rewrite rules which specify how this data graph

Parallel graph rewriting on loosely coupled machine architectures

Lecture Notes in Computer Science, 1991

Graph rewriting models are very suited to serve as the basic computational model for functional languages and their implementation. Graphs are used to share computations which is needed to make efficient implementations of functional languages on sequential hardware possible. When graphs are rewritten (reduced) on parallel loosely coupled machine architectures, subgraphs have to be copied from one processor to another such that sharing is lost. In this paper we introduce the notion of lazy copying. With lazy copying it is possible to duplicate a graph without duplicating work. Lazy copying can be combined with simple mmotations which control the order of reduction. In principle, only interleaved execution of the individual reduction steps is possible. However, a condition is deduced under which parallel execution is allowed. When only certain combinations of lazy copying and annotations are used it is guarantied that this so-called non-interference condition is fulfilled. Abbreviations for these combinations are introduced. Now complex process behavlours, such as process communication on a loosely coupled parallel machine architecture, can be modelled. This also includes a special case: modelling mnltlprocessing on a single processor. Arbitrary process topologies can be created. Synchronous and asyncbronons process communication can be modelled. The implementation of the language Concurrent Clean, which is based on the proposed graph rewriting model, has shown that complicated parallel algorithms which can go far beyond divide-and-conquar like applications can be expressed.

Dactl: an experimental graph rewriting

Journal of …, 1997

A generalized computational model based on graph rewriting is presented along with Dactl, an associated compiler target (intermediate) language. An illustration of the capability of graph rewriting to model a variety of computational formalisms is presented by showing how some examples written originally in a number of languages can be described as graph rewriting transformations using Dactl notation. This is followed by a formal presentation of the Dactl model before giving a formal definition of the syntax and semantics of the language. Some implementation issues are also discussed.

Graph rewriting semantics for functional programming languages

1997

The lambda calculus forms without any question* the* theoretical backbone of functional programming languages. For the design and implementation of the lazy functional language Concurrent Clean we have used a related computational model: Term Graph Rewriting Systems (TGRS's). This paper wraps up our main conclusions after 10 years of experience with graph rewriting semantics for functional programming languages.

Functional programming and parallel graph rewriting

1993

In a declarative programming language a computation is expressed in a static fashion, as a list of declarations. A program in such a language is regarded as a specification that happens to be executable as well. In this textbook we focus on a subclass of the declarative languages, the functional programming languages, sometimes called applicative languages. In these languages a program consists of a list of function definitions. The execution of a program consists of the evaluation of a function application given the functions that have been defined.

Linear behaviour of term graph rewriting programs

Proceedings of the 1995 ACM symposium on Applied computing - SAC '95, 1995

et al. ([18]) gives an accurate reflection of contemporary interest in this area. The generalised term graph rewriting computational model is exploited to implement concurrent languages based on Girard's Linear Logic (LL). In particular a fragment of LL is identified which is able to serve as a "process calculus" and on which the design of a number of languages can be based. It is then shown how this fragment can be mapped onto equivalent sets of graph rewriting rules that both preserve the functionality of the LL connectives and also exploit the properties of linearity for efficient implementation on a distributed architecture. Notions such as channels, production and consumption of messages, and N-toN communication between agents, are interpreted in the world of (term) graph rewriting. This work serves two purposes: i) to extend the notion of Term Graph Rewriting as a generalised computational model for the case of linear concurrent languages, and ii) to act as an initial investigation towards a fully linear term graph rewriting model of computation able to be implemented efficiently on distributed architectures.

A study of two graph rewriting formalisms: Interaction Nets and MONSTR

1997

Two superficially similar graph rewriting formalisms, Interaction Nets and MONSTR, are studied. Interaction Nets come from multiplicative Linear Logic and feature undirected graph edges, while MONSTR arose from the desire to implement generalized term graph rewriting efficiently on a distributed architecture and utilizes directed graph arcs. Both formalisms feature rules with small left-hand sides consisting of two main graph nodes. A translation of Interaction Nets into MONSTR is described for both typed and untyped nets, while the impossibility of the opposite translation rests on the fact that net rewriting is always Church-Rosser while MONSTR rewriting is not. Some extensions to the net formalism suggested by the relationship with MONSTR are discussed, as well as some related implementation issues.