Ranking functions for linear-constraint loops

  • Amir M. Ben-Amram
  • , Samir Genaim

Research output: Contribution to journalArticlepeer-review

59 Scopus citations

Abstract

In this article, we study the complexity of the problems: given a loop, described by linear constraints over a finite set of variables, is there a linear or lexicographical-linear ranking function for this loop? While existence of such functions implies termination, these problems are not equivalent to termination. When the variables range over the rationals (or reals), it is known that both problems are PTIME decidable. However, when they range over the integers, whether for single-path or multipath loops, the complexity has not yet been determined. We show that both problems are coNP-complete. However, we point out some special cases of importance of PTIME complexity. We also present complete algorithms for synthesizing linear and lexicographical-linear ranking functions, both for the general case and the special PTIME cases. Moreover, in the rational setting, our algorithm for synthesizing lexicographical-linear ranking functions extends existing ones, because our definition for such functions is more general, yet it has PTIME complexity.

Original languageEnglish
Article number26
JournalJournal of the ACM
Volume61
Issue number4
DOIs
StatePublished - 1 Jan 2014
Externally publishedYes

Keywords

  • Linear constraints
  • Ranking functions
  • Termination

ASJC Scopus subject areas

  • Software
  • Control and Systems Engineering
  • Information Systems
  • Hardware and Architecture
  • Artificial Intelligence

Fingerprint

Dive into the research topics of 'Ranking functions for linear-constraint loops'. Together they form a unique fingerprint.

Cite this