Package net.sf.tweety.logics.rcl.syntax
Class RelationalConditional
- java.lang.Object
-
- net.sf.tweety.logics.commons.syntax.RelationalFormula
-
- net.sf.tweety.logics.rcl.syntax.RelationalConditional
-
- 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.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 RelationalConditional extends net.sf.tweety.logics.commons.syntax.RelationalFormula implements net.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>Instances of this class represent relational conditionals.
Premise and conclusion of this conditional must confirm to a fol language without quantifiers and without functions (@see net.sf.tweety.logics.firstorderlogic.lang.FolLanguageNoQuantifiersNoFunctions)- Author:
- Matthias Thimm TODO dont use relation formula cause it is a Quantified formula that not support or and etc.
-
-
Constructor Summary
Constructors Constructor Description RelationalConditional(net.sf.tweety.logics.fol.syntax.FolFormula conclusion)Creates a new conditional with the given conclusion and a tautological premise.RelationalConditional(net.sf.tweety.logics.fol.syntax.FolFormula premise, net.sf.tweety.logics.fol.syntax.FolFormula conclusion)Creates a new conditional with the given premise and conclusion.
-
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)RelationalConditionalclone()net.sf.tweety.logics.fol.syntax.ConjunctioncombineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)net.sf.tweety.logics.fol.syntax.DisjunctioncombineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)net.sf.tweety.logics.commons.syntax.RelationalFormulacomplement()booleancontainsQuantifier()booleanequals(Object obj)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()Set<net.sf.tweety.logics.commons.syntax.Predicate>getPredicates()Collection<? extends net.sf.tweety.logics.fol.syntax.FolFormula>getPremise()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)booleanisConstraint()booleanisFact()Checks whether this conditional is a fact, i.e.booleanisLiteral()booleanisWellBound()booleanisWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)voidsetConclusion(net.sf.tweety.logics.fol.syntax.FolFormula conclusion)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
-
RelationalConditional
public RelationalConditional(net.sf.tweety.logics.fol.syntax.FolFormula premise, net.sf.tweety.logics.fol.syntax.FolFormula conclusion)Creates a new conditional with the given premise and conclusion.- Parameters:
premise- a fol formula.conclusion- a fol formula.
-
RelationalConditional
public RelationalConditional(net.sf.tweety.logics.fol.syntax.FolFormula conclusion)
Creates a new conditional with the given conclusion and a tautological premise.- Parameters:
conclusion- a fol formula.
-
-
Method Detail
-
containsQuantifier
public boolean containsQuantifier()
- Specified by:
containsQuantifierin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
-
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
-
getPredicates
public Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
- Specified by:
getPredicatesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getUnboundVariables
public Set<net.sf.tweety.logics.commons.syntax.Variable> getUnboundVariables()
- Specified by:
getUnboundVariablesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
-
isFact
public boolean isFact()
Checks whether this conditional is a fact, i.e. has a tautological premise.- Specified by:
isFactin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>- Returns:
- "true" iff this conditional is a fact.
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
-
isClosed
public boolean isClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
- Specified by:
isClosedin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
-
isWellBound
public boolean isWellBound()
- Specified by:
isWellBoundin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
-
isWellBound
public boolean isWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
- Specified by:
isWellBoundin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
-
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
-
toString
public String toString()
- Specified by:
toStringin 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
-
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>
-
getPremise
public Collection<? extends 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>
-
combineWithAnd
public net.sf.tweety.logics.fol.syntax.Conjunction combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable f)
- Specified by:
combineWithAndin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Conjunctable- Specified by:
combineWithAndin 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 f)
- Specified by:
combineWithOrin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Disjunctable- Specified by:
combineWithOrin 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
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
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
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteralin 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
-
getTerms
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms(Class<C> cls)
- Specified by:
getTermsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.LogicStructure
-
getQuantifierVariables
public Set<net.sf.tweety.logics.commons.syntax.Variable> getQuantifierVariables()
- Specified by:
getQuantifierVariablesin interfacenet.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
-
clone
public RelationalConditional 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
-
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>
-
setConclusion
public void setConclusion(net.sf.tweety.logics.fol.syntax.FolFormula conclusion)
- Specified by:
setConclusionin interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
addPremise
public void addPremise(net.sf.tweety.logics.fol.syntax.FolFormula premise)
- Specified by:
addPremisein interfacenet.sf.tweety.commons.util.rules.Rule<net.sf.tweety.logics.fol.syntax.FolFormula,net.sf.tweety.logics.fol.syntax.FolFormula>
-
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>
-
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>
-
-