| David R. Musser and Alexander A. Stepanov. Algorithm-oriented generic libraries. Software --- Practice and Experience, 24(7):623-- 642, July 1994. |
....from it, either using a decompiler compiler [34]orworking more directly. A quicker route to a working compiler prototype than applying a full blown compiler compiler to the compiler specification is to simply encode a version of the compiler specification in a declarative language such as Prolog [War80]. This should be executable immediately, if reasonable care is taken. Writing the compiler in Prolog is a key idea in producing a decompiler here: in theory a Prolog program can be run backwards, if certain provisos are met, because the source code has no procedural directionality [Llo87] Each ....
Warren D.H.D., Logic programming and compiler writing, Software---Practiceand Experience, 10, 97--125, 1980.
....outlined in this section have been used to implement a compiler in the logic programming language Prolog. Extracts of this compiler are included in the next section. 9 6 Prolog Implementation The idea of using Prolog [CM81] for the construction of compilers has been accepted for some time [W80]. Advantages include the fact that the code for the compiler can be very close to the compiling specification and thus the confidence in its correctness is increased. It can be used both for a prototype compiler and even for a real compiler since the Prolog code itself may be compiled for ....
Warren, D.H.D., Logic programming and compiler writing, Software---Practiceand Experience, 10, pp 97--125, 1980. 15
....and state can be easily passed between di erent interactions of a sequence using the references mentioned above. For dealing with references to input elds, we use logical variables since it is well known that logical variables are a useful notion to express dependencies inside data structures [5, 15]. To be more precise, we introduce a data type data CgiRef = CgiRef String denoting the type of all references to input elements in HTML forms. This data type is abstract, i.e. its constructor CgiRef is not exported by the CGI library. This is essential since it avoids the construction of wrong ....
D.H.D. Warren. Logic Programming and Compiler Writing. Software - Practice and Experience, Vol. 10, pp. 97-125, 1980. 7 http://www.informatik.uni-kiel.de/~curry 8 http://www-i2.informatik.rwth-aachen.de/~hanus/jflp.cgi
....testing, and application development based on a make system. We report on recent and ongoing applications of the Prolog based approach. 1 Introduction Prolog and language processing Prolog has been proposed and used for language processing tools in abundance, e.g. for parsing and compilation [60,10,61], for interpretation [8,55] and other aspects of language processing. Despite Prolog s simplicity, it is extremely expressive, mainly due to its meta logical features (I O, negation, univ operator, assert retract etc. and because it is basically untyped. Prolog is generally suited for ....
D.H.D. Warren. Logic programming and compiler writing. Software---Practice and Experience, 10(2):97--125, February 1980.
....and state can be easily passed between di erent interactions of a sequence using the references mentioned above. For dealing with references to input elds, we use logical variables since it is well known that logical variables are a useful notion to express dependencies inside data structures [6, 19]. To be more precise, we introduce a data type data CgiRef = CgiRef String denoting the type of all references to input elements in HTML forms. This data type is abstract, i.e. its constructor CgiRef is not exported by our library. This is essential since it avoids the construction of wrong ....
D.H.D. Warren. Logic Programming and Compiler Writing. Software - Practice and Experience, Vol. 10, pp. 97-125, 1980. 16
....outlined in this section have been used to implement a compiler in the logic programming language Prolog. Extracts of this compiler are included in the next section. 9 6 Prolog Implementation The idea of using Prolog [CM81] for the construction of compilers has been accepted for some time [W80]. Advantages include the fact that the code for the compiler can be very close to the compiling specification and thus the confidence in its correctness is increased. It can be used both for a prototype compiler and even for a real compiler since the Prolog code itself may be compiled for ....
Warren, D.H.D., Logic programming and compiler writing, Software---Practice and Experience, 10, pp 97--125, 1980. 15
....[ASU85, p. 554] Some simple optimisations relevant to the code produced by the G translation process are given in [Jon87, p. 328] Devidson [Dav84] generalises the technique of a simulated stack into a simulated cache. A more general discussion on constructing a peephole optimiser is in [Lam81] The idea for a generic machine description file (and the file name suffix .md was take from the project GNU C compiler [Sta89] The C calling sequence for 48 interfacing C with assembly language is presented and discussed in [JR81] 5.2 Machine Description Meta generator The problem of ....
David Alex Lamb. Construction of a peephole optimizer. Software--- Practice and Experience, 11:639--647, 1981.
....various machine specific pointer operations in abstract machines. Some of the advice given can be found in the 68000 code generator. A discussion on code generation for Lisp, assembler macros and various optimisations can be found in [GH81] Assembler specific optimisations are given in [Han83] Systematic optimisation of assembly code is done by means of peephole optimisers [ASU85, p. 554] Some simple optimisations relevant to the code produced by the G translation process are given in [Jon87, p. 328] Devidson [Dav84] generalises the technique of a simulated stack into a simulated ....
David R. Hanson. Simple code optimizations. Software---Practice and Experience, 13:645--763, 1983.
....program is failure to terminate) In spite of these differences, there is not always much of a practical difference. Given the wide variety of programming languages admitting functions as values (e.g. Lisp, ML) denotational definitions can frequently be transcribed into an executable interpreter [16]. Related work in congruence proofs can be found in [1, 8, 10, 15] The remainder of this section presents a brief overview of the denotational definition and congruence proof. 1.1 A Standard Basis Model The model theory [12] leaves a good deal of freedom in the meanings of the primitive symbols ....
....could then be carried out in the two level framework. The work begun in this project could be continued in several different directions. One possibility would be to directly implement an interpreter for Verdi based on the denotational definition, in the 51 52 EVES Project TR 90 5446 02 style of [16]. The main impediment is the use of nondeterminism in the definition; the interpreter would need to make specific choices. A second possibility would be to continue to define more of the tower of semantic definitions and congruence proofs, culminating in an operational definition. Finally, it ....
David A. Watt. Executable semantic descriptions. Software -- Practice and Experience, 16(1):13-- 43, January 1986.
....and state can be easily passed between di erent interactions of a sequence using the references mentioned above. For dealing with references to input elds, we use logical variables since it is well known that logical variables are a useful notion to express dependencies inside data structures [6, 19]. To be more precise, we introduce a data type data CgiRef = CgiRef String denoting the type of all references to input elements in HTML forms. This data type is abstract, i.e. its constructor CgiRef is not exported by the CGI library. This is essential since it avoids the construction of wrong ....
D.H.D. Warren. Logic Programming and Compiler Writing. Software - Practice and Experience, Vol. 10, pp. 97-125, 1980.
....of this technology. In fact, already in 1975 a seminal paper by A.Colmeraurer on Metamorphosis Grammar [37] suggested many of the successive developments in compiler writing using logic programming. In fact, Warren convincingly proved the power of Prolog in the activity of compiler construction [194]. The main idea is to specify a compiler by logic rules that state how each construct of the source language is converted into a sequence of object code instructions. Example: The following Prolog rule specifies the top level of a compiler [194] specifying a compiler of a source into object ....
....of Prolog in the activity of compiler construction [194] The main idea is to specify a compiler by logic rules that state how each construct of the source language is converted into a sequence of object code instructions. Example: The following Prolog rule specifies the top level of a compiler [194]: specifying a compiler of a source into object code with absolute addresses compile(Program, Code; instr(halt,0) data block(L) encode statement(Program,Dictionary,Code) assemble(Code,1,N0) N1 is N0 1, allocate(Dictionary,N1,N) L is N N1. The compiler is defined by a rule that ....
[Article contains additional citation context not shown here]
D. Warren. Logic Programming and Compiler Writing. Software: Practice and Experience, 10(2):97--125, February 1980.
....code contributes a redundancy absent in Jcon s object oriented implementation. The SNOBOL4 implementation employs trapped variables for variables which, when read or written, execute code for side effects. Hanson elevated trapped variables to source level constructs for programmer manipulation [17]. The reference Icon implementation uses a similar construct for implementing many keywords [4] Jcon s use of vVariable subclasses for similar purposes generalizes this technique. Other Java Virtual Machine Targets Creating JVM based implementations of non Java languages is becoming quite ....
David R. Hanson. Variable associations in SNOBOL4. Software Practice and Experience, 6(2):245--254, April 1976.
....whenever a peephole pattern is detected replacing it by the better sequence. Hence, a peephole optimizer usually works locally and does not incorporate global data flow knowledge of the machine program. Experience has shown that optimizers of this kind can tremendously improve the object code [2, 7 10, 14], especially when this object code has been automatically generated by a code generator. On the other hand it is crucial to ensure that the process of peephole optimization indeed replaces sequences of instructions with semantically equivalent This research has been funded in part by the ....
....of this scheme for a non trivial stack machine together with proofs of peephole optimizations for this machine. Finally, Section 5 contains some concluding remarks. Related Work There are, of course, quite a number of researchers who have constructed powerful peephole optimizers, for example [2 4, 8 10, 14]. One of the first machine independent peephole optimizer has been developed by Davidson and Fraser [2] Their idea is to simulate pairs of consecutive instructions and replace them, where possible, with an equivalent single instruction. The machine is described by register and memory transfers. ....
David Alex Lamb. Construction of a Peephole Optimizer. Software -- Practice and Experience, 11(6):639--647, June 1981.
....value; an expression that accesses a record field bound to blocks until some other expression replaces the with a non unbound value. Insofar as it provides an explicit synchronization mechanism, unbound values in COE correspond roughly to I structures [6] found in Id [24] or logical variables [22, 30] found in logic languages. Each actor executes the same high level process repeatedly: 1) wait for new input, 2) attach result to the output stream and (3) recurse. For example, the actor waits for a new value for i to be attached to edge2 by false gate 1 . Once a value is written, the actor ....
David H. Warren. Logic Programming and Compiler Writing. Software Practice and Experience, 10(2):97-- 127, February 1980.
....code contributes a redundancy absent in Jcon s objectoriented implementation. The SNOBOL4 implementation employs trapped variables for variables which, when read or written, execute code for side effects. Hanson elevated trapped variables to source level constructs for programmer manipulation [Han76]. The reference Icon implementation uses a similar construct for implementing many keywords [GG86] Jcon s use of vVariable subclasses for similar purposes generalizes this technique. 12.3 Other Java Virtual Machine Targets Creating JVM based implementations of non Java languages is becoming ....
David R. Hanson. Variable associations in SNOBOL4. Software Practice and Experience, 6(2):245--254, April 1976.
....equivalent, an intervening scope can later be introduced with a non equivalent variable name. Quasi static scoping [11] allows explicit dynamic scoping only, removing the worst hazards arising from evolution; however, it provides no means for flexible dispatch of messages. Generic programming [12] is similar in that one essentially defines required interfaces to dummy classes that are then bound (typically via a template mechanism) to produce real implementations, but this static operation does not address dynamic needs, nor produce the data flow separation required. Context reflection ....
David R. Musser. Introspective sorting and selection algorithms. Software--- Practice and Experience, 27(8):983--993, August 1997.
....of prepositional phrase attachment ambiguities. 1 Introduction This paper presents a logic programming approach to ambiguity resolution and optimal parsing. Such an approach is natural to consider because parsing is one of the principal motivating applications for logic programming (LP) War80] We develop our approach starting from Definite Clause Grammars (DCGs) and their generalization, Definite Clause Translation Grammars (DCTGs) Abr84] We show in this paper that a simple extension of DCTGs provides a natural means of specifying ambiguity resolution and optimal parsing problems. ....
D. H. D. Warren. Logic Programming and Compiler Writing. Software Practice and Experience, 10(II), 1980.
....optimal parse for the above grammar constructing only a polynomial number of partial parses. The translation from an attributed context free grammar to a definite clause program is a straight forward generalization of the translation from simple context free grammars to definite clause programs [War80]. Suppose para(In; Out; Parse; Badness) is the predicate that is true if Parse is the parse of the input tokens in the In Gamma Out with badness Badness, we add the following O clause: bestpara(In; Out; Parse; Badness) para(In; Out; Parse; Badness) and the following arbiter: bestpara(In; ....
D. H. D. Warren. Logic Programming and Compiler Writing. Software Practice and Experience, 10(II), 1980.
....FP and LP) have considered different approaches to the parsing problem. We will first survey the main characteristics of parsing in each paradigm. 1.2 The Logic Programming approach. Language processing has been very related to LP since its origins. There is a more or less standard approach [War80, CH87, SS86] to the construction of parsers in LP, which is based on a specific representation for grammars, the socalled Definite Clause Grammars (DCG s) PW80, SS86] DCG s are not logic programs, although they are readily translated to them. With DCG s, one can hide the details of handling the input ....
D.H.D Warren. Logic Programming and Compiler Writing, Software Practice and Experience 10, 1980, 97--125.
....strategy outlined in this section has been used to implement a compiler in the logic programming language Prolog. Extracts of this compiler are included in the next section. 6 Prolog Implementation The idea of using Prolog [CM81] for the construction of compilers has been accepted for some time [W80]. Advantages include the fact that the code for the compiler can be very close to the compiling specification since Prolog is based on logic [NM90] and thus the confidence in its correctness is increased. It can be used as a prototype compiler and even as a real compiler since the Prolog code ....
Warren, D.H.D., Logic programming and compiler writing, Software---Practice and Experience, 10, pp 97--125, 1980.
....from it, either using a decompiler compiler [34] or working more directly. A quicker route to a working compiler prototype than applying a full blown compiler compiler to the compiler specification is to simply encode a version of the compiler specification in a declarative language such as Prolog [War80]. This should be executable immediately, if reasonable care is taken. Writing the compiler in Prolog is a key idea in producing a decompiler here: in theory a Prolog program can be run backwards, if certain provisos are met, because the source code has no procedural directionality [Llo87] Each ....
Warren D.H.D., Logic programming and compiler writing, Software---Practice and Experience, 10, 97--125, 1980.
....simultaneously; expressions in a generate clause that require other values of A block until the referenced regions are filled in by the appropriate fill expressions. Empty regions are in many ways similar to I structures found in Id[53] or logical variables found in logic programming languages[68]; filling a value is equivalent to a (partial) unification operation in which the is treated as an unbound variable. The fill operator is strictly less powerful than the more general assignment operator set. Whereas fill only operates over empty regions, set can be used to change the ....
....model is not an attempt to define an all inclusive model for every programming language. Every real language constitutes at a 120 CHAPTER 4. PARADIGMS AND APPLICATIONS minimum a series of refinements, embeddings and re interpretations of the symmetric model; some languages, for example, Prolog[68] or Smalltalk[38] go significantly beyond or in different directions from it. The symmetric model, does however, address some of the fundamental techniques in the management of program complexity. It does so by defining the organization of programs and data structures within a unified, recursive ....
David H. Warren. Logic Programming and Compiler Writing. Software Practice and Experience, 10(2):97--127, February 1980.
....with an underscore, e.g. map, and symbol table. local variable identifiers Name apart from members, i.e. do not begin with an underscore. Table 1. A simple convention for identifiers in C . of research on generic programming and generic software libraries by Stepanov, Lee, and David Musser[15]. STL emphasizes the composition of software components through the aggressive use of function and class templates. Larch C [8] is not strictly a class library, but rather a formal specification language tailored to C . It is intended to formally specify the behavior of C program modules. ....
David R. Musser and Alexander A. Stepanov. Algorithm-oriented generic libraries. Software --- Practice and Experience, 24(7):623--642, July 1994.
.... GMD Research Group at the University of Karlsruhe, Vincenz Prie nitz Stra e 1, D 7500 Karlsruhe 1 email: vollmer karlsruhe.gmd.de, Phone: 49 721 6622 14 Abstract Gentle [Schroer 89] is a compiler description language in the tradition of two level grammars [Koster 71] and logic programming [Warren 80] It provides a common declarative notation for high level description of analysis, transformation, and synthesis. Imperative constructs like global variables and dynamic arrays, needed for efficient compiler construction, are introduced as well. A tool has been implemented to check the ....
....efficient compilers (compilation speed nearly 90.000 line per minute on Dec 3100 workstation) The language and a supporting tool were designed and implemented by F.W. Schroer in 1989. Logic Programming and Compiling Using logic programming as a compiler writing tool has a long tradition. Warren 80] shows how Prolog may be used for this purpose and writes: To summarize, Prolog has the following advantages as a compiler writing tool: 1. Less time and effort is required. 2. There is less likelihood of error. 3. The resulting implementation is easier to maintain and modify. The ....
[Article contains additional citation context not shown here]
David H.D. Warren. Logic programming and compiler writing. Software--Practice and Experience, 10:97--125, 1980.
....polymorphic interface signature we can describe the essential properties of various types, and using this approach, we can treat one type as if it were another. The examples in the paper include treating lists as trees, and trees as lists. The inspiration for this work came from the iterators of [Musser and Stepanov, 1994]. An iterator is an abstract index into a sequential structure, giving a uniform treatment of lists arrays and trees. The aim of the work here is to extend that approach in two ways. First, we wanted to see how to describe an iterator in a functional language the list like types. More ....
....the types in the family. The novelty of this approach is that t can be any family of types: we shall see in the next Section that trees and error types conform to this signature. This characterisation is inspired by the iterators of the Standard Template Library for C , Stepanov and Lee, 1994, Musser and Stepanov, 1994] Iterators are an abstraction from indices (or pointers) allowing a walk through a sequential structure. List like types are analogue of these in a functional setting, and the tree like types discussed in Section 8 generalise them in providing a divide and conquer interface to a data ....
[Article contains additional citation context not shown here]
David Musser and Alexander Stepanov. Algorithmoriented Generic Libraries. Software --- Practice and Experience, 24, 1994.
....CBS, the Calculus of Broadcasting Systems. However, CCS is quite different from CBS as CBS does not have channels and uses a broadcasting communication model rather than a handshake one. We can view the current paper as an exercise in implementing SOS specifications in a functional language. Watt [21] gave an example of how denotational semantic specifications can be prototyped in the functional language ML [15] Higher order abstract syntax is presented in [4] The original work on structured operational semantics is [16] while [13, 8] are also introductions. A presentation of the ....
David A. Watt. Executable semantic descriptions. Software---Practice and Experience, pages 13--43, July 1986.
....from it, either using a decompiler compiler [34] or working more directly. A quicker route to a working compiler prototype than applying a full blown compiler compiler to the compiler specification is to simply encode a version of the compiler specification in a declarative language such as Prolog [War80]. This should be executable immediately, if reasonable care is taken. Writing the compiler in Prolog is a key idea in producing a decompiler here: in theory a Prolog program can be run backwards, if certain provisos are met, because the source code has no procedural directionality [Llo87] Each ....
Warren D.H.D., Logic programming and compiler writing, Software---Practice and Experience, 10, 97--125, 1980.
....functions and predicates that are stored in a library. Thus the prototype generator itself and a combination of the generated program, a library and a test interpreter are all written in LIFE. There is much literature available that describes how to build a compiler in a logical language. Warren [War80] suggests to divide the compiler into 5 phases: 1. Lexical analysis. In this phase a transformation should take place. It is not practical to try to perform actions needed in a compiler on bare characters. The source text should therefore be transformed into a token list, that can be processed ....
....class name or a variable or attribute label. This is done in the predicate classnametable(In,Table) where the parameter Table will be bound to the class name table constructed from the token list In. This table is then passed to the syntax analyzer. Syntax analysis is a more complex task. Warren [War80] shows that the implementation of the production rules of a syntax specification is generally an easy task. The rules can be implemented almost directly as shown in this example: The production rule for the object constraint section in a TM program. OConsList(X) empty object ....
David H. D. Warren. Logic programming and compiler writing. Software-- Practice and Experience, 10:97--125, 1980.
No context found.
David Hanson and Todd Proebsting. A research C# compiler. Software --- Practice and Experience, to appear, 2004.
No context found.
David Hanson and Todd Proebsting. A research C# compiler. Software --- Practice and Experience, to appear, 2004.
....languages. Finally, it has a well defined semantics, based on the calculus [6] We have also benefited greatly from the choice of Prolog as both the implementation and target language for the compiler modules. The advantages of Prolog for traditional compiler writing have already been documented [27, 3] but we have found the language to be particularly congenial for the kinds of high level code transformations required by the modular compiler architecture. The ease with which complex data structures can be constructed and manipulated means that it is as easy, if not easier, to program directly ....
D.S. Warren. Logic Programming and Compiler Writing. Software --- Practice and Experience, 10(2):97--125, 1980.
....expensive when the tables get large, as they often do. Sometimes a Prolog coding trick is employed: representing the table by a tree whose fringe consists of uninstantiated variables, to facilitate the addition (but not replacement or deletion) of nodes. This is elegant for certain purposes [Warren 80] but is generally awkward and programs using such tables often need to use meta logical concepts. Hashing is another efficient implementation method for tables. If hash tables are represented by ordinary Prolog structures, programs for accessing values by keys and adding or removing key value ....
D. H. D. Warren, Logic Programming and Compiler Writing, Software---Practice and Experience, vol. 10, no. 2, pp. 97--125, Feb. 1980.
No context found.
David R. Musser and Alexander A. Stepanov. Algorithm-oriented generic libraries. Software --- Practice and Experience, 24(7):623-- 642, July 1994.
No context found.
David R. Musser. Introspective sorting and selection algorithms. Software--Practice and Experience, 8:983--993, 1997. 10.2.3
No context found.
David R. Musser. Introspective sorting and selection algorithms. Software Practice and Experience, 27(8):983--993.
No context found.
Rok Sosi c and David Abramson. Guard: A relative debugger. Software---Practice and Experience, 27(2):185--106, February 1997.
No context found.
D.H.D. Warren. Logic programming and compiling writing. Software Practice and Experience, 10(2), 1980.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC