/*
    Copyright 2005-2007 Adobe Systems Incorporated
    Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
    or a copy at http://stlab.adobe.com/licenses.html)
*/

sheet grouped_options
{
  interface:
	a : true;
	b : true;
	c : true;
	/* group g = [@a, @b, @c ] */
	g : { a: a, b: b, c: c };
	all : true;
	
  constant:
  	g_true : { a: true, b: true, c: true };
  	g_false : { a: false, b: false, c: false };

  logic:
  	/* relate clauses that simulate a group */
	relate { a <== g.a; g <== { a: a, b: g.b, c: g.c }; }
	relate { b <== g.b; g <== { a: g.a, b: b, c: g.c }; }
	relate { c <== g.c; g <== { a: g.a, b: g.b, c: c }; }

	relate {
		all <== g == g_true ? true : g == g_false ? false : empty;
		g <== { a: all, b: all, c: all };
	}

 output:
    result <== { all: all, a: a, b: b, c: c };
}
