Results 1 -
3 of
3
Parsing and Compiling Using Prolog
- ACM Transactions on Programming Languages and Systems
, 1987
"... This paper presents the material needed for exposing the reader to the advantages of using Prolog as a language for describing succinctly most of the algorithms needed in prototyping and implementing compilers or producing tools that facilitate this task. The available published material on the subj ..."
Abstract
-
Cited by 26 (2 self)
- Add to MetaCart
This paper presents the material needed for exposing the reader to the advantages of using Prolog as a language for describing succinctly most of the algorithms needed in prototyping and implementing compilers or producing tools that facilitate this task. The available published material on the subject describes one particular approach in implementing compilers using Prolog. It consists of coupling actions to recursive descent parsers to produce syntax-trees which are subsequently utilized in guiding the generation of assembly language code. Although this remains a worthwhile approach, there is a host of possibilities for Prolog usage in compiler construction. The primary aim of this paper is to demonstrate the use of Prolog in parsing and compiling. A second, but equally important, goal of this paper is to show that Prolog is a labor-saving tool in prototyping and implementing many non-numerical algorithms which arise in compiling, and whose description using Prolog is not available in the literature. The paper discusses the use of unification and nondeterminism in compiler writing as well as means to bypass these (costly) features when they are deemed unnecessary. Topics covered include bottom-up and top-down parsers, syntax-directed translation, grammar properties, parser generation, code generation, and optimixations. Newly proposed features that are useful in compiler construction are also discussed. A knowledge of Prolog is assumed.
Translator-Based Multiparadigm Programming
- Journal of Systems and Software
, 1993
"... Better programming productivity may be obtained by choosing suitable programming paradigms. For development of complex software systems, multiparadigm programming would usually be appropriate. However, its use may be hindered by a lack of languages and programming support tools. As this paper argues ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Better programming productivity may be obtained by choosing suitable programming paradigms. For development of complex software systems, multiparadigm programming would usually be appropriate. However, its use may be hindered by a lack of languages and programming support tools. As this paper argues, multiparadigm programming may be supported by translators that convert programs written in one language to another language based on a different paradigm. Keywords and Key Phrases: Programming Paradigm, Multiparadigm Programming, Object-Oriented Programming. 1
Integrating Complex Data Structures in Prolog
- In Symposium on Logic Programming
"... .Computer Science has produced several data structures and algorithms on them to efficiently solve computational problems. Some algorithms require destructive operations for their efficient implementation or have other properties which make them difficult to implement efficiently in Prolog. If they ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
.Computer Science has produced several data structures and algorithms on them to efficiently solve computational problems. Some algorithms require destructive operations for their efficient implementation or have other properties which make them difficult to implement efficiently in Prolog. If they are to be introduced in Prolog, these data structures and algorithms must be implemented at a lower level. We investigate how such data structures, possibly with a complicated internal representation, can be naturally incorporated as first class terms in Prolog. Implementation problems are discussed for a number of alternative solutions. Four examples of data structures: (hash) tables, arrays, characters, and strings are examined individually. An earlier version of this paper was presented at the 1987 Symposium on Logic Programming in San Francisco. The research reported herein was supported by the National Swedish Board for Technical Development (STU). 1. PROBLEM Edinburgh Prolog is a sm...

