Expressing multi-way data-flow constraint systems as a commutative monoid makes many of their properties obvious

  • Authors:
  • Jaakko Järvi;Magne Haveraaen;John Freeman;Mat Marcus

  • Affiliations:
  • Texas A&M University, College Station, TX, USA;University of Bergen, Bergen, Norway;Texas A&M University, College Station, TX, USA;Canoynlands Software Design Inc., Seattle, WA, USA

  • Venue:
  • Proceedings of the 8th ACM SIGPLAN workshop on Generic programming
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Here multi-way data-flow constraints systems are viewed as commutative monoids. A multi-way data-flow constraints system consists of a collection of constraints, each constraint being represented as a set of directed graphs. The monoid's binary operation between two constraints is defined as the set of (non-disjoint) graph unions between all possible pairs of graphs, choosing one graph from each constraint, such that the result of the union satisfies the conditions of a valid solution. This clearly is a commutative, associative operation, with the constraint containing the null graph as the neutral element. For a given constraint system, the carrier of the corresponding monoid is the closure of all combinations of constraints from the system. This then unifies the entire multi-way data-flow constraint system with a single constraint. This generic view is not at all a drastic departure of the established descriptions of multi-way data-flow constraint systems. Defining this generic view explicitly, however, makes several properties of and algorithms operating on constraint systems obvious. For example, a constraint system can be solved by folding the monoid's binary operator over the system's constraints. An example implementation in Haskell is described.