Class TransitionSystem


  • public class TransitionSystem
    extends 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
    • Constructor Detail

      • TransitionSystem

        public TransitionSystem​(Set<State> states,
                                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​(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​(Set<net.sf.tweety.logics.fol.syntax.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​(Set<net.sf.tweety.logics.fol.syntax.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 Set<State> getStates()
        Returns all states contained in this transition system.
        Returns:
        all states contained in this transition system.
      • getTransitions

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

        public boolean getValue​(net.sf.tweety.logics.fol.syntax.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 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.
        Returns:
        the action signature of this transition system.