Programming in Prolog (2nd ed.)
Programming in Prolog (2nd ed.)
Automating control for logic programs
Journal of Logic Programming
Logic for problem-solving
Describing Prolog by its interpretation and compilation
Communications of the ACM
Automatic Derivation of Code Generators from Machine Descriptions
ACM Transactions on Programming Languages and Systems (TOPLAS)
Using Peephole Optimization on Intermediate Code
ACM Transactions on Programming Languages and Systems (TOPLAS)
Automatic error recovery for LR parsers
Communications of the ACM
An efficient context-free parsing algorithm
Communications of the ACM
A technique for generating almost optimal Floyd-Evans productions for precedence grammars
Communications of the ACM
On the relative efficiencies of context-free grammar
Communications of the ACM
Implementation of PROLOG
Syntax of Programming Languages: Theory and Practice
Syntax of Programming Languages: Theory and Practice
Compiler Construction
Compiler Construction for Digital Computers
Compiler Construction for Digital Computers
Natural Language Communication with Computers
An experiment in table driven code generation
SIGPLAN '82 Proceedings of the 1982 SIGPLAN symposium on Compiler construction
A machine independent algorithm for code generation and its use in retargetable compilers.
A machine independent algorithm for code generation and its use in retargetable compilers.
ACL '83 Proceedings of the 21st annual meeting on Association for Computational Linguistics
Principles of Compiler Design (Addison-Wesley series in computer science and information processing)
Principles of Compiler Design (Addison-Wesley series in computer science and information processing)
ACM SIGPLAN Notices
A Language for Specifying Program Transformations
IEEE Transactions on Software Engineering
Computer-assisted microanalysis of parallel programs
ACM Transactions on Programming Languages and Systems (TOPLAS)
The term retrieval abstract machine
SIGMOD '92 Proceedings of the 1992 ACM SIGMOD international conference on Management of data
Compiler Construction in Higher Order Logic Programming
PADL '02 Proceedings of the 4th International Symposium on Practical Aspects of Declarative Languages
A Deterministic Shift-Reduce Parser Generator for a Logic Programming Language
CL '00 Proceedings of the First International Conference on Computational Logic
On Implementation of Tree Synchronized Languages
RtA '99 Proceedings of the 10th International Conference on Rewriting Techniques and Applications
Deductive parsing with multiple levels of representation
ACL '88 Proceedings of the 26th annual meeting on Association for Computational Linguistics
Behavioral similarity matching using concrete source code templates in logic queries
Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Enforcing structural regularities in software using IntensiVE
Science of Computer Programming
Hi-index | 0.00 |
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 optimizations. Newly proposed features that are useful in compiler construction are also discussed. A knowledge of Prolog is assumed.