public class ScreenedRemainderSets extends RemainderSets<Rule>
| Modifier and Type | Field and Description |
|---|---|
private Program |
program |
private Program |
screen |
private static long |
serialVersionUID |
private Solver |
solver |
| Constructor and Description |
|---|
ScreenedRemainderSets(Program p,
Program r,
Solver solver)
Creates a new set of screened remainder sets of program p that all contain
the screened rules r.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<Program> |
asPrograms()
Returns this set of remainder sets as a collection of programs where
each program contains exactly the rules of one remainder set.
|
private java.util.Set<Program> |
calculateRemainderSetCandidates(Program p)
Recursively calculates consistent subsets of p.
|
Program |
getScreen()
Returns the screened rules that are contained in every remainder set.
|
Program |
getSourceBeliefBase()
Returns the original program p for which this set represents the
set of remainder sets.
|
private boolean |
isConsistent(Program p) |
private boolean |
isProperSubset(Program p,
Program q)
Returns true iff program p is a proper (strict) subset of program q
|
static void |
main(java.lang.String[] args)
Simple test case taken from [1]
|
add, clear, clone, contains, isEmpty, iterator, remove, size, spliteratoraddAll, containsAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitprivate static final long serialVersionUID
private Program program
private Program screen
private Solver solver
public ScreenedRemainderSets(Program p, Program r, Solver solver) throws SolverException
p - an asp-program for which the screened remainder sets are calculatedr - an asp-program representing the set of rules, that have to be contained in every remainder set. Has to be a subset of psolver - an asp-solverSolverExceptionpublic Program getSourceBeliefBase()
getSourceBeliefBase in class RemainderSets<Rule>public Program getScreen()
private boolean isProperSubset(Program p, Program q)
p - a programq - another programprivate java.util.Set<Program> calculateRemainderSetCandidates(Program p) throws SolverException
p - SolverExceptionprivate boolean isConsistent(Program p) throws SolverException
SolverExceptionpublic java.util.Collection<Program> asPrograms()
public static void main(java.lang.String[] args)
throws ParseException,
SolverException
args - ParseExceptionSolverException