Abstract
The paper presents a unified view of attribute grammars and definite logic programs that allows for comparison of concepts and techniques used in both fields. A common basic notion of both formalisms is that of labelled tree. The semantics of attribute grammars can be defined in terms of decorated parse trees while the semantics of logic programs can be defined in terms of proof trees. The comparison of concepts shows that attribute grammars have several features not present in definite logic programs. These are: the concept of the language derived, many-sorted types, the notion of dependency relation and the notion of semantic domain with the semantic functions. After having identified these differences we mention some extensions proposed in the field of logic programming, which essentially amount to enriching definite programs with these features. The conclusion of this discussion is that a possible common denominator for logic programs and attribute grammars is the concept of constraint logic program. As a justification of this comparative study the paper gives references to the results obtained by transfer of methods between attribute grammars and logic programs.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
H. Abramson. Definite Clause Translation Grammars. In Proceedings Int. Symp. on Logic Programming, pages 233–240, Atlantic City, 1984. IEEE.
H. Abramson and V. Dahl. Logic Grammars. Springer-Verlag, 1989.
I. Attali and P. Franchi-Zanettaci. Unification-free execution of TYPOL programs by semantic attribute evaluation. In Proceedings of PLILP'88, Orleans, 1988. LNCS 348.
H. Alblas. Attribute evaluation methods. In this volume, 1991.
K. Apt. Introduction to Logic Programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science: Formal Models and Semantics, volume B, chapter 10, pages 493–574. Elsevier, 1987.
B. Arbab. Compiling circular attribute grammars into Prolog. IBM J. of Research and Development, 30(3):294–309, 1986.
S. Bonnier and J. Małuszyński. Towards a Clean Amalgamation of Logic Programs with External Procedures. In Proc. of PLILP '88, pages 311–326. Springer-Verlag, 1988.
S. Bonnier. Weakly Complete Unification for the use of Functions in Logic Programs. Proc. MFCS, to appear LNCS, 1991.
Borland, Int., Scotts Valley. Turbo Prolog owner's handbook, 1986.
J. Boye. Operational completeness of logic programs with external procedures. Master's thesis, Linkőping University, 1991. LiTH-IDA-Ex-9104.
D. Courcelle and P. Deransart. Proofs of partial correctness for attribute grammars with application to recursive procedures and logic programming. Information and Computation, 78(sn1), 1988.
A. Colmerauer. Metamorphosis Grammars. In L. Bolc, editor, Natural Language Communication with Computers, pages 133–189. LNCS 63, Springer-Verlag, 1978.
P. Deransart. Proofs of declarative properties of logic programs. In Springer-Verlag, editor, Proceedings of TAPSOFT, Barcelona, 1989. LNCS 352.
P. Deransart. Proof methods of declarative properties of logic programs. Research Report 1248, INRIA, 1990.
P. Deransart, G. Ferrand, and M. Teguia. Not subject to occur-check programs. INRIA, March 1991.
P. Deransart and J. Małuszyński. Modelling data dependencies in logic programs by attribute grammars. Research Report 323, INRIA, 1983.
P. Deransart and J. Małuszyński. Relating Logic Programs and Attribute Grammars. Journal of Logic Programming, 2(2):119–156, 1985.
P. Deransart and J. Małuszyński. What kind of grammars are logic programs? In P. Saint-Dizier and S. Szpakowicz, editors, Logic and Logic Grammars for Language Processing, chapter 2, pages 29–55. Ellis Horwood, 1990.
P. Deransart and J. Małuszyński. A Grammatical View of Logic Programming. A draft of the book in preparation, 1991.
W. Drabent. Do logic programs resemble programs in conventional languages? In Proceedings, 1987 Symposium on Logic Programming, pages 389–396. IEEE Computer Society Press, 1987.
N. Heintze et. al. The CLP(ℜ) Programmers Manual (version 2.0). Technical report, Dept. of Computer Science, Monash University, 1987.
P.R. Henriques. A semantic evaluator generating system in Prolog. In Proc. of PLILP'88. Springer-Verlag, 1988. LNCS 348.
P. Van Hentenryck. Constraint Satisfaction in Logic Programming. The MIT-Press, 1989.
J. Jaffar and J-L. Lassez. Constraint Logic Programming. In Conf. Record of 14th Annual ACM Symp. on POPL, 1987.
A. Kågedahl and F. Kluźniak. Enriching Prolog with S-unification. Research report, Linkőping University, 1991. LiTH-IDA-R-91-12.
D.E. Knuth. Semantics of Context-Free Languages. Mathematical Systems Theory, 2, 1968.
K. Koster. Affix grammars for compiler construction. in this volume, 1991.
J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, second edition, 1987.
J.F. Nilsson. On the compilation of domain-based prolog. In R.E.A. Mason, editor, Information Processing 83, pages 293–298. North Holland, 1983.
U. Nilsson. AID: An Alternative Implementation of DCGs. New Generation Computing, 4(4):383–399, 1986.
U. Nilsson and J. Małuszyński. Logic, Programming and Prolog. John Wiley & Sons, 1990.
J. Paaki. A logic-based modification of attribute grammars for practical compiler writing. In D.H.D. Warren and P. Szeredi, editors, Proc. of the 7th Int. Conf. on Logic Programming, pages 203–217. MIT Press, 1990.
G. Riedewald and U. Lammel. Using an attribute grammar as a logic program. In Proc. of PLILP'88, Orleans, 1988.
A. Van Wijngaarden. Orthogonal design and description of a formal language. MR 76, Matematisch Centrum, Amsterdam, 1965.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Małuszyński, J. (1991). Attribute grammars and logic programs: A comparison of concepts. In: Alblas, H., Melichar, B. (eds) Attribute Grammars, Applications and Systems. SAGA School 1991. Lecture Notes in Computer Science, vol 545. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54572-7_12
Download citation
DOI: https://doi.org/10.1007/3-540-54572-7_12
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54572-9
Online ISBN: 978-3-540-38490-8
eBook Packages: Springer Book Archive