コード例 #1
0
        /** */
        public void visit(SafraTree tree, SafraTreeNode node)
        {
            if (_final_states.intersects(node.getLabeling()))//////////if this node has the state in accepting states of NBA
            {
                BitSet q_and_f = new BitSet(_final_states);
                q_and_f.Intersect(node.getLabeling());////////////////get the intersect of the label and the accepting states

                SafraTreeNode new_child = tree.newNode();
                node.addAsYoungestChild(new_child);

                _tree_template.setRenameable(new_child.getID());

                new_child.getLabeling().Assign(q_and_f);
            }
        }
コード例 #2
0
        /** Node visitor */
        public void visit(SafraTree tree, SafraTreeNode node)
        {
            int id = node.getID();

            if (_tree_template.isRenameable(id))
            {
                // this node was created recently, so we only delete it from
                // the renameableNames, but don't mark it in restrictedNames
                _tree_template.setRenameable(id, false);
            }
            else
            {
                _tree_template.setRestricted(id);
            }

            tree.remove(node);
        }