Class DefeasibleRule
- java.lang.Object
-
- org.tweetyproject.logics.commons.syntax.RelationalFormula
-
- org.tweetyproject.arg.delp.syntax.DelpRule
-
- org.tweetyproject.arg.delp.syntax.DefeasibleRule
-
- All Implemented Interfaces:
Formula,Rule<FolFormula,FolFormula>,ClassicalFormula,ComplexLogicalFormula,Conjunctable,Disjunctable,Invertable,LogicStructure,ProbabilityAware,QuantifiedFormula,SimpleLogicalFormula
public class DefeasibleRule extends DelpRule
This class models a defeasible rule in defeasible logic programming.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description DefeasibleRule(FolFormula head, java.util.Set<FolFormula> body)Initializes the defeasible rule with the given parameters
-
Method Summary
Modifier and Type Method Description RelationalFormulaclone()Creates a deep copy of this formulaRelationalFormulasubstitute(Term<?> v, Term<?> t)Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.StrictRuletoStrictRule()returns the translation of this rule as a strict rule-
Methods inherited from class org.tweetyproject.arg.delp.syntax.DelpRule
addPremise, addPremises, combineWithAnd, combineWithOr, complement, containsQuantifier, equals, getAtoms, getConclusion, getFunctors, getPredicates, getPremise, getQuantifierVariables, getSignature, getTerms, getTerms, getUnboundVariables, getUniformProbability, hashCode, isApplicable, isClosed, isClosed, isConstraint, isFact, isGround, isLiteral, isWellBound, isWellBound, setConclusion, toString
-
Methods inherited from class org.tweetyproject.logics.commons.syntax.RelationalFormula
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isWellFormed, substitute
-
-
-
-
Constructor Detail
-
DefeasibleRule
public DefeasibleRule(FolFormula head, java.util.Set<FolFormula> body)
Initializes the defeasible rule with the given parameters- Parameters:
head- a literalbody- a set of literals
-
-
Method Detail
-
toStrictRule
public StrictRule toStrictRule()
returns the translation of this rule as a strict rule- Returns:
- the translation of this rule as a strict rule
-
substitute
public RelationalFormula substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
Description copied from class:RelationalFormulaSubstitutes all occurrences of term "v" in this formula by term "t" and returns the new formula. NOTE: if "v" is a variable and bound to a quantifier then "v" is not substituted in that quantifiers inner formula.- Specified by:
substitutein interfaceComplexLogicalFormula- Specified by:
substitutein classDelpRule- 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 (NOTE: this exception is only thrown when "v" actually appears in this formula).
-
clone
public RelationalFormula clone()
Description copied from interface:SimpleLogicalFormulaCreates a deep copy of this formula- Specified by:
clonein interfaceComplexLogicalFormula- Specified by:
clonein interfaceSimpleLogicalFormula- Specified by:
clonein classRelationalFormula- Returns:
- the cloned formula
-
-