Package MAKBPInterpreter.logic
Interface Formula
-
- All Known Implementing Classes:
AgentKnowledge
,And
,Atom
,Box
,CommonKnowledge
,Diamond
,Equivalence
,EverybodyKnowledge
,Implication
,Not
,Or
public interface Formula
Represents 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 boolean
contains(Formula otherFormula)
Returnstrue
if this formula contains the specified formula.boolean
equals(java.lang.Object other)
Verifies if the current object formula andother
formula are the same.boolean
evaluate(LogicAssignment assignment)
Evaluates a state that we passed into arguments.Formula
getNegation()
Returns the negation of the current formula.Formula
simplify()
Simplifies the logic formula.
-
-
-
Method Detail
-
equals
boolean equals(java.lang.Object other)
Verifies if the current object formula andother
formula are the same.- Overrides:
equals
in 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)
Returnstrue
if this formula contains the specified formula.- Parameters:
otherFormula
- other formula whose presence in this formula is to be tested- Returns:
true
if 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
-
-