Attribute Grammars, Applications and Systems

Volume 545 of the series Lecture Notes in Computer Science pp 330-357


Attribute grammars and logic programs: A comparison of concepts

  • Jan MałuszyńskiAffiliated withDepartment of Computer and Information Science, Linkőping University

* Final gross prices may vary according to local VAT.

Get Access


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.