001package org.clafer.ast.analysis;
002
003/**
004 * <p>
005 * There is two ways to represent a set.
006 * </p>
007 * <p>
008 * Consider the model:
009 * <pre>
010 * parent *
011 *    child 3
012 * </pre>
013 * </p>
014 * <p>
015 * Suppose parent = {0,2,3}.
016 * </p>
017 * <p>
018 * If child is in LowGroup, then it must choose the lowest 9 elements in its
019 * set. So child = {0,1,2,3,4,5,6,7,8}. This is good for many optimizations like
020 * skipCard and works for any case but it makes constant operations navigating
021 * down the tree more difficult because we don't know where the children lie
022 * during compile time. Abstract Clafers cannot have LowGroup.
023 * </p>
024 * <p>
025 * If child is in ParentGroup, then each childSet is grouped together but there
026 * may be gaps between the childSets. A Clafer has ParentGroup ONLY IF it has
027 * exact cardinality, or it is Abstract, otherwise it isn't worthwhile. One
028 * reason why is that ParentGroup does not work with our symmetry breaking
029 * rules, but exact cardinalities do not need to be broken. Following the
030 * example, child = {0,1,2,6,7,8,9,10,11}.
031 * </p>
032 */
033public enum Format {
034
035    LowGroup,
036    ParentGroup;
037}