Alternation as a programming paradigm

  • Authors:
  • Wolfgang Dvořák;Georg Gottlob;Reinhard Pichler;Stefan Woltran

  • Affiliations:
  • Technische Universität Wien, A-1040 Vienna, Austria;Oxford University, Oxford OX1 3QD, United Kingdom;Technische Universität Wien, A-1040 Vienna, Austria;Technische Universität Wien, A-1040 Vienna, Austria

  • Venue:
  • PPDP '09 Proceedings of the 11th ACM SIGPLAN conference on Principles and practice of declarative programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Alternation is a common tool in complexity theory, where it has been used to prove various complexity classifications. In this work, we show that it can also be used to enhance the expressive power of the imperative part of a programming language. In particular, we present Alter-Java -- an extension of Java by language constructs to express alternation, i.e., a sequence of "there exists" and "for all" statements. Moreover, we show that many practical problems have a very natural and succinct description in terms of alternation. In order to guarantee an efficient execution of such programs, we have introduced several optimizations. We also report on experiments with our implementation of Alter-Java. The results thus obtained illustrate that our alternation framework leads to competitive running times while the code to be written is significantly shorter than without this new language feature.