From Attribute Grammars to Constraint Handling Rules

Alejandro Serrano, J. Hage

Research output: Book/ReportOther report

Abstract

Attribute grammars provide a framework to de ne compu-tations over trees, by decorating those trees with attributes. Attributegrammars have been successfully applied in many areas, including compilerconstruction and natural language processing. In this paper we presenta translation of attribute grammars to Constraint Handling Rules, aformalism based on constraint rewriting.Our translation is able to express in a simple way several extensions toattribute grammars. Higher-order attributes are attributes whose valueis again a tree, for which attributes can be computed recursively. Look-ahead enables attribute de nitions to depend not only on the currentnode, but also on the shape of its subtrees. Specialization provides a wayto override the default computation of an attribute when some conditionsare met; a natural way to de ne exceptions to the default tree processing.
Original languageEnglish
PublisherDepartment of Information and Computing Sciences, Utrecht University
Number of pages18
Publication statusPublished - Nov 2016

Publication series

NameTechnical Report Series
No.UU-CS-2016-010
ISSN (Print)0924-3275

Keywords

  • Attribute grammars
  • onstraint Handling Rules
  • Higher-order at- tribute grammars

Fingerprint

Dive into the research topics of 'From Attribute Grammars to Constraint Handling Rules'. Together they form a unique fingerprint.

Cite this