Package net.sf.tweety.arg.aba.syntax
Class InferenceRule<T extends Formula>
- java.lang.Object
- 
- net.sf.tweety.arg.aba.syntax.AbaElement<T>
- 
- net.sf.tweety.arg.aba.syntax.AbaRule<T>
- 
- net.sf.tweety.arg.aba.syntax.InferenceRule<T>
 
 
 
- 
- Type Parameters:
- T- is the type of the language that the ABA theory's rules range over
 - All Implemented Interfaces:
- Formula,- Rule<T,T>,- ComplexLogicalFormula,- LogicStructure,- SimpleLogicalFormula
 
 public class InferenceRule<T extends Formula> extends AbaRule<T> This class models an inference rule from an ABA theory.- Author:
- Nils Geilen (geilenn@uni-koblenz.de)
 
- 
- 
Constructor SummaryConstructors Constructor Description InferenceRule()
 - 
Method SummaryModifier and Type Method Description voidaddPremise(T premise)voidaddPremises(java.util.Collection<? extends T> premises)InferenceRule<T>clone()Creates a deep copy of this formulabooleanequals(java.lang.Object obj)TgetConclusion()Returns the conclusion of this rule.java.util.Set<? extends Predicate>getPredicates()Processes the set of all predicates which appear in this formulajava.util.Collection<? extends T>getPremise()Returns the premise of this rule.SignaturegetSignature()Returns the signature of the language of this formula.java.util.Set<Term<?>>getTerms()<C extends Term<?>>
 java.util.Set<C>getTerms(java.lang.Class<C> cls)Processes the set containing all terms of type C.inthashCode()booleanisAssumption()booleanisConstraint()booleanisFact()voidsetConclusion(T conclusion)AbaElement<T>substitute(Term<?> v, Term<?> t)Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.java.lang.StringtoString()- 
Methods inherited from class net.sf.tweety.arg.aba.syntax.AbaElementallGroundInstances, allSubstitutions, containsTermsOfType, exchange, getAtoms, getPredicateCls, getUnboundVariables, isGround, isLiteral, isWellFormed, substitute
 
- 
 
- 
- 
- 
Method Detail- 
isFactpublic boolean isFact() 
 - 
isConstraintpublic boolean isConstraint() 
 - 
setConclusionpublic void setConclusion(T conclusion) 
 - 
addPremisepublic void addPremise(T premise) 
 - 
addPremisespublic void addPremises(java.util.Collection<? extends T> premises) 
 - 
getSignaturepublic Signature getSignature() Description copied from interface:FormulaReturns the signature of the language of this formula.- Returns:
- the signature of the language of this formula.
 
 - 
getPremisepublic java.util.Collection<? extends T> getPremise() Description copied from interface:RuleReturns the premise of this rule.- Returns:
- the premise of this rule.
 
 - 
getConclusionpublic T getConclusion() Description copied from interface:RuleReturns the conclusion of this rule.- Returns:
- the conclusion of this rule.
 
 - 
isAssumptionpublic boolean isAssumption() - Specified by:
- isAssumptionin class- AbaRule<T extends Formula>
- Returns:
- whether this rule is an assumption
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- SimpleLogicalFormula
- Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Specified by:
- equalsin interface- SimpleLogicalFormula
- Overrides:
- equalsin class- java.lang.Object
 
 - 
getPredicatespublic java.util.Set<? extends Predicate> getPredicates() Description copied from interface:SimpleLogicalFormulaProcesses the set of all predicates which appear in this formula- Returns:
- all predicates that appear in this formula
 
 - 
getTermspublic java.util.Set<Term<?>> getTerms() - Returns:
- a set containing all terms of this logical structure
 
 - 
getTermspublic <C extends Term<?>> java.util.Set<C> getTerms(java.lang.Class<C> cls) Description copied from interface:LogicStructureProcesses the set containing all terms of type C. This method uses the equals method of the given Class and therefore does not add terms which are sub classes of type C to the set.- Type Parameters:
- C- the type of terms
- Parameters:
- cls- The Class structure containing type information about the searched term
- Returns:
- A set containing all terms of type C of this logical structure
 
 - 
clonepublic InferenceRule<T> clone() Description copied from interface:SimpleLogicalFormulaCreates a deep copy of this formula- Specified by:
- clonein interface- ComplexLogicalFormula
- Specified by:
- clonein interface- SimpleLogicalFormula
- Specified by:
- clonein class- AbaElement<T extends Formula>
- Returns:
- the cloned formula
 
 - 
substitutepublic AbaElement<T> substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException Description copied from interface:ComplexLogicalFormulaSubstitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.- Specified by:
- substitutein interface- ComplexLogicalFormula
- Specified by:
- substitutein class- AbaElement<T extends Formula>
- Parameters:
- v- the term to be substituted.
- t- the term to substitute.
- Returns:
- a formula where every occurrence of "v" is replaced by "t".
- Throws:
- java.lang.IllegalArgumentException- if "v" and "t" are of different sorts
 
 
- 
 
-