Class KripkeWorld


  • public class KripkeWorld
    extends java.lang.Object
    Class representing a world in a KripkeStructure (node of the graph in this structure).
    • Constructor Summary

      Constructors 
      Constructor Description
      KripkeWorld​(java.lang.String name, java.util.Map<Atom,​java.lang.Boolean> assignment)
      Default constructor.
      KripkeWorld​(java.util.Map<Atom,​java.lang.Boolean> assignment)
      Constructor without world name.
    • Constructor Detail

      • KripkeWorld

        public KripkeWorld​(java.lang.String name,
                           java.util.Map<Atom,​java.lang.Boolean> assignment)
        Default constructor.
        Parameters:
        name - world name
        assignment - proposition of the world represents
      • KripkeWorld

        public KripkeWorld​(java.util.Map<Atom,​java.lang.Boolean> assignment)
        Constructor without world name.
        Parameters:
        assignment - proposition of the world represents
    • Method Detail

      • satisfied

        public boolean satisfied​(Formula formula,
                                 KripkeStructure structure)
                          throws java.lang.Exception
        Checks if a given formula is satisfying the actual state of the world.
        Parameters:
        formula - formula to satisfied
        structure - Kripke structure
        Returns:
        boolean representing if the world satisfied the formula
        Throws:
        java.lang.Exception - thrown if an illegal argument is passed
      • differencesBetweenWorlds

        public java.util.Collection<Atom> differencesBetweenWorlds​(KripkeWorld world)
        Returns the differences between two worlds (all atoms divergence).
        Parameters:
        world - other world
        Returns:
        atoms set representing the divergence
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getName

        public java.lang.String getName()
        Gets the name of the world.
        Returns:
        world name
      • getAssignment

        public java.util.Map<Atom,​java.lang.Boolean> getAssignment()
        Gets all the true propositions of the world.
        Returns:
        true propositions