Fast sort computations for order-sorted matching and unification

  • Authors:
  • Steven Eker

  • Affiliations:
  • Computer Science Laboratory, SRI International, Menlo Park, CA

  • Venue:
  • Formal modeling
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given a preregular order-sorted signature, we consider two closely related problems. The first arises in matching where we need to compute the least sort of a ground term in order to decide whether it is less or equal to the sort of a variable to which we wish to bind it. The second arises in unification where we have computed an unsorted unifier and we want to compute any corresponding order-sorted unifiers by finding order-sorted renamings of the unsorted free variables occurring in the unifier such that for each bound variable, the least sort of the term to which it is bound becomes less than or equal to its own sort. We present a fast solution to the first problem, based on compiling the overloaded declarations for each operation in to a decision diagram. We then show how this method can be lifted to the variable case using a BDD encoding to represent computations with unknown sorts in order to solve the second problem. We also discuss some extensions of the techniques.