Package MAKBPInterpreter.agents
Class CommonKnowledge
- java.lang.Object
-
- MAKBPInterpreter.agents.CommonKnowledge
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Agent>agentsAgent set where each agent knows the associated formula.protected FormulainnerFormulaCommon formula knows by all the agents.
-
Constructor Summary
Constructors Constructor Description CommonKnowledge(Formula formula, java.util.Set<Agent> agents)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Formula otherFormula)Returnstrueif this formula contains the specified formula.booleanequals(java.lang.Object other)Verifies if the current object formula andotherformula are the same.booleanevaluate(LogicAssignment assignment)java.util.Set<Agent>getAgents()Gets the agent set where each agent knows the associated formula.FormulagetInnerFormula()Gets the inner formula object.FormulagetNegation()Returns the negation of the current formula.inthashCode()Formulasimplify()Simplifies the logic formula.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
Description copied from interface:FormulaVerifies if the current object formula andotherformula are the same.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
simplify
public Formula simplify()
Description copied from interface:FormulaSimplifies the logic formula.
-
getNegation
public Formula getNegation()
Description copied from interface:FormulaReturns the negation of the current formula.- Specified by:
getNegationin interfaceFormula- Returns:
- negation of formula
-
contains
public boolean contains(Formula otherFormula)
Description copied from interface:FormulaReturnstrueif this formula contains the specified formula.
-
getInnerFormula
public Formula getInnerFormula()
Gets the inner formula object.- Returns:
- inner formula object
- See Also:
innerFormula
-
getAgents
public java.util.Set<Agent> getAgents()
Gets the agent set where each agent knows the associated formula.- Returns:
- agent set
-
evaluate
public boolean evaluate(LogicAssignment assignment) throws java.lang.Exception
Evaluates the everybody knowledge offormulain all accessible worlds by all agents of the groupagents. An adapted Breadth-first search where at each world, an evaluation of EK was realized. This algorithm represents the infinite depth in theory but limited by the number of edges and vertices of the Kripke structure.
-
-