Class CTransitionSystemCalculator

java.lang.Object
org.tweetyproject.action.description.reasoner.CTransitionSystemCalculator

public class CTransitionSystemCalculator extends 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 [1]. [1] Vladimir Lifschitz and Hudson Turner. Representing Transition Systems by Logic Programs. 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), Anna Gessler (further modifications for asp library)
  • Constructor Details

    • 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 Details

    • calculateTransitionSystem

      public TransitionSystem calculateTransitionSystem(CActionDescription actionDescription, ActionSignature signature) throws 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:
      IOException - if IO fails
      IllegalArgumentException - is thrown, when the given action description is not definite, as this method only works for definite action descriptions.
    • calculateStates

      public Set<State> calculateStates(CActionDescription actionDescription, ActionSignature signature) throws 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:
      IOException - if IO fails
      IllegalArgumentException - is thrown, when the given action description is not definite.
    • convertToLogicProgram

      public String convertToLogicProgram(CActionDescription d, ActionSignature signature, int T)
      Calculates an extended logic program 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" [1] 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.