Class CredibilityRevision

  • All Implemented Interfaces:
    net.sf.tweety.beliefdynamics.BaseRevisionOperator<net.sf.tweety.lp.asp.syntax.ASPRule>

    public class CredibilityRevision
    extends net.sf.tweety.beliefdynamics.CredibilityRevisionNonIterative<net.sf.tweety.lp.asp.syntax.ASPRule>
    Implements the credibility revision approach for ASP described in Kruempelmann et al. 2008. It extends the NonIterativeRevision interface by providing methods to receive the last calculated answer sets and it's projection. Internally the prefixes 'c__' 'neg_c' are used to prefix constants and the prefix 'p__' is used to prefix literals of the extended alphabet of the credibility program.
    Author:
    Tim Janus
    • Constructor Detail

      • CredibilityRevision

        public CredibilityRevision()
        Default Ctor: Do not forget to set the solver
      • CredibilityRevision

        public CredibilityRevision​(net.sf.tweety.lp.asp.reasoner.ASPSolver solver)
        Ctor: setting the solver at construction time
        Parameters:
        solver - Reference to the solver used for answer set generation.
      • CredibilityRevision

        public CredibilityRevision​(net.sf.tweety.lp.asp.reasoner.ASPSolver solver,
                                   int maxInt)
    • Method Detail

      • getLastAnswerset

        public Collection<net.sf.tweety.lp.asp.semantics.AnswerSet> getLastAnswerset()
      • getLastProjectedAnswerSet

        public Collection<net.sf.tweety.lp.asp.semantics.AnswerSet> getLastProjectedAnswerSet()
      • revise

        public net.sf.tweety.lp.asp.syntax.Program revise​(List<Collection<net.sf.tweety.lp.asp.syntax.ASPRule>> ol)
        Specified by:
        revise in class net.sf.tweety.beliefdynamics.CredibilityRevision<net.sf.tweety.lp.asp.syntax.ASPRule>
      • translate

        public net.sf.tweety.lp.asp.syntax.Program translate​(List<net.sf.tweety.lp.asp.syntax.Program> orderedList)
        Translates the given list of programs to the credibility logic program. The index of the program in the list represents its credibility, this means the first program in the list has lesser credibility than the second.
        Parameters:
        orderedList - The ordered list of extended logic programs which shall be translated.
        Returns:
        The credibility logic program representing the revision of the given ELPs.
      • main

        public static void main​(String[] args)