Package net.sf.tweety.arg.aspic.syntax
Class InferenceRule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
- java.lang.Object
-
- net.sf.tweety.arg.aspic.syntax.InferenceRule<T>
-
- Type Parameters:
T- is the type of the language that the ASPIC theory's rules range over
- All Implemented Interfaces:
net.sf.tweety.commons.Formula,net.sf.tweety.commons.util.rules.Rule<T,T>
- Direct Known Subclasses:
DefeasibleInferenceRule,StrictInferenceRule
public abstract class InferenceRule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable> extends Object implements net.sf.tweety.commons.util.rules.Rule<T,T>
- Author:
- Nils Geilen This stands for an inference rule or for a premise if premises has length 0. If this is a premise and defeasible it is an ordinary premise else it is an axiom.
-
-
Constructor Summary
Constructors Constructor Description InferenceRule()Creates an empty instanceInferenceRule(T conclusion, Collection<T> premise)Constructs a new inference rule of rule p -> c if strict or p => c else
-
Method Summary
Modifier and Type Method Description voidaddPremise(T premise)voidaddPremises(Collection<? extends T> premises)booleanequals(Object obj)TgetConclusion()StringgetIdentifier()Returns the name if it has one, else it returns the hashcodeStringgetName()Returns the nameCollection<? extends T>getPremise()net.sf.tweety.commons.SignaturegetSignature()inthashCode()booleanisConstraint()abstract booleanisDefeasible()booleanisFact()voidsetConclusion(T conclusion)voidsetName(String name)Sets the nameDefeasibleInferenceRule<T>toDefeasible()StrictInferenceRule<T>toStrict()StringtoString()
-
-
-
Constructor Detail
-
InferenceRule
public InferenceRule()
Creates an empty instance
-
InferenceRule
public InferenceRule(T conclusion, Collection<T> premise)
Constructs a new inference rule of rule p -> c if strict or p => c else- Parameters:
conclusion- ^= ppremise- ^= c
-
-
Method Detail
-
isDefeasible
public abstract boolean isDefeasible()
- Returns:
- true iff this rule is defeasible
-
toStrict
public StrictInferenceRule<T> toStrict()
- Returns:
- a strict instance of this rule
-
toDefeasible
public DefeasibleInferenceRule<T> toDefeasible()
- Returns:
- a defeasible instance of this rule
-
getIdentifier
public String getIdentifier()
Returns the name if it has one, else it returns the hashcode- Returns:
- an identifier for this rule
-
getName
public String getName()
Returns the name- Returns:
- this rul's name
-
setName
public void setName(String name)
Sets the name- Parameters:
name- new name
-
isFact
public boolean isFact()
-
isConstraint
public boolean isConstraint()
-
setConclusion
public void setConclusion(T conclusion)
-
addPremise
public void addPremise(T premise)
-
addPremises
public void addPremises(Collection<? extends T> premises)
-
getSignature
public net.sf.tweety.commons.Signature getSignature()
-
getPremise
public Collection<? extends T> getPremise()
-
-