Programming from galois connections

  • Authors:
  • Shin-Cheng Mu;José Nuno Oliveira

  • Affiliations:
  • IIS, Academia Sinica, Taiwan, Taiwan;High Assurance Software Lab, University of Minho, Portugal

  • Venue:
  • RAMICS'11 Proceedings of the 12th international conference on Relational and algebraic methods in computer science
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Problem statements often resort to superlatives such as in eg. ". . . the smallest such number", ". . . the best approximation", ". . . the longest such list" which lead to specifications made of two parts: one defining a broad class of solutions (the easy part) and the other requesting the optimal such solution (the hard part). This paper introduces a binary relational combinator which mirrors this linguistic structure and exploits its potential for calculating programs by optimization. This applies in particular to specifications written in the form of Galois connections, in which one of the adjoints delivers the optimal solution being sought. The framework encompasses re-factoring of results previously developed by Bird and de Moor for greedy and dynamic programming, in a way which makes them less technically involved and therefore easier to understand and play with.