Interface Formula

    • Method Detail

      • equals

        boolean equals​(java.lang.Object other)
        Verifies if the current object formula and other formula are the same.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - other formula to test the equality
        Returns:
        result of the equality test
      • simplify

        Formula simplify()
        Simplifies the logic formula.
        Returns:
        simplified formula
      • getNegation

        Formula getNegation()
        Returns the negation of the current formula.
        Returns:
        negation of formula
      • contains

        boolean contains​(Formula otherFormula)
        Returns true if this formula contains the specified formula.
        Parameters:
        otherFormula - other formula whose presence in this formula is to be tested
        Returns:
        true if this formula contains the specified formula
      • evaluate

        boolean evaluate​(LogicAssignment assignment)
                  throws java.lang.Exception
        Evaluates a state that we passed into arguments.
        Parameters:
        assignment - state to evaluate
        Returns:
        result of the evaluation
        Throws:
        java.lang.Exception - throws when the formula not supported this operation or expected object not given