Class CredibilityRevision
java.lang.Object
org.tweetyproject.beliefdynamics.MultipleBaseRevisionOperator<ASPRule>
org.tweetyproject.beliefdynamics.CredibilityRevision<ASPRule>
org.tweetyproject.beliefdynamics.CredibilityRevisionNonIterative<ASPRule>
org.tweetyproject.lp.asp.beliefdynamics.revision.CredibilityRevision
- All Implemented Interfaces:
BaseRevisionOperator<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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
interface defines a method to process the extended answer sets of the credibility revision to generate the new ELP.static class
This class implements a default behavior for the processing of the answer sets of the credibility logic programs. -
Constructor Summary
ConstructorDescriptionDefault Ctor: Do not forget to set the solverCredibilityRevision
(ASPSolver solver) Ctor: setting the solver at construction timeCredibilityRevision
(ASPSolver solver, int maxInt) Constructs aCredibilityRevision
instance with the specified ASP solver and maximum integer value. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the collection of the last answer sets obtained from the solver.Retrieves the collection of the last projected answer sets obtained from the solver.static void
Test methodrevise
(List<Collection<ASPRule>> ol) Revises the belief bases in the orderer list into one belief base.void
Sets the processing strategy for answer sets.Translates the given list of programs to the credibility logic program.Methods inherited from class org.tweetyproject.beliefdynamics.CredibilityRevisionNonIterative
revise
Methods inherited from class org.tweetyproject.beliefdynamics.CredibilityRevision
revise
-
Constructor Details
-
CredibilityRevision
public CredibilityRevision()Default Ctor: Do not forget to set the solver -
CredibilityRevision
Ctor: setting the solver at construction time- Parameters:
solver
- Reference to the solver used for answer set generation.
-
CredibilityRevision
Constructs aCredibilityRevision
instance with the specified ASP solver and maximum integer value.- Parameters:
solver
- the ASP solver to be used for solving logic programsmaxInt
- the maximum integer value used for processing or constraints- Throws:
NullPointerException
- ifsolver
isnull
-
-
Method Details
-
getLastAnswerset
Retrieves the collection of the last answer sets obtained from the solver.- Returns:
- a
Collection
ofAnswerSet
representing the last answer sets
-
getLastProjectedAnswerSet
Retrieves the collection of the last projected answer sets obtained from the solver.- Returns:
- a
Collection
ofAnswerSet
representing the last projected answer sets
-
setAnswersetProcessing
Sets the processing strategy for answer sets.The provided
CredibilityRevision.AnswersetProcessing
instance is used to process answer sets after solving. Ifprocessing
isnull
, anIllegalArgumentException
is thrown.- Parameters:
processing
- theCredibilityRevision.AnswersetProcessing
strategy to be used- Throws:
IllegalArgumentException
- ifprocessing
isnull
-
revise
Description copied from class:CredibilityRevision
Revises the belief bases in the orderer list into one belief base.- Specified by:
revise
in classCredibilityRevision<ASPRule>
- Parameters:
ol
- An orderer list of belief bases which assumes that belief bases with a lower index have a lower priority.- Returns:
- The belief base which is the result of the revision.
-
translate
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
-