Package net.sf.tweety.lp.nlp.syntax
Class NLPRule
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.ComplexLogicalFormulaAdapter
-
- net.sf.tweety.lp.nlp.syntax.NLPRule
-
- All Implemented Interfaces:
net.sf.tweety.commons.Formula,net.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>,net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
public class NLPRule extends net.sf.tweety.logics.commons.syntax.ComplexLogicalFormulaAdapter implements net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula, net.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>A rule of a nested logic program. A nested logic program contains not quantified first order formulas.- Author:
- Tim Janus
-
-
Constructor Summary
Constructors Constructor Description NLPRule()NLPRule(net.sf.tweety.logics.fol.syntax.FolFormula conclusion)NLPRule(net.sf.tweety.logics.fol.syntax.FolFormula conclusion, Collection<net.sf.tweety.logics.fol.syntax.FolFormula> premise)NLPRule(net.sf.tweety.logics.fol.syntax.FolFormula conclusion, net.sf.tweety.logics.fol.syntax.FolFormula premise)NLPRule(NLPRule other)
-
Method Summary
Modifier and Type Method Description voidaddPremise(net.sf.tweety.logics.fol.syntax.FolFormula premise)voidaddPremises(Collection<? extends net.sf.tweety.logics.fol.syntax.FolFormula> premises)NLPRuleclone()booleanequals(Object other)Set<net.sf.tweety.logics.fol.syntax.FolAtom>getAtoms()net.sf.tweety.logics.fol.syntax.FolFormulagetConclusion()Class<? extends net.sf.tweety.logics.commons.syntax.Predicate>getPredicateCls()Set<net.sf.tweety.logics.commons.syntax.Predicate>getPredicates()Collection<net.sf.tweety.logics.fol.syntax.FolFormula>getPremise()net.sf.tweety.logics.fol.syntax.FolSignaturegetSignature()Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>getTerms()inthashCode()booleanisConstraint()booleanisFact()voidsetConclusion(net.sf.tweety.logics.fol.syntax.FolFormula conclusion)NLPRulesubstitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)-
Methods inherited from class net.sf.tweety.logics.commons.syntax.ComplexLogicalFormulaAdapter
containsTermsOfType, exchange, getTerms, isGround, isLiteral, isWellFormed, substitute
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
exchange, isGround, isWellFormed, substitute
-
-
-
-
Constructor Detail
-
NLPRule
public NLPRule()
-
NLPRule
public NLPRule(NLPRule other)
-
NLPRule
public NLPRule(net.sf.tweety.logics.fol.syntax.FolFormula conclusion)
-
NLPRule
public NLPRule(net.sf.tweety.logics.fol.syntax.FolFormula conclusion, net.sf.tweety.logics.fol.syntax.FolFormula premise)
-
NLPRule
public NLPRule(net.sf.tweety.logics.fol.syntax.FolFormula conclusion, Collection<net.sf.tweety.logics.fol.syntax.FolFormula> premise)
-
-
Method Detail
-
addPremise
public void addPremise(net.sf.tweety.logics.fol.syntax.FolFormula premise) throws net.sf.tweety.logics.commons.error.LanguageException- Specified by:
addPremisein interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>- Throws:
net.sf.tweety.logics.commons.error.LanguageException
-
addPremises
public void addPremises(Collection<? extends net.sf.tweety.logics.fol.syntax.FolFormula> premises)
- Specified by:
addPremisesin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
setConclusion
public void setConclusion(net.sf.tweety.logics.fol.syntax.FolFormula conclusion) throws net.sf.tweety.logics.commons.error.LanguageException- Specified by:
setConclusionin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>- Throws:
net.sf.tweety.logics.commons.error.LanguageException
-
getPremise
public Collection<net.sf.tweety.logics.fol.syntax.FolFormula> getPremise()
- Specified by:
getPremisein interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
getConclusion
public net.sf.tweety.logics.fol.syntax.FolFormula getConclusion()
- Specified by:
getConclusionin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
getSignature
public net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
- Specified by:
getSignaturein interfacenet.sf.tweety.commons.Formula- Specified by:
getSignaturein interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
isFact
public boolean isFact()
- Specified by:
isFactin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
isConstraint
public boolean isConstraint()
- Specified by:
isConstraintin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
getAtoms
public Set<net.sf.tweety.logics.fol.syntax.FolAtom> getAtoms()
- Specified by:
getAtomsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getPredicates
public Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
- Specified by:
getPredicatesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getPredicateCls
public Class<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicateCls()
- Specified by:
getPredicateClsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getTerms
public Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
- Specified by:
getTermsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.LogicStructure
-
substitute
public NLPRule substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
- Specified by:
substitutein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Throws:
IllegalArgumentException
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object other)
-
clone
public NLPRule clone()
- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Specified by:
clonein interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
clonein classnet.sf.tweety.logics.commons.syntax.ComplexLogicalFormulaAdapter
-
-