Class PreferenceHandling
java.lang.Object
org.tweetyproject.beliefdynamics.MultipleBaseRevisionOperator<ASPRule>
org.tweetyproject.beliefdynamics.CredibilityRevision<ASPRule>
org.tweetyproject.beliefdynamics.CredibilityRevisionIterative<ASPRule>
org.tweetyproject.lp.asp.beliefdynamics.revision.PreferenceHandling
- All Implemented Interfaces:
BaseRevisionOperator<ASPRule>
The implementation orients on the diploma thesis of Mirja Boehmer
in this class a variant of the approach
"A Preference-Based Framework for Updating Logic Programs" by James P.
Delgrande, Torsten Schaub and Hans Tompits is implemented, respectively the
operator *1 is used; first step: defaultification of two given programs
second step: computation of the answer sets of the concatenation of the two
defaulticated programs third step: computation of the revised program with
the help of these answer sets last step: computation of the answer sets of
the revised program
We are only check for conflicting rules and remove this rules with lesser priority.
- Author:
- Tim Janus
-
Constructor Summary
ConstructorDescriptionPreferenceHandling
(ASPSolver solver) Constructs aPreferenceHandling
instance with the specified ASP solver and a default maximum integer value of 5.PreferenceHandling
(ASPSolver solver, int maxInt) Constructs aPreferenceHandling
instance with the specified ASP solver and maximum integer value. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Temporary functional test method.revise
(Collection<ASPRule> base, Collection<ASPRule> formulas) Revises the two given belief bases and returns the result, the former belief base has a lesser credibility than the latter.void
Sets theASPSolver
instance for thisPreferenceHandling
instance.Methods inherited from class org.tweetyproject.beliefdynamics.CredibilityRevisionIterative
revise
Methods inherited from class org.tweetyproject.beliefdynamics.CredibilityRevision
revise
-
Constructor Details
-
PreferenceHandling
Constructs aPreferenceHandling
instance with the specified ASP solver and a default maximum integer value of 5.- Parameters:
solver
- theASPSolver
to be used for solving logic programs- Throws:
NullPointerException
- ifsolver
isnull
-
PreferenceHandling
Constructs aPreferenceHandling
instance with the specified ASP solver and maximum integer value.- Parameters:
solver
- theASPSolver
to be used for solving logic programsmaxInt
- the maximum integer value used in preference handling- Throws:
NullPointerException
- ifsolver
isnull
-
-
Method Details
-
setSolver
Sets theASPSolver
instance for thisPreferenceHandling
instance.- Parameters:
solver
- theASPSolver
to be used for solving logic programs- Throws:
NullPointerException
- ifsolver
isnull
-
revise
Description copied from class:CredibilityRevision
Revises the two given belief bases and returns the result, the former belief base has a lesser credibility than the latter.- Specified by:
revise
in classCredibilityRevision<ASPRule>
- Parameters:
base
- The lower priority belief baseformulas
- The higher priority belief base- Returns:
- The belief base which is the result of the revision.
-
main
Temporary functional test method.- Parameters:
args
- the args- Throws:
ParseException
- error when parsing
-