Class CTransitionSystemCalculator


  • public class CTransitionSystemCalculator
    extends java.lang.Object
    This class calculates the transition system as it is described by an action description in the action language C using extended logic programming with an approach from: Representing Transition Systems by Logic Programs. by Vladimir Lifschitz and Hudson Turner, LPNMR '99: Proceedings of the 5th International Conference on Logic Programming and Nonmonotonic Reasoning. Pages 92-106, 1999.
    Author:
    Sebastian Homann, Tim Janus (modifictions for asp library)
    • Constructor Summary

      Constructors 
      Constructor Description
      CTransitionSystemCalculator​(ASPSolver aspsolver)
      Creates a new transition system calculator with the given interface to an answer set solver.
    • Method Summary

      Modifier and Type Method Description
      java.util.Set<State> calculateStates​(CActionDescription actionDescription, ActionSignature signature)
      calculates the set of all states of the transition system described by an action description.
      TransitionSystem calculateTransitionSystem​(CActionDescription actionDescription, ActionSignature signature)
      Calculates a transition system as described by the given action description using all symbols in the given action signature.
      java.lang.String getLpT​(CActionDescription d, ActionSignature signature, int T)
      Calculates an extended logic programm lp_T(D) for a given action description D and a parameter T, which corresponds to the length of histories in the transition system described by D.
      • Methods inherited from class java.lang.Object

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

      • CTransitionSystemCalculator

        public CTransitionSystemCalculator​(ASPSolver aspsolver)
        Creates a new transition system calculator with the given interface to an answer set solver.
        Parameters:
        aspsolver - some ASP solver
    • Method Detail

      • calculateTransitionSystem

        public TransitionSystem calculateTransitionSystem​(CActionDescription actionDescription,
                                                          ActionSignature signature)
                                                   throws java.io.IOException
        Calculates a transition system as described by the given action description using all symbols in the given action signature.
        Parameters:
        actionDescription - an action description.
        signature - an action signature.
        Returns:
        a transition system.
        Throws:
        java.io.IOException - if IO fails
        java.lang.IllegalArgumentException - is thrown, when the given action description is not definite, as this method only works for definite action descriptions.
      • calculateStates

        public java.util.Set<State> calculateStates​(CActionDescription actionDescription,
                                                    ActionSignature signature)
                                             throws java.io.IOException
        calculates the set of all states of the transition system described by an action description.
        Parameters:
        actionDescription - an action description.
        signature - an action signature.
        Returns:
        the set of all states of the transition system described by an action description.
        Throws:
        java.io.IOException - if IO fails
        java.lang.IllegalArgumentException - is thrown, when the given action description is not definite.
      • getLpT

        public java.lang.String getLpT​(CActionDescription d,
                                       ActionSignature signature,
                                       int T)
        Calculates an extended logic programm lp_T(D) for a given action description D and a parameter T, which corresponds to the length of histories in the transition system described by D. See "Representing Transition Systems by Logic Programs." for more information.
        Parameters:
        d - an action description.
        signature - an action signature.
        T - length of histories of the transition system of D, that correspond to answer sets of lp_T(D).
        Returns:
        an extended logic program.