Module logicng

Class DTree

  • Direct Known Subclasses:
    DTreeLeaf, DTreeNode

    public abstract class DTree
    extends Object
    Super class for a Decomposition Tree (DTree) for the DNNF Compiler This is either a DTreeNode or a DTreeLeaf.
    Since:
    2.0.0
    Version:
    2.0.0
    • Field Detail

      • staticVariables

        protected int[] staticVariables
      • staticVarSet

        protected BitSet staticVarSet
      • staticSeparator

        protected int[] staticSeparator
    • Constructor Detail

      • DTree

        public DTree()
    • Method Detail

      • initialize

        public abstract void initialize​(DnnfSatSolver solver)
        Initializes the DTree.
        Parameters:
        solver - a specializes DNNF SAT solver
      • size

        public abstract int size()
        Returns the size of the DTree.
        Returns:
        the size of the DTree
      • staticVarSet

        public BitSet staticVarSet()
        Returns all variables of this DTree.

        Since this set of variables can be cached, this is a constant time operation.

        Returns:
        all variables of this DTree
      • dynamicSeparator

        public abstract BitSet dynamicSeparator()
        The dynamic separator of this DTree. "Dynamic" means that subsumed clauses are ignored during the separator computation.
        Returns:
        The dynamic separator of this DTree
      • countUnsubsumedOccurrences

        public abstract void countUnsubsumedOccurrences​(int[] occurrences)
        Counts the number of unsubsumed occurrences for each variable in occurrences.

        The parameter occurrences should be modified by the method accordingly.

        Parameters:
        occurrences - The current number of occurrences for each variable which should be modified accordingly
      • depth

        public abstract int depth()
        Returns the depth of this tree.
        Returns:
        the depth of this tree
      • widestSeparator

        public abstract int widestSeparator()
        Returns the widest separator of this tree.
        Returns:
        the widest separator