Class KripkeStructure<T>

java.lang.Object
org.episteme.core.mathematics.logic.modal.KripkeStructure<T>

public class KripkeStructure<T> extends Object
Represents a Kripke structure for modal logic semantics.

A Kripke structure consists of a set of worlds and an accessibility relation between them.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • KripkeStructure

      public KripkeStructure()
  • Method Details

    • addWorld

      public void addWorld(String worldName)
      Adds a possible world to the structure.
      Parameters:
      worldName - the name of the world
    • addRelation

      public void addRelation(String fromWorld, String toWorld)
      Adds an accessibility relation from one world to another.
      Parameters:
      fromWorld - source world
      toWorld - destination world
    • setTrue

      public void setTrue(String worldName, T proposition)
      Sets a proposition as true in a specific world.
      Parameters:
      worldName - the world
      proposition - the proposition
    • isTrue

      public boolean isTrue(String worldName, T proposition)
      Checks if a proposition is true in a specific world.
      Parameters:
      worldName - the world
      proposition - the proposition
      Returns:
      true if the proposition holds
    • getAccessibleWorlds

      public Set<String> getAccessibleWorlds(String worldName)
      Returns the set of worlds accessible from the given world.
      Parameters:
      worldName - the source world
      Returns:
      set of accessible world names