ACM Home Page
Please provide us with feedback. Feedback
How to define a language using PROLOG
Full text PdfPdf (584 KB)
Source Conference on LISP and Functional Programming archive
Proceedings of the 1982 ACM symposium on LISP and functional programming table of contents
Pittsburgh, Pennsylvania, United States
Pages: 67 - 73  
Year of Publication: 1982
ISBN:0-89791-082-6
Author
Sponsors
ACM: Association for Computing Machinery
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGART: ACM Special Interest Group on Artificial Intelligence
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 8,   Downloads (12 Months): 32,   Citation Count: 2
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/800068.802136
What is a DOI?

ABSTRACT

There have been many papers, conferences and theses concerned with the task of defining programming languages. Yet, twenty years after McCarthy's (1962) seminal paper there is still no widely accepted method which will deal with all parts of a language clearly and concisely. Everyone who invents a language writes a BNF definition and the more theoretically minded will attempt a denotational semantics. For a complete definition of the syntax, attribute grammars are gaining increasing acceptance while more practically minded language designers will use one of the compiler definition languages such as Meta4 or CDL. At the same time as the PROLOG language was defined, a grammar system called Metamorphosis Grammar (M-grammar for short) was invented by Colmerauer (1978). This has been shown to be suitable (Moss 1981) for defining both the full syntax and semantics of programming languages. The present paper attempts to give an overview of this method in the form of a practical guide to writing a language definition. This includes the context sensitive syntax, and semantics using denotational, relational or axiomatic methods. This definition is not simply of theoretical interest. Since PROLOG is a practical programming language, though with a sound theoretical basis (Warren, Pereira, Pereira 1977), the definition can be used as a prototyping tool for a new language. With the addition of plan-formation techniques one might form a PROLOG based compiler generator and by adding other axioms form a program proving system.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Apt, K.R., van Emden, M.H. (1980): Contributions to the Theory of Logic Programming. Res. Rep. CS-80-12, Dept. of Comp Sc, University of Waterloo, Ontario.
 
2
Burstall, R.M. (1969): Formal Description of Program Structures and Semantics in First Order Logic. In Meltzer & Michie (Eds) Machine Intelligence 5. E.U.P. 79-98.
 
3
 
4
Clark, K.L. (1978): Negation as Failure. In Gallaire, Minker (1978). 293-322. Logic and Databases. Plenum Press.
 
5
Clark, K.L., Tarnlund, S-A. (1977): A First Order Theory of Data and Programs. IFIP 77. North-Holland. 939-944.
 
6
7
 
8
Hoare, C.A.R., Lauer, P.E. (1974): Consistent and Complementary Formal Theories of Programming Languages. Acta Informatica 3, 135-153.
 
9
Knuth, D.E.(1968): Semantics of context free languages. Maths. Systems Theory 2. 127-145, Corrections 5(1971) 95, 96.
 
10
 
11
McCarthy, J. (1962): Towards a mathematical science of computation. in Information Processing 1962. North-Holland. 21-28.
12
 
13
Moss, C.D.S. (1980): A Formal Definition of ASPLE using Predicate Logic. DOC 80/18, Imperial College, London.
 
14
Moss, C.D.S. (1981): The Formal Description of Programming Languages using Predicate Logic. Ph.D. Thesis. Dept. of Computing, Imperial College, London.
 
15
Pereira, F.L.N., Warren, D.L.(1978): Definite Clause Grammars compared with Augmented Transition Networks. DAI. Rep. 58. Univ. of Edinburgh.
 
16
Stoy, J. (1977): Denotational Semantics. M.I.T. Press.
 
17
Strachey, C., Wadsworth, C.P. (1974): Continuations: a Mathematical Semantics for handling Full Jumps. PRG 11. Oxford Univ. Comp. Lab.
 
18
Warren, D.H.D. (1974): Warplan: A System for Generating Plans. Memo 76. DAI. Univ. of Edinburgh.
 
19
Warren, D.H.D., Pereira, L.M., Pereira F. (1977): Prolog - the Language and its Implementation compared with Lisp.
 
20
Watt, D.A., Madsen, O.L. (1977): Extended Attribute Grammars. Report 10, Computing Science Dept, Univ. of Glasgow.
 
21
van Wijngaarden, Mailloux, B.J., Peck, J.E.L., Koster, C.H.A., Meertens, L.G.L.T., Fisker, R.G. (1975): Revised Report on the Algorithmic language Algol 68. Acta Informatica 5, 1-236. (Also Springer Verlag 1976).
22