public class Rule extends DLPElementAdapter implements Comparable<Rule>, DLPElement, net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>
| Constructor and Description |
|---|
Rule()
Default-Ctor: Creates an empty rule without any head literals or body elements
|
Rule(DLPHead head)
Ctor: Create a rule with the given head, cause there are no
body elements the created rule is a fact.
|
Rule(DLPLiteral head)
Ctor: Create a rule with the given head, cause there are no
body elements the created rule is a fact.
|
Rule(DLPLiteral head,
DLPElement body) |
Rule(DLPLiteral head,
List<DLPElement> litsBody) |
Rule(List<DLPLiteral> litsHead,
List<DLPElement> litsBody) |
Rule(Rule other)
Copy-Ctor: Makes a deep copy of the given rule
|
Rule(String ruleexpr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPremise(DLPElement premise) |
void |
addPremises(Collection<? extends DLPElement> premises) |
Rule |
clone() |
int |
compareTo(Rule arg0) |
boolean |
equals(Object other) |
Set<DLPAtom> |
getAtoms() |
DLPHead |
getConclusion() |
SortedSet<DLPLiteral> |
getLiterals() |
Set<DLPPredicate> |
getPredicates() |
Collection<DLPElement> |
getPremise() |
net.sf.tweety.logics.fol.syntax.FolSignature |
getSignature() |
Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms() |
int |
hashCode() |
boolean |
isConstraint() |
boolean |
isFact() |
boolean |
isSafe()
Proofs if the given rule is safe for use in a solver.
|
void |
setConclusion(DLPHead conclusion) |
void |
setConclusion(DLPLiteral literal) |
Rule |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) |
String |
toString() |
getPredicateClscontainsTermsOfType, exchange, getTerms, isGround, isLiteral, isWellFormed, substitutefinalize, getClass, notify, notifyAll, wait, wait, waitexchange, isGround, isWellFormed, substitutepublic Rule()
public Rule(Rule other)
public Rule(DLPHead head)
head - The head of the rule as ELPHeadpublic Rule(DLPLiteral head)
head - The head of the rule as ELPLiteralpublic Rule(DLPLiteral head, DLPElement body)
public Rule(DLPLiteral head, List<DLPElement> litsBody)
public Rule(List<DLPLiteral> litsHead, List<DLPElement> litsBody)
public Rule(String ruleexpr)
public SortedSet<DLPLiteral> getLiterals()
getLiterals in interface DLPElementpublic boolean isFact()
isFact in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>public boolean isConstraint()
isConstraint in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>public boolean isSafe()
public boolean equals(Object other)
public int hashCode()
public int compareTo(Rule arg0)
compareTo in interface Comparable<Rule>public Rule clone()
clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaclone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulaclone in interface DLPElementclone in class DLPElementAdapterpublic net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.FormulagetSignature in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>getSignature in interface DLPElementpublic Collection<DLPElement> getPremise()
getPremise in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>public DLPHead getConclusion()
getConclusion in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>public Rule substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulasubstitute in interface DLPElementIllegalArgumentExceptionpublic Set<DLPAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetAtoms in interface DLPElementpublic Set<DLPPredicate> getPredicates()
getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetPredicates in interface DLPElementpublic Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
getTerms in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructurepublic void setConclusion(DLPHead conclusion)
setConclusion in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>public void setConclusion(DLPLiteral literal)
public void addPremise(DLPElement premise)
addPremise in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>public void addPremises(Collection<? extends DLPElement> premises)
addPremises in interface net.sf.tweety.commons.util.rules.Rule<DLPHead,DLPElement>Copyright © 2018. All rights reserved.