Package net.sf.tweety.logics.rdl.syntax
Class DefaultRule
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.logics.rdl.syntax.DefaultRule
-
- All Implemented Interfaces:
net.sf.tweety.commons.Formula,net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Invertable,net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure,net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware,net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
public class DefaultRule extends net.sf.tweety.logics.commons.syntax.RelationalFormulaModels a default rule in Reiter's default logic, see [R. Reiter. A logic for default reasoning. Artificial Intelligence, 13:81–132, 1980].- Author:
- Matthias Thimm, Nils Geilen
-
-
Constructor Summary
Constructors Constructor Description DefaultRule()an empty Default RuleDefaultRule(net.sf.tweety.logics.fol.syntax.FolFormula pre, Collection<net.sf.tweety.logics.fol.syntax.FolFormula> jus, net.sf.tweety.logics.fol.syntax.FolFormula conc)Creates a new DefaultRuleDefaultRule(net.sf.tweety.logics.fol.syntax.FolFormula pre, net.sf.tweety.logics.fol.syntax.FolFormula jus, net.sf.tweety.logics.fol.syntax.FolFormula conc)Creates a new DefaultRule
-
Method Summary
Modifier and Type Method Description net.sf.tweety.logics.commons.syntax.RelationalFormulaclone()net.sf.tweety.logics.fol.syntax.ConjunctioncombineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable formula)net.sf.tweety.logics.fol.syntax.DisjunctioncombineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable formula)net.sf.tweety.logics.commons.syntax.RelationalFormulacomplement()booleancontainsQuantifier()booleanequals(Object o)Set<net.sf.tweety.logics.fol.syntax.FolAtom>getAtoms()net.sf.tweety.logics.fol.syntax.FolFormulagetConclusion()Set<net.sf.tweety.logics.commons.syntax.Functor>getFunctors()Collection<net.sf.tweety.logics.fol.syntax.FolFormula>getJustification()Set<? extends net.sf.tweety.logics.commons.syntax.Predicate>getPredicates()net.sf.tweety.logics.fol.syntax.FolFormulagetPrerequisite()Set<net.sf.tweety.logics.commons.syntax.Variable>getQuantifierVariables()net.sf.tweety.logics.fol.syntax.FolSignaturegetSignature()Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>getTerms()<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>
Set<C>getTerms(Class<C> cls)Set<net.sf.tweety.logics.commons.syntax.Variable>getUnboundVariables()net.sf.tweety.math.probability.ProbabilitygetUniformProbability()inthashCode()booleanisClosed()booleanisClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)booleanisLiteral()booleanisNormal(DefaultTheory dt)Tests, whether the default is normal normal ^= a:c/cbooleanisWellBound()booleanisWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)net.sf.tweety.logics.commons.syntax.RelationalFormulasubstitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)StringtoString()
-
-
-
Constructor Detail
-
DefaultRule
public DefaultRule()
an empty Default Rule
-
DefaultRule
public DefaultRule(net.sf.tweety.logics.fol.syntax.FolFormula pre, net.sf.tweety.logics.fol.syntax.FolFormula jus, net.sf.tweety.logics.fol.syntax.FolFormula conc) throws IllegalArgumentExceptionCreates a new DefaultRule- Parameters:
pre- the prerequsitejus- the justificationconc- the conclusion- Throws:
IllegalArgumentException- if there is some issue with the argumentsnet.sf.tweety.commons.ParserException- when a parameter is missing
-
DefaultRule
public DefaultRule(net.sf.tweety.logics.fol.syntax.FolFormula pre, Collection<net.sf.tweety.logics.fol.syntax.FolFormula> jus, net.sf.tweety.logics.fol.syntax.FolFormula conc) throws IllegalArgumentExceptionCreates a new DefaultRule- Parameters:
pre- the prerequsitejus- the justificationsconc- the conclusion- Throws:
IllegalArgumentException- if there is some issue with the arguments
-
-
Method Detail
-
isNormal
public boolean isNormal(DefaultTheory dt)
Tests, whether the default is normal normal ^= a:c/c- Parameters:
dt- a default theory- Returns:
- true iff the theory is normal
-
getPrerequisite
public net.sf.tweety.logics.fol.syntax.FolFormula getPrerequisite()
- Returns:
- the default's prerequisite
-
getJustification
public Collection<net.sf.tweety.logics.fol.syntax.FolFormula> getJustification()
- Returns:
- the default's justification
-
getConclusion
public net.sf.tweety.logics.fol.syntax.FolFormula getConclusion()
- Returns:
- the default's conclusion
-
getPredicates
public Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
-
isLiteral
public boolean isLiteral()
-
getQuantifierVariables
public Set<net.sf.tweety.logics.commons.syntax.Variable> getQuantifierVariables()
-
getUnboundVariables
public Set<net.sf.tweety.logics.commons.syntax.Variable> getUnboundVariables()
-
containsQuantifier
public boolean containsQuantifier()
-
isWellBound
public boolean isWellBound()
-
isWellBound
public boolean isWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
-
isClosed
public boolean isClosed()
-
isClosed
public boolean isClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
-
getTerms
public Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
-
getTerms
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms(Class<C> cls)
-
getAtoms
public Set<net.sf.tweety.logics.fol.syntax.FolAtom> getAtoms()
- Specified by:
getAtomsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula- Specified by:
getAtomsin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
getFunctors
public Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()
- Specified by:
getFunctorsin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
substitute
public net.sf.tweety.logics.commons.syntax.RelationalFormula 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- Specified by:
substitutein classnet.sf.tweety.logics.commons.syntax.RelationalFormula- Throws:
IllegalArgumentException
-
getUniformProbability
public net.sf.tweety.math.probability.Probability getUniformProbability()
- Specified by:
getUniformProbabilityin interfacenet.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware- Specified by:
getUniformProbabilityin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
complement
public net.sf.tweety.logics.commons.syntax.RelationalFormula complement()
- Specified by:
complementin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Invertable- Specified by:
complementin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
combineWithOr
public net.sf.tweety.logics.fol.syntax.Disjunction combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable formula)
- Specified by:
combineWithOrin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Disjunctable- Specified by:
combineWithOrin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
combineWithAnd
public net.sf.tweety.logics.fol.syntax.Conjunction combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable formula)
- Specified by:
combineWithAndin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Conjunctable- Specified by:
combineWithAndin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
getSignature
public net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
-
toString
public String toString()
- Specified by:
toStringin classnet.sf.tweety.logics.commons.syntax.RelationalFormula
-
clone
public net.sf.tweety.logics.commons.syntax.RelationalFormula 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.RelationalFormula
-
hashCode
public int hashCode()
-
-