Raptor.NDRules
Class FalsityIntro

java.lang.Object
  extended by Raptor.NDRules.NDRule
      extended by Raptor.NDRules.FalsityIntro

public class FalsityIntro
extends NDRule

Implements the Falsity Introduction rule
Extends abstract class NDRule.


Constructor Summary
FalsityIntro(ProofBox pProof)
          Constructs an FalsityIntro.
 
Method Summary
 void addLine(ProofLine pClickedLine)
          Adds the extra lines to the rule once the input line has been added.
 void apply()
          Called by the RuleController to apply the rule.
 void check()
          Called by the RuleController to check the input lines to the rule.
static boolean contradictory(Formula pFirst, Formula pSecond)
          Checks if the two formulas ar contradictory(One is the Not of the other one)
 Formula converse(Formula pFormula)
          Returns the negated form of the given formula
If the formula is already negated it will remove the Not sign (e.g.
 boolean haveAll()
          Returns true if the rule has all of the required input lines.
 
Methods inherited from class Raptor.NDRules.NDRule
addInputLine, checkSignature, getNewFormula
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FalsityIntro

public FalsityIntro(ProofBox pProof)
Constructs an FalsityIntro.

Parameters:
pProof - ProofBox representing in which box the rule is being applied
Method Detail

addLine

public void addLine(ProofLine pClickedLine)
             throws java.lang.Exception
Adds the extra lines to the rule once the input line has been added.

Specified by:
addLine in class NDRule
Parameters:
pClickedLine - ProofLine which has been selected
Throws:
java.lang.Exception

haveAll

public boolean haveAll()
Returns true if the rule has all of the required input lines.

Specified by:
haveAll in class NDRule

check

public void check()
           throws java.lang.Exception
Called by the RuleController to check the input lines to the rule.

Specified by:
check in class NDRule
Throws:
java.lang.Exception

contradictory

public static boolean contradictory(Formula pFirst,
                                    Formula pSecond)
Checks if the two formulas ar contradictory(One is the Not of the other one)

Parameters:
pFirst - Formula represents the first formula
pSecond - Formula represents the second formula to be compared against the first formula

apply

public void apply()
           throws java.lang.Exception
Called by the RuleController to apply the rule.

Specified by:
apply in class NDRule
Throws:
java.lang.Exception

converse

public Formula converse(Formula pFormula)
Returns the negated form of the given formula
If the formula is already negated it will remove the Not sign (e.g. ~a --> a)
Otherwise the formula is negated (e.g. a --> ~a) or (e.g. ~~a --> ~~~a).

Parameters:
pFormula - Formula represents the formula which is to be negated.