Package net.sf.tweety.arg.delp.syntax
Class DelpFact
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.arg.delp.syntax.DelpRule
-
- net.sf.tweety.arg.delp.syntax.DelpFact
-
- All Implemented Interfaces:
Formula
,Rule<FolFormula,FolFormula>
,ClassicalFormula
,ComplexLogicalFormula
,Conjunctable
,Disjunctable
,Invertable
,LogicStructure
,ProbabilityAware
,QuantifiedFormula
,SimpleLogicalFormula
public final class DelpFact extends DelpRule
This class implements a fact in defeasible logic programming which encapsulates a literal.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description DelpFact(FolFormula literal)
Default constructor; initializes this fact with the given literal
-
Method Summary
Modifier and Type Method Description DelpFact
clone()
Creates a deep copy of this formulaRelationalFormula
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.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 net.sf.tweety.logics.commons.syntax.RelationalFormula
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isWellFormed, substitute
-
-
-
-
Constructor Detail
-
DelpFact
public DelpFact(FolFormula literal)
Default constructor; initializes this fact with the given literal- Parameters:
literal
- a literal
-
-
Method Detail
-
substitute
public RelationalFormula substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
Description copied from class:RelationalFormula
Substitutes 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:
substitute
in interfaceComplexLogicalFormula
- Specified by:
substitute
in 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 DelpFact 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 classRelationalFormula
- Returns:
- the cloned formula
-
-