Results 1 -
2 of
2
Attribute Grammars as a Functional Programming Paradigm
- Functional Programming Languages and Computer Architecture, volume 274 of LNCS
, 1987
"... The purpose of this paper is twofold. Firstly we show how attributes in an attribute grammar can be simply and efficiently evaluated using a lazy functional language. The class of attribute grammars we can deal with are the most general ones possible: attributes may depend on each other in an arbitr ..."
Abstract
-
Cited by 71 (2 self)
- Add to MetaCart
The purpose of this paper is twofold. Firstly we show how attributes in an attribute grammar can be simply and efficiently evaluated using a lazy functional language. The class of attribute grammars we can deal with are the most general ones possible: attributes may depend on each other in an arbitrary way, as long as there are no truly circular data dependencies. Secondly, we describe a methodology based on attribute grammars, where, in a fairly straightforward way, we can develop efficient functional programs where direct, conventional solutions yield less efficient programs. We review two examples from a paper by R. Bird (Using circular programs to eliminate multiple traversals of data, Acta Informatica, 21, 1984) where he transforms simple but inefficient multipass programs into more efficient single pass ones, but which on their own can be very hard to understand. We show how such efficient but tangled programs can have natural formulations as attribute grammars. We also propose a...
PP: Visual Programming System for Parallel Logic Programming Language GHC
- Parallel and Distributied Computing and Networks '97
, 1997
"... Though parallel logic languages have lots of good features, the readability of those languages are not good enough. Therefore, we have developed visual programming system PP for parallel logic language GHC. Each definition clause of GHC program is expressed as a figure along with its textual repr ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
Though parallel logic languages have lots of good features, the readability of those languages are not good enough. Therefore, we have developed visual programming system PP for parallel logic language GHC. Each definition clause of GHC program is expressed as a figure along with its textual representation. The system graphically assists the program input and its execution. The system has actually been implemented in SICStus Prolog and available on conventional Unix workstations. Examples of actual program input and its graphical execution are shown. 1 Introduction Various kinds of parallel logic languages, i.e., PARLOG [Clark 86], Concurrent Prolog [Shapiro 83] and Guarded Horn clauses (GHC) [Ueda 85], have been proposed [Shapiro 89]. The basic computation mechanisms of these languages are quite similar. Horn clauses with guards are used for defining predicates, goals are executed in parallel, and they have some synchronization mechanisms between goals. Though these language...

