Class AbstractCausalReasoner
java.lang.Object
org.tweetyproject.causal.reasoner.AbstractCausalReasoner
- All Implemented Interfaces:
ModelProvider<PlFormula, CausalKnowledgeBase, CausalInterpretation>,QualitativeReasoner<CausalKnowledgeBase, PlFormula>,Reasoner<Boolean, CausalKnowledgeBase, PlFormula>
- Direct Known Subclasses:
AbstractArgumentationBasedCausalReasoner
public abstract class AbstractCausalReasoner
extends Object
implements QualitativeReasoner<CausalKnowledgeBase, PlFormula>, ModelProvider<PlFormula, CausalKnowledgeBase, CausalInterpretation>
General abstract reasoner for basic causal reasoning with
CausalKnowledgeBase- Author:
- Lars Bengel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionComputes the set of all literal expressions that can be concluded from the causal knowledge basegetConclusions(CausalKnowledgeBase cbase, Collection<PlFormula> observations) Computes the set of all literal expressions that can be concluded from the causal knowledge base and observationgetConclusions(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions) Computes the set of all literal expressions that can be concluded from the causal knowledge base and observationsgetConclusions(CausalKnowledgeBase cbase, PlFormula observation) Computes the set of all literal expressions that can be concluded from the causal knowledge base and observationgetModel(CausalKnowledgeBase cbase) Returns a single (dedicated) model of the given belief base.getModel(CausalKnowledgeBase cbase, Collection<PlFormula> observations) Computes some interpretation that can be concluded from the causal knowledge base and observationsgetModel(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions) Computes some interpretation that can be concluded from the causal knowledge base and observationsgetModel(CausalKnowledgeBase cbase, PlFormula observation) Computes some interpretation that can be concluded from the causal knowledge base and observationsgetModels(CausalKnowledgeBase cbase) Returns a characterizing model of the given belief basegetModels(CausalKnowledgeBase cbase, Collection<PlFormula> observations) Computes the set of all interpretations that can be concluded from the causal knowledge base and observationabstract Collection<CausalInterpretation> getModels(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions) Computes the set of all interpretations that can be concluded from the causal knowledge base and observationsgetModels(CausalKnowledgeBase cbase, PlFormula observation) Computes the set of all interpretations that can be concluded from the causal knowledge base and observationbooleanChecks whether the underlying solver or reasoning mechanism used by this reasoner is installed and available for use.booleanquery(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions, PlFormula effect) Determines whether the given effect is entailed by the causal knowledge base together with the observationsbooleanquery(CausalKnowledgeBase cbase, Collection<PlFormula> observations, PlFormula effect) Determines whether the given effect is entailed by the causal knowledge base together with the observationsquery(CausalKnowledgeBase cbase, PlFormula effect) Queries the given belief base with the provided formula and returns a boolean result.booleanquery(CausalKnowledgeBase cbase, PlFormula observation, PlFormula effect) Determines whether the given effect is entailed by the causal knowledge base together with the observation
-
Constructor Details
-
AbstractCausalReasoner
public AbstractCausalReasoner()
-
-
Method Details
-
getModels
public abstract Collection<CausalInterpretation> getModels(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions) Computes the set of all interpretations that can be concluded from the causal knowledge base and observations- Parameters:
cbase- some causal knowledge baseobservations- some logical formulae over atoms of the causal knowledge baseinterventions- a set of interventions on causal atoms- Returns:
- the set of interpretations that can be concluded from the causal knowledge base
-
getConclusions
public Collection<PlFormula> getConclusions(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions) Computes the set of all literal expressions that can be concluded from the causal knowledge base and observations- Parameters:
cbase- some causal knowledge baseobservations- some logical formulae over atoms of the causal knowledge baseinterventions- a set of interventions on causal atoms- Returns:
- the set of expressions that can be concluded from the given knowledge
-
getConclusions
public Collection<PlFormula> getConclusions(CausalKnowledgeBase cbase, Collection<PlFormula> observations) Computes the set of all literal expressions that can be concluded from the causal knowledge base and observation- Parameters:
cbase- some causal knowledge baseobservations- some logical formula over atoms of the causal knowledge base- Returns:
- the set of expressions that can be concluded from the given knowledge
-
getConclusions
Computes the set of all literal expressions that can be concluded from the causal knowledge base and observation- Parameters:
cbase- some causal knowledge baseobservation- some logical formula over atoms of the causal knowledge base- Returns:
- the set of expressions that can be concluded from the given knowledge
-
getConclusions
Computes the set of all literal expressions that can be concluded from the causal knowledge base- Parameters:
cbase- some causal knowledge base- Returns:
- the set of expressions that can be concluded from the given knowledge
-
query
public boolean query(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions, PlFormula effect) Determines whether the given effect is entailed by the causal knowledge base together with the observations- Parameters:
cbase- some causal knowledge baseobservations- some logical formulae over atoms of the causal knowledge baseinterventions- a set of interventions on causal atomseffect- some logical formula over atoms of the causal knowledge base- Returns:
- TRUE iff the causal knowledge base together with the observations logically entails the effect
-
query
public boolean query(CausalKnowledgeBase cbase, Collection<PlFormula> observations, PlFormula effect) Determines whether the given effect is entailed by the causal knowledge base together with the observations- Parameters:
cbase- some causal knowledge baseobservations- some logical formulae over atoms of the causal knowledge baseeffect- some logical formula over atoms of the causal knowledge base- Returns:
- TRUE iff the causal knowledge base together with the observations logically entails the effect
-
query
Determines whether the given effect is entailed by the causal knowledge base together with the observation- Parameters:
cbase- some causal knowledge baseobservation- some logical formula over atoms of the causal knowledge baseeffect- some logical formula over atoms of the causal knowledge base- Returns:
- TRUE iff the causal knowledge base together with the observation logically entails the effect
-
query
Description copied from interface:QualitativeReasonerQueries the given belief base with the provided formula and returns a boolean result. The result indicates whether the formula is entailed or satisfied by the belief base according to the qualitative reasoning method implemented by the reasoner.- Specified by:
queryin interfaceQualitativeReasoner<CausalKnowledgeBase, PlFormula>- Specified by:
queryin interfaceReasoner<Boolean, CausalKnowledgeBase, PlFormula>- Parameters:
cbase- The belief base to be queried.effect- The formula for which the query is made.- Returns:
- `TRUE` if the formula is entailed or satisfied by the belief base, `FALSE` otherwise.
-
getModels
public Collection<CausalInterpretation> getModels(CausalKnowledgeBase cbase, Collection<PlFormula> observations) Computes the set of all interpretations that can be concluded from the causal knowledge base and observation- Parameters:
cbase- some causal knowledge baseobservations- some logical formula over atoms of the causal knowledge base- Returns:
- the set of interpretations that can be concluded from the causal knowledge base
-
getModels
Computes the set of all interpretations that can be concluded from the causal knowledge base and observation- Parameters:
cbase- some causal knowledge baseobservation- some logical formula over atoms of the causal knowledge base- Returns:
- the set of interpretations that can be concluded from the causal knowledge base
-
getModels
Description copied from interface:ModelProviderReturns a characterizing model of the given belief base- Specified by:
getModelsin interfaceModelProvider<PlFormula, CausalKnowledgeBase, CausalInterpretation>- Parameters:
cbase- some belief base- Returns:
- the (selected) models of the belief base
-
getModel
public CausalInterpretation getModel(CausalKnowledgeBase cbase, Collection<PlFormula> observations, Map<Proposition, Boolean> interventions) Computes some interpretation that can be concluded from the causal knowledge base and observations- Parameters:
cbase- some causal knowledge baseobservations- some logical formulae over atoms of the causal knowledge baseinterventions- a set of interventions on causal atoms- Returns:
- an interpretation that can be concluded from the causal knowledge base
-
getModel
Computes some interpretation that can be concluded from the causal knowledge base and observations- Parameters:
cbase- some causal knowledge baseobservations- some logical formulae over atoms of the causal knowledge base- Returns:
- an interpretation that can be concluded from the causal knowledge base
-
getModel
Computes some interpretation that can be concluded from the causal knowledge base and observations- Parameters:
cbase- some causal knowledge baseobservation- some logical formula over atoms of the causal knowledge base- Returns:
- an interpretation that can be concluded from the causal knowledge base
-
getModel
Description copied from interface:ModelProviderReturns a single (dedicated) model of the given belief base. If the implemented method allows for more than one dedicated model, the selection may be non-deterministic.- Specified by:
getModelin interfaceModelProvider<PlFormula, CausalKnowledgeBase, CausalInterpretation>- Parameters:
cbase- some belief base- Returns:
- a selected model of the belief base.
-
isInstalled
public boolean isInstalled()Description copied from interface:QualitativeReasonerChecks whether the underlying solver or reasoning mechanism used by this reasoner is installed and available for use. This can be helpful when the reasoner depends on external tools or libraries for performing the reasoning tasks.- Specified by:
isInstalledin interfaceQualitativeReasoner<CausalKnowledgeBase, PlFormula>- Returns:
- `true` if the solver is installed and available, `false` otherwise.
-