Skip to main content
QUICK REVIEW

[Paper Review] Applying Constraint Handling Rules to HPSG

Gerald Penn|ArXiv.org|Jul 7, 2000
Natural Language Processing TechniquesComputer Science5 references9 citations
TL;DR

This paper proposes integrating Constraint Handling Rules (CHR) into the Attribute Logic Engine (ALE) to enhance grammar development for Head-Driven Phrase Structure Grammar (HPSG), enabling efficient, declarative handling of complex constraints like feature co-occurrence and recursive relations. By leveraging CHR's subsumption-based rule application and variable instantiation triggers, the approach eliminates non-termination risks and outperforms traditional delay mechanisms in SICStus Prolog by up to 60x in performance.

ABSTRACT

Constraint Handling Rules (CHR) have provided a realistic solution to an over-arching problem in many fields that deal with constraint logic programming: how to combine recursive functions or relations with constraints while avoiding non-termination problems. This paper focuses on some other benefits that CHR, specifically their implementation in SICStus Prolog, have provided to computational linguists working on grammar design tools. CHR rules are applied by means of a subsumption check and this check is made only when their variables are instantiated or bound. The former functionality is at best difficult to simulate using more primitive coroutining statements such as SICStus when/2, and the latter simply did not exist in any form before CHR. For the sake of providing a case study in how these can be applied to grammar development, we consider the Attribute Logic Engine (ALE), a Prolog preprocessor for logic programming with typed feature structures, and its extension to a complete grammar development system for Head-driven Phrase Structure Grammar (HPSG), a popular constraint-based linguistic theory that uses typed feature structures. In this context, CHR can be used not only to extend the constraint language of feature structure descriptions to include relations in a declarative way, but also to provide support for constraints with complex antecedents and constraints on the co-occurrence of feature values that are necessary to interpret the type system of HPSG properly.

Motivation & Objective

  • To address non-termination issues in constraint logic programming for HPSG grammar development by replacing manual delay statements with CHR.
  • To enable declarative specification of complex constraints, such as feature co-occurrence and recursive relations, within typed feature structures.
  • To improve performance and scalability of grammar development systems by leveraging CHR’s efficient rule application and subsumption checks.
  • To identify limitations in current Prolog implementations—particularly attributed variables and universal quantification—requiring future language-level enhancements.

Proposed method

  • Extends the ALE preprocessor with CHR rules to manage constraints on typed feature structures in HPSG.
  • Uses CHR’s subsumption check to trigger rule application only when variables are instantiated, avoiding premature or redundant computation.
  • Compiles high-level constraints into atomic CHR rules that handle type constraints and feature structure extensions via guards and unification.
  • Employs a guard-based mechanism to count consistent extensions of a feature structure (0, 1, or >1), guiding failure or extension accordingly.
  • Implements a subtype covering rule using CHR’s ⇐> syntax to unify or fail based on the number of consistent extensions.
  • Evaluates performance against SICStus Prolog’s when/2 by compiling a German HPSG grammar and measuring execution speed.

Experimental results

Research questions

  • RQ1How can CHR be used to eliminate non-termination in recursive constraint logic programming for HPSG grammar development?
  • RQ2In what ways does CHR improve the expressiveness and efficiency of constraint handling compared to traditional coroutining in Prolog?
  • RQ3What performance advantages does CHR offer over SICStus Prolog’s when/2 for grammar parsing and generation tasks?
  • RQ4What limitations in current Prolog implementations—especially attributed variables and universal quantification—hinder efficient feature structure processing?
  • RQ5Can CHR-based constraint handling be scaled effectively in real-world HPSG grammars with complex type systems?

Key findings

  • CHR enables a declarative and robust way to manage recursive and complex constraints in HPSG, eliminating the need for manual delay statements.
  • The subsumption check in CHR triggers only when variables are bound, making it more efficient and reliable than coroutining mechanisms like when/2.
  • A direct implementation of constraint handling using CHR in SICStus Prolog was found to be up to 60 times slower than a when/2-based approach in the same system, indicating inefficiencies in the current CHR library implementation.
  • Despite this, the paper argues that CHR is fundamentally better suited for grammar development due to its declarative semantics and proper handling of constraint dependencies.
  • The performance bottleneck is traced to the underlying attributed variable implementation in SICStus Prolog, which hinders efficient feature structure encoding.
  • The authors identify the need for future language-level support for universal quantification of constraints and more efficient attributed variables to unlock the full potential of CHR in HPSG systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.