Package net.sf.tweety.arg.aspic.syntax
Class DefeasibleInferenceRule<T extends Invertable>
- java.lang.Object
-
- net.sf.tweety.arg.aspic.syntax.InferenceRule<T>
-
- net.sf.tweety.arg.aspic.syntax.DefeasibleInferenceRule<T>
-
- Type Parameters:
T
- is the type of the language that the ASPIC theory's rules range over
- All Implemented Interfaces:
Formula
,Rule<T,T>
,ComplexLogicalFormula
,LogicStructure
,SimpleLogicalFormula
public class DefeasibleInferenceRule<T extends Invertable> extends InferenceRule<T>
- Author:
- Nils Geilen
Defeasible implementation of
InferenceRule<T>
-
-
Constructor Summary
Constructors Constructor Description DefeasibleInferenceRule()
Constructs an empty instanceDefeasibleInferenceRule(T conclusion, java.util.Collection<T> premise)
Constructs a defeasible inference rule p => c
-
Method Summary
Modifier and Type Method Description DefeasibleInferenceRule<T>
clone()
Creates a deep copy of this formulaboolean
isDefeasible()
DefeasibleInferenceRule<T>
substitute(Term<?> v, Term<?> t)
Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.-
Methods inherited from class net.sf.tweety.arg.aspic.syntax.InferenceRule
addPremise, addPremises, allGroundInstances, allSubstitutions, containsTermsOfType, equals, exchange, getAtoms, getConclusion, getIdentifier, getName, getPredicateCls, getPredicates, getPremise, getSignature, getTerms, getTerms, getUnboundVariables, hashCode, isConstraint, isFact, isGround, isLiteral, isWellFormed, setConclusion, setName, substitute, toDefeasible, toStrict, toString
-
-
-
-
Method Detail
-
isDefeasible
public boolean isDefeasible()
- Specified by:
isDefeasible
in classInferenceRule<T extends Invertable>
- Returns:
- true iff this rule is defeasible
-
clone
public DefeasibleInferenceRule<T> clone()
Description copied from interface:SimpleLogicalFormula
Creates a deep copy of this formula- Specified by:
clone
in interfaceComplexLogicalFormula
- Specified by:
clone
in interfaceSimpleLogicalFormula
- Specified by:
clone
in classInferenceRule<T extends Invertable>
- Returns:
- the cloned formula
-
substitute
public DefeasibleInferenceRule<T> substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
Description copied from interface:ComplexLogicalFormula
Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.- Specified by:
substitute
in interfaceComplexLogicalFormula
- Specified by:
substitute
in classInferenceRule<T extends Invertable>
- 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
-
-