public class CredibilityRevision extends CredibilityRevisionNonIterative<Rule>
Modifier and Type | Class and Description |
---|---|
static interface |
CredibilityRevision.AnswersetProcessing
interface defines a method to process the extended answer sets of the
credibility revision to generate the new ELP.
|
static class |
CredibilityRevision.DefaultBehavior
This class implements a default behavior for the processing of the answer sets
of the credibility logic programs.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
constantPrefix
a prefix used to mark constants which represents the id of positive literals.
|
private AnswerSetList |
lastAnswersets |
private AnswerSetList |
lastProjectedAnswersets |
private java.util.Map<DLPLiteral,java.lang.String> |
literalMap
a map used during the creation of the credibility logic program
|
private int |
maxInt |
private java.lang.String |
negConstantPrefix
a prefix used to mark constants which represent the id of negative literals.
|
private java.lang.String |
predCredibilityPrefix
a prefix used to mark the prioritzed version of predicates
|
private CredibilityRevision.AnswersetProcessing |
processing |
private int |
ruleIndex
a rule index counter used during the creation of the credibility logic program
|
private Solver |
solver
reference to the solver used for the answer set generation
|
Constructor and Description |
---|
CredibilityRevision()
Default Ctor: Do not forget to set the solver
|
CredibilityRevision(Solver solver)
Ctor: setting the solver at construction time
|
CredibilityRevision(Solver solver,
int maxInt) |
Modifier and Type | Method and Description |
---|---|
AnswerSetList |
getLastAnswerset() |
AnswerSetList |
getLastProjectedAnswerSet() |
static void |
main(java.lang.String[] args) |
private void |
projectAnswerSet()
Projects the answer set of the credibility program to the original alphabet
|
Program |
revise(java.util.List<java.util.Collection<Rule>> ol)
Revises the belief bases in the orderer list into one belief base.
|
void |
setAnswersetProcessing(CredibilityRevision.AnswersetProcessing processing) |
Program |
translate(java.util.List<Program> orderedList)
Translates the given list of programs to the credibility logic program.
|
private Program |
translate(Program p,
int programCredibility)
Helper method: Translates the given program
|
private java.lang.String |
translateLiteral(DLPLiteral lit)
Helper method: creates a string representing the literal and an literal
representing the prioritzed version of the literal.
|
revise
revise
private CredibilityRevision.AnswersetProcessing processing
private java.util.Map<DLPLiteral,java.lang.String> literalMap
private java.lang.String negConstantPrefix
private java.lang.String constantPrefix
private java.lang.String predCredibilityPrefix
private int ruleIndex
private Solver solver
private AnswerSetList lastAnswersets
private AnswerSetList lastProjectedAnswersets
private int maxInt
public CredibilityRevision()
public CredibilityRevision(Solver solver)
solver
- Reference to the solver used for answer set generation.public CredibilityRevision(Solver solver, int maxInt)
public AnswerSetList getLastAnswerset()
public AnswerSetList getLastProjectedAnswerSet()
public void setAnswersetProcessing(CredibilityRevision.AnswersetProcessing processing)
public Program revise(java.util.List<java.util.Collection<Rule>> ol)
CredibilityRevision
revise
in class CredibilityRevision<Rule>
ol
- An orderer list of belief bases which assumes
that belief bases with a lower index have a
lower priority.private void projectAnswerSet()
public Program translate(java.util.List<Program> orderedList)
orderedList
- The ordered list of extended logic programs which shall be translated.private Program translate(Program p, int programCredibility)
p
- Reference to the programprogramCredibility
- The credibility value for the programprivate java.lang.String translateLiteral(DLPLiteral lit)
lit
- The unprioritzed version of the literal.public static void main(java.lang.String[] args)