Package MAKBPInterpreter.logic
Interface Formula
-
- All Known Implementing Classes:
AgentKnowledge,And,Atom,Box,CommonKnowledge,Diamond,Equivalence,EverybodyKnowledge,Implication,Not,Or
public interface FormulaRepresents the base of all components of the modal and epistemic logic representation.
-
-
Method Summary
All Methods Instance Methods Abstract 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)Evaluates a state that we passed into arguments.FormulagetNegation()Returns the negation of the current formula.Formulasimplify()Simplifies the logic formula.
-
-
-
Method Detail
-
equals
boolean equals(java.lang.Object other)
Verifies if the current object formula andotherformula are the same.- Overrides:
equalsin classjava.lang.Object- Parameters:
other- other formula to test the equality- Returns:
- result of the equality test
-
simplify
Formula simplify()
Simplifies the logic formula.- Returns:
- simplified formula
-
getNegation
Formula getNegation()
Returns the negation of the current formula.- Returns:
- negation of formula
-
contains
boolean contains(Formula otherFormula)
Returnstrueif this formula contains the specified formula.- Parameters:
otherFormula- other formula whose presence in this formula is to be tested- Returns:
trueif this formula contains the specified formula
-
evaluate
boolean evaluate(LogicAssignment assignment) throws java.lang.Exception
Evaluates a state that we passed into arguments.- Parameters:
assignment- state to evaluate- Returns:
- result of the evaluation
- Throws:
java.lang.Exception- throws when the formula not supported this operation or expected object not given
-
-