Class TransitionSystem


  • public class TransitionSystem
    extends java.lang.Object
    This class represents an action transition system for a fixed action signature with a set of states and a set of transitions between states. Transition systems are used to capture the meaning of action descriptions. For a collection of action languages defined in terms of transition systems, see: [Gelfond, Michael and Lifschitz, Vladimir: Action Languages. ETAI: Electronic Transactions on AI, 1998.]
    Author:
    Sebastian Homann
    • Method Summary

      Modifier and Type Method Description
      State addState​(java.util.Set<FolAtom> fluents)
      Creates a new state and adds it to this transition system.
      void addState​(State s)
      Adds a state to this transition system.
      void addTransition​(Transition t)
      Adds a given transition to this transition system.
      ActionSignature getSignature()  
      State getState​(java.util.Set<FolAtom> fluents)
      Returns the state that maps the given fluents to true, if it exists, otherwise null.
      java.util.Set<State> getStates()  
      java.util.Set<Transition> getTransitions()  
      boolean getValue​(FolAtom fluent, State state)
      Returns the value of a fluent in a state in this transition system.
      java.lang.String toDotFormat()
      Returns this transition system in dot-format with collapsed transitions, which may be further processed using a graph drawing library such as graphviz.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TransitionSystem

        public TransitionSystem​(java.util.Set<State> states,
                                java.util.Set<Transition> transitions,
                                ActionSignature signature)
        Creates a new transition system.
        Parameters:
        states - A set of states which is contained in this transition system.
        transitions - A set of transitions which is contained in this transition system.
        signature - The action signature for this transition system.
      • TransitionSystem

        public TransitionSystem​(java.util.Set<State> states,
                                ActionSignature signature)
        Creates a new transition system.
        Parameters:
        states - A set of states which is contained in this transition system.
        signature - The action signature for this transition system.
      • TransitionSystem

        public TransitionSystem​(ActionSignature signature)
        Creates a new empty transition system with the given ActionSignature.
        Parameters:
        signature - the action signature of this transition system
    • Method Detail

      • addState

        public State addState​(java.util.Set<FolAtom> fluents)
        Creates a new state and adds it to this transition system.
        Parameters:
        fluents - The set of fluents which are to be mapped to true by the new state.
        Returns:
        the new state which maps the given fluents to true.
      • addState

        public void addState​(State s)
        Adds a state to this transition system.
        Parameters:
        s - a new state
      • getState

        public State getState​(java.util.Set<FolAtom> fluents)
        Returns the state that maps the given fluents to true, if it exists, otherwise null.
        Parameters:
        fluents - a set of fluents
        Returns:
        the state that maps the given fluents to true, if it exists, otherwise null.
      • addTransition

        public void addTransition​(Transition t)
        Adds a given transition to this transition system.
        Parameters:
        t - a new transition
      • getStates

        public java.util.Set<State> getStates()
        Returns:
        all states contained in this transition system.
      • getTransitions

        public java.util.Set<Transition> getTransitions()
        Returns:
        all transitions contained in this transition system.
      • getValue

        public boolean getValue​(FolAtom fluent,
                                State state)
        Returns the value of a fluent in a state in this transition system.
        Parameters:
        fluent - a fluent
        state - a state
        Returns:
        true, iff the fluent is mapped to true by the given state.
      • toDotFormat

        public java.lang.String toDotFormat()
        Returns this transition system in dot-format with collapsed transitions, which may be further processed using a graph drawing library such as graphviz. For more information, see http://www.graphviz.org
        Returns:
        This transition system in dot format.
      • getSignature

        public ActionSignature getSignature()
        Returns:
        the action signature of this transition system.
      • toString

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