Experience using an intermediate compiler target language for parallel machines (original) (raw)
Related papers
Parallel term graph rewriting and concurrent logic programs
1993
General term graph rewriting is a powerful computational model, suitable for implementing a wide variety of declarative language paradigms. Here, we address the problems involved in the implementation, on a loosely-coupled architecture, of an intermediate language based on term graph rewriting, DACTL. In general, such problems are severe, so a subset of this language called MONSTR is defined, free from some of the inefficiencies in the original model (such as an excessive necessity for locking). Superficially, much of the expressiveness of the original model is compromised thereby, especially with regard to the implementation of concurrent logic languages. However, transformation techniques that are valid in the context of declarative language translations, and that map fairly general DACTL rule sets to equivalent MONSTR rule sets without endangering the semantics of the former can be defined. These techniques use shared graph nodes that reflect states of computation, and are similar to the logical variable.
The usefulness of the generalised computational model of Term Graph Rewriting Systems (TGRS) for designing and implementing concurrent object-oriented languages, and also for specifying and reasoning about the interaction between concurrency and object-orientation (such as concurrent synchronisation of methods or interference problems between concurrency and inheritance), is examined in this paper by mapping a state-of-the-art functional object-oriented language onto the MONSTR computational model, a restricted form of TGRS specifically designed to act as a point of reference in the design and implementation of declarative and semideclarative programming languages especially suited for distributed architectures.
Implementing concurrent logic and functional languages in Dactl
1997
A methodology is developed for mapping a wide class of concurrent logic languages (CLLs) onto Dactl, a compiler target language based on generalized graph rewriting. We show how features particular to the generalized graph rewriting model (such as non-root overwrites and sharing) can be used to implement CLLs. We identify problems in the mapping of a concurrent logic program to an equivalent set of rewrite rules and provide solutions. We also show some important optimizations and compilation techniques that can be adopted in the process. Finally, we take advantage of the underlying graph reduction model to enhance a concurrent logic program with some capabilities found usually only in functional languages such as lazy evaluation, sharing of computation and higher order programming.
Implementing term rewrite languages in DACTL
Theoretical Computer Science, 1988
Dactl is a low-level language of graph rewriting, intended for programming highly Garallel machines. The language includes, but is not restricted to, the limited form of graph rewriting which is commonly used to implement functional language such as Miranda, ML, Hope and Clean. In contrast to these functional languages, where the order in which subterms are evahtated (the ma!uation strategy) is fixed for all programs, in Dactl the evaluation strategy is programmed explicitly. We define a translation of a functional language into Dactl, describe the problems encountered and their solution, and prove that the translation is correct.
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.
Concurrent object-oriented programming using term graph rewriting techniques
Information & Software Technology, 1996
The generalized computational model of Term Graph Rewriting Systems is used as the basis for expressing concurrent objectoriented programming techniques exploiting the fine grain highly parallel features of TGRS in a language independent fashion that renders it able to act as the basis for developing specific languages based on object-orientation but also to study and compare existing approaches to the modelling of object-oriented programming techniques such as delegation, various forms of inheritance, etc.
Towards an intermediate language based on Graph Rewriting
Lecture Notes in Computer Science
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.
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.