Class BoolBinary<T>

java.lang.Object
org.svvrl.goal.core.logic.bool.BoolExp<T>
org.svvrl.goal.core.logic.bool.BoolBinary<T>
Type Parameters:
T - the type of atomic expressions
Direct Known Subclasses:
BoolAnd, BoolOr

public abstract class BoolBinary<T>
extends BoolExp<T>
This class provides binary Boolean expressions.
Author:
Ming-Hsien Tsai
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected BoolExp<T> left
    The left-hand side expression.
    protected BoolBinaryOp op
    The binary operation.
    protected BoolExp<T> right
    The right-hand side expression.
  • Constructor Summary

    Constructors 
    Constructor Description
    BoolBinary​(BoolBinaryOp op, BoolExp<T> left, BoolExp<T> right)
    Constructs this binary expression.
  • Method Summary

    Modifier and Type Method Description
    T getAtom()
    Returns the atomic element.
    BoolExp<T> getExpression()
    Returns the sub expression.
    BoolExp<T> getLeft()
    Returns the left-hand side expression.
    BoolExp<T> getRight()
    Returns the right-hand side expression.
    boolean isAnd()
    Returns true if this expression is conjunctive.
    boolean isAtomic()
    Returns true if this expression is atomic.
    boolean isBinary()
    Returns true if this expression is binary.
    boolean isFalse()
    Returns true if this expression is false.
    boolean isNeg()
    Returns true if this expression is negative.
    boolean isOr()
    Returns true if this expression is disjunctive.
    boolean isTrue()
    Returns true if this expression is true.

    Methods inherited from class org.svvrl.goal.core.logic.bool.BoolExp

    and, and, and, atomic, eval, getAtomics, getFalse, getNNF, getSimplified, getTrue, neg, neg, or, or, or, pushNegation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • BoolBinary

      public BoolBinary​(BoolBinaryOp op, BoolExp<T> left, BoolExp<T> right)
      Constructs this binary expression.
      Parameters:
      op - the binary operation
      left - the left-hand side expression
      right - the right-hand side expression
  • Method Details

    • getAtom

      public T getAtom()
      Description copied from class: BoolExp
      Returns the atomic element.
      Specified by:
      getAtom in class BoolExp<T>
      Returns:
      the atomic element if this expression is atomic, and null otherwise
    • getExpression

      public BoolExp<T> getExpression()
      Description copied from class: BoolExp
      Returns the sub expression.
      Specified by:
      getExpression in class BoolExp<T>
      Returns:
      the sub expression if this expression is unary, and null otherwise
    • getLeft

      public BoolExp<T> getLeft()
      Description copied from class: BoolExp
      Returns the left-hand side expression.
      Specified by:
      getLeft in class BoolExp<T>
      Returns:
      the left-hand side expression if this expression is binary, and null otherwise
    • getRight

      public BoolExp<T> getRight()
      Description copied from class: BoolExp
      Returns the right-hand side expression.
      Specified by:
      getRight in class BoolExp<T>
      Returns:
      the right-hand side expression if this expression is binary, and null otherwise
    • isTrue

      public boolean isTrue()
      Description copied from class: BoolExp
      Returns true if this expression is true.
      Specified by:
      isTrue in class BoolExp<T>
      Returns:
      true if this expression is true
    • isFalse

      public boolean isFalse()
      Description copied from class: BoolExp
      Returns true if this expression is false.
      Specified by:
      isFalse in class BoolExp<T>
      Returns:
      true if this expression is false
    • isAtomic

      public boolean isAtomic()
      Description copied from class: BoolExp
      Returns true if this expression is atomic.
      Specified by:
      isAtomic in class BoolExp<T>
      Returns:
      true if this expression is atomic
    • isNeg

      public boolean isNeg()
      Description copied from class: BoolExp
      Returns true if this expression is negative. Note that false is negative.
      Specified by:
      isNeg in class BoolExp<T>
      Returns:
      true if this expression is negative
    • isBinary

      public boolean isBinary()
      Description copied from class: BoolExp
      Returns true if this expression is binary.
      Specified by:
      isBinary in class BoolExp<T>
      Returns:
      true if this expression is binary
    • isAnd

      public boolean isAnd()
      Description copied from class: BoolExp
      Returns true if this expression is conjunctive.
      Specified by:
      isAnd in class BoolExp<T>
      Returns:
      true if this expression is conjunctive
    • isOr

      public boolean isOr()
      Description copied from class: BoolExp
      Returns true if this expression is disjunctive.
      Specified by:
      isOr in class BoolExp<T>
      Returns:
      true if this expression is disjunctive