private CellTreeNode GenerateSimplifiedView(CellTreeNode basicView, List <LeftCellWrapper> usedCells)
        {
            Debug.Assert(false == basicView.IsEmptyRightFragmentQuery, "Basic view is empty?");

            // create 'joined' variables, one for each cell
            // We know (say) that out of the 10 cells that we were given, only 7 (say) were
            // needed to construct the view for this extent.
            int numBoolVars = usedCells.Count;

            // We need the boolean expressions in Simplify. Precisely ont boolean expression is set to
            // true in each cell query

            for (int i = 0; i < numBoolVars; i++)
            {
                // In the ith cell, set its boolean to be true (i.e., ith boolean)
                usedCells[i].RightCellQuery.InitializeBoolExpressions(numBoolVars, i);
            }

            CellTreeNode simplifiedView = CellTreeSimplifier.MergeNodes(basicView);

            return(simplifiedView);
        }
        // effects: see CellTreeNode.Simplify below
        internal static CellTreeNode MergeNodes(CellTreeNode rootNode)
        {
            CellTreeSimplifier simplifier = new CellTreeSimplifier(rootNode.ViewgenContext);

            return(simplifier.SimplifyTreeByMergingNodes(rootNode));
        }
 // effects: see CellTreeNode.Simplify below
 internal static CellTreeNode MergeNodes(CellTreeNode rootNode)
 {
     CellTreeSimplifier simplifier = new CellTreeSimplifier(rootNode.ViewgenContext);
     return simplifier.SimplifyTreeByMergingNodes(rootNode);
 }